diff options
author | Ryan Volz <ryan.volz@gmail.com> | 2021-03-15 12:40:58 -0400 |
---|---|---|
committer | mormj <34754695+mormj@users.noreply.github.com> | 2021-10-25 15:21:48 -0400 |
commit | 04a6a91b001393d2d29707817480ab3cb4d533d8 (patch) | |
tree | 6be59090c3a9013a4f441129e45b9235461e1acb | |
parent | 9147c6eb99862697b454471b7882853e355f84cb (diff) |
ci: Add conda recipe and .conda-forge.yml for smithy CI.
Signed-off-by: Ryan Volz <ryan.volz@gmail.com>
-rw-r--r-- | .conda-forge.yml | 48 | ||||
-rw-r--r-- | .packaging/conda_recipe/README | 19 | ||||
-rw-r--r-- | .packaging/conda_recipe/bld.bat | 48 | ||||
-rw-r--r-- | .packaging/conda_recipe/build.sh | 58 | ||||
-rw-r--r-- | .packaging/conda_recipe/conda_build_config.yaml | 7 | ||||
-rw-r--r-- | .packaging/conda_recipe/meta.yaml | 186 | ||||
-rw-r--r-- | .packaging/conda_recipe/yum_requirements.txt | 14 |
7 files changed, 380 insertions, 0 deletions
diff --git a/.conda-forge.yml b/.conda-forge.yml new file mode 100644 index 0000000000..b2eef226db --- /dev/null +++ b/.conda-forge.yml @@ -0,0 +1,48 @@ +# This file defines the configuration for building conda packages with CI. +# The actual files for running the CI are created/updated by "conda-smithy". +# You should edit only this file and the recipe files (in recipe_dir, below) +# and not any of the automatically-generated files in e.g. .ci_support, +# .scripts, or .github/workflows/conda-build.yml. + +# To update the generated conda CI files after a change here or in the recipe, +# or because of updates to conda-smithy, run +# +# conda-smithy rerender --feedstock_config .conda-forge.yml -c auto +# git rm -f .github/workflows/automerge.yml .github/workflows/webservices.yml .circleci/config.yml +# git commit --amend -s +# +# which will automatically commit any changes. +# ***** RUN THE ABOVE TO CHECK FOR UPDATES WHENEVER EDITS ARE MADE HERE ***** + +# The CI will build conda packages for commits and pull requests, and it will +# upload the packages to Anaconda Cloud on commits to the branch specified +# in the configuration below. The channel and label that the packages are +# uploaded to are set in the recipe directory in conda_build_config.yaml. +# Uploads to Anaconda Cloud also require an API token to be set to the +# BINSTAR_TOKEN environment variable. Documentation for token generation: +# https://docs.anaconda.com/anacondaorg/user-guide/tasks/work-with-accounts/#creating-access-tokens +# To populate BINSTAR_TOKEN for CI jobs, add the token as a secret, e.g.: +# https://docs.github.com/en/actions/reference/encrypted-secrets + +# See https://conda-forge.org/docs/maintainer/conda_forge_yml.html for +# documentation on possible keys and values. + +clone_depth: 0 +github_actions: + store_build_artifacts: true +provider: + linux: github_actions + osx: github_actions + win: github_actions +recipe_dir: .packaging/conda_recipe +# skip unnecessary files since this is not a full-fledged conda-forge feedstock +skip_render: + - README.md + - LICENSE.txt + - .gitattributes + - .gitignore + - build-locally.py + - LICENSE +# enable uploads to Anaconda Cloud from specified branches only +# ***** UPDATE THIS FOR MAINTENANCE BRANCHES ******************************** +upload_on_branch: master diff --git a/.packaging/conda_recipe/README b/.packaging/conda_recipe/README new file mode 100644 index 0000000000..d132d2c181 --- /dev/null +++ b/.packaging/conda_recipe/README @@ -0,0 +1,19 @@ +Users +***** + +This recipe is primarily used for CI builds, although it is possible to use it +locally from a checked-out git repository with "conda-build". + +Developers +********** + +CI builds use this recipe and the settings in ../../.conda-forge.yml. Any changes +to the recipe should be accompanied by running + + conda-smithy rerender --feedstock_config .conda-forge.yml -c auto + git rm -f .github/workflows/automerge.yml .github/workflows/webservices.yml .circleci/config.yml + git commit --amend -s + +so that the generated build scripts are updated when necessary. + +Consult the .conda-forge.yml file for additional documentation. diff --git a/.packaging/conda_recipe/bld.bat b/.packaging/conda_recipe/bld.bat new file mode 100644 index 0000000000..de6f13927d --- /dev/null +++ b/.packaging/conda_recipe/bld.bat @@ -0,0 +1,48 @@ +setlocal EnableDelayedExpansion +@echo on + +:: Make a build folder and change to it +cmake -E make_directory build +if errorlevel 1 exit 1 +cd build +if errorlevel 1 exit 1 + +:: configure +cmake -G "Ninja" ^ + -DCMAKE_BUILD_TYPE:STRING=Release ^ + -DCMAKE_INSTALL_PREFIX:PATH="%LIBRARY_PREFIX%" ^ + -DCMAKE_PREFIX_PATH:PATH="%LIBRARY_PREFIX%" ^ + -DPYTHON_EXECUTABLE:PATH="%PYTHON%" ^ + -DGR_PYTHON_DIR:PATH="%SP_DIR%" ^ + .. +if errorlevel 1 exit 1 + +:: build +cmake --build . --config Release -- -j%CPU_COUNT% +if errorlevel 1 exit 1 + +:: install +cmake --build . --config Release --target install +if errorlevel 1 exit 1 + +:: test +set SKIP_TESTS=^ +qa_agc^ +|qa_dtv^ +|qa_fecapi_ldpc^ +|qa_file_descriptor_source_sink^ +|qa_file_sink^ +|qa_file_source^ +|qa_rotator_cc^ +|qa_tcp_server_sink^ +|qa_throttle^ +|qa_wavfile^ +|test_modtool^ +%=EMPTY=% + +ctest --build-config Release --output-on-failure --timeout 120 -j%CPU_COUNT% -E "%SKIP_TESTS%" +if errorlevel 1 exit 1 + +:: now run the skipped tests to see failures, but exit without error anyway +ctest --build-config Release --output-on-failure --timeout 120 -j%CPU_COUNT% -R "%SKIP_TESTS%" +exit 0 diff --git a/.packaging/conda_recipe/build.sh b/.packaging/conda_recipe/build.sh new file mode 100644 index 0000000000..d7ec9a4da9 --- /dev/null +++ b/.packaging/conda_recipe/build.sh @@ -0,0 +1,58 @@ +#!/usr/bin/env bash + +cmake -E make_directory build +cd build + +cmake_config_args=( + -DCMAKE_BUILD_TYPE=Release + -DCMAKE_PREFIX_PATH=$PREFIX + -DCMAKE_INSTALL_PREFIX=$PREFIX + -DLIB_SUFFIX="" + -DPYTHON_EXECUTABLE=$PYTHON + -DGR_PYTHON_DIR=$SP_DIR +) + +cmake -G "Ninja" .. "${cmake_config_args[@]}" +cmake --build . --config Release -- -j${CPU_COUNT} + +cmake --build . --config Release --target install + +if [[ $target_platform == linux* ]] ; then + SKIP_TESTS=( + qa_agc + qa_cpp_py_binding + qa_cpp_py_binding_set + qa_ctrlport_probes + qa_qtgui + qa_rotator_cc + test_modtool + ) +else + SKIP_TESTS=( + qa_add_system_time + qa_agc + qa_block_gateway + qa_cpp_py_binding + qa_cpp_py_binding_set + qa_ctrlport_probes + qa_fecapi_cc + qa_fecapi_dummy + qa_fecapi_ldpc + qa_fecapi_repetition + qa_header_payload_demux + qa_hier_block2 + qa_hier_block2_message_connections + qa_python_message_passing + qa_rotator_cc + qa_tcp_server_sink + qa_throttle + qa_uncaught_exception + test_modtool + ) +fi +SKIP_TESTS_STR=$( IFS="|"; echo "${SKIP_TESTS[*]}" ) + +ctest --build-config Release --output-on-failure --timeout 120 -j${CPU_COUNT} -E $SKIP_TESTS_STR + +# now run the skipped tests to see the failures, but don't error out +ctest --build-config Release --output-on-failure --timeout 120 -j${CPU_COUNT} -R $SKIP_TESTS_STR || exit 0 diff --git a/.packaging/conda_recipe/conda_build_config.yaml b/.packaging/conda_recipe/conda_build_config.yaml new file mode 100644 index 0000000000..be9d99cb3c --- /dev/null +++ b/.packaging/conda_recipe/conda_build_config.yaml @@ -0,0 +1,7 @@ +channel_targets: + - gnuradio main +# need a minimum macOS that is higher than conda-forge default +MACOSX_DEPLOYMENT_TARGET: # [osx and x86_64] + - "10.15" # [osx and x86_64] +MACOSX_SDK_VERSION: # [osx and x86_64] + - "10.15" # [osx and x86_64] diff --git a/.packaging/conda_recipe/meta.yaml b/.packaging/conda_recipe/meta.yaml new file mode 100644 index 0000000000..156789488c --- /dev/null +++ b/.packaging/conda_recipe/meta.yaml @@ -0,0 +1,186 @@ +{% set name = "gnuradio-dev" %} +{% set version = (environ.get('GIT_DESCRIBE_TAG', 'untagged')|string|replace('-','_')|replace('v','')|replace('git','')) + '.dev' + environ.get('GIT_DESCRIBE_NUMBER', '0') + '+' + environ.get('GIT_DESCRIBE_HASH', 'local') %} + +package: + name: {{ name|lower }} + version: {{ version }} + +source: + git_url: {{ environ.get('FEEDSTOCK_ROOT', '../..') }} + +build: + number: 0 + skip: true # [py!=38] + entry_points: + - gnuradio-companion = gnuradio.grc.main:main # [win] + - gr_filter_design = gnuradio.filter.filter_design:main # [win] + - gr_modtool = gnuradio.modtool.cli.base:cli # [win] + - grcc = gnuradio.grc.compiler:main # [win] + - uhd_siggen = gnuradio.uhd.uhd_siggen_base:main # [win] + run_exports: + - {{ pin_subpackage('gnuradio-dev', max_pin='x.x.x') }} + +requirements: + build: + - {{ compiler('c') }} + - {{ compiler('cxx') }} + - cmake >=3.8 + - ninja + - pkg-config # [not win] + # cross-compilation requirements + - python # [build_platform != target_platform] + - cross-python_{{ target_platform }} # [build_platform != target_platform] + - pybind11 # [build_platform != target_platform] + - numpy # [build_platform != target_platform] + # libudev needed to link against libusb through uhd on linux + # libudev is on its own in CentOS 6, packaged with systemd in CentOS 7 + - {{ cdt('libudev-devel') }} # [linux and cdt_name=='cos6'] + - {{ cdt('systemd-devel') }} # [linux and cdt_name=='cos7'] + # below are needed to link with Qt for qtgui + - {{ cdt('libice') }} # [linux] + - {{ cdt('libselinux') }} # [linux] + - {{ cdt('libsm') }} # [linux] + - {{ cdt('libx11') }} # [linux] + - {{ cdt('libxau') }} # [linux] + - {{ cdt('libxcb') }} # [linux] + - {{ cdt('libxdamage') }} # [linux] + - {{ cdt('libxext') }} # [linux] + - {{ cdt('libxfixes') }} # [linux] + - {{ cdt('libxrender') }} # [linux] + - {{ cdt('libxxf86vm') }} # [linux] + - {{ cdt('libuuid') }} # [linux] + - {{ cdt('mesa-dri-drivers') }} # [linux] + - {{ cdt('mesa-libgl-devel') }} # [linux] + host: + - boost-cpp + - click + - click-plugins + # use codec2 1.0.0 because 1.0.1 has header which fails on Windows (complex.h) + - codec2 1.0.0* + - fftw + - gmp # [not win] + - gsl + # blas needed to link with gsl + - libcblas # [linux] + - libsndfile + - libthrift # [not win] + - log4cpp + - mako + - mpir # [win] + - numpy + - pip # [win] + - pybind11 + - pybind11-abi + - python + - thrift # [not win] + - volk + # gnuradio.audio + - alsa-lib # [linux] + - portaudio + # gnuradio companion + - gtk3 + - lxml + - pygobject + - pyyaml + # gnuradio.iio + - libiio + - libad9361-iio + # gnuradio.qtgui + - pyqt + - qt + - qwt <6.2 + # gnuradio.soapy + - soapysdr + # gnuradio.uhd + - uhd + # gnuradio.video_sdl + - sdl + # gnuradio.zeromq + - cppzmq + - zeromq + # below needed only to run tests in host environment + - pyzmq + run: + - __osx >={{ MACOSX_DEPLOYMENT_TARGET|default("10.9") }} # [osx and x86_64] + - boost-cpp + - click + - click-plugins + - fftw + - lxml + - mako + - menuinst # [win] + - numpy + - {{ pin_compatible('portaudio') }} + - pygobject + - pyqt + - python + - pyyaml + - pyzmq + - {{ pin_compatible('qwt', max_pin='x.x') }} + # need setuptools because modtool uses pkg_resources + - setuptools + - thrift # [not win] + run_constrained: + # conflict with the non-dev conda-forge packages + # by constraining to non-existent version + - gnuradio-core ==9999999999 + - gnuradio-grc ==9999999999 + - gnuradio-qtgui ==9999999999 + - gnuradio-soapy ==9999999999 + - gnuradio-uhd ==9999999999 + - gnuradio-video-sdl ==9999999999 + - gnuradio-zeromq ==9999999999 + +test: + commands: + - gnuradio-config-info -v --prefix --sysconfdir --prefsdir --userprefsdir --prefs --builddate --enabled-components --cc --cxx --cflags + - gr_modtool --help + imports: + - gnuradio.analog + - gnuradio.audio + - gnuradio.blocks + - gnuradio.channels + - gnuradio.digital + - gnuradio.dtv + - gnuradio.fec + - gnuradio.fft + - gnuradio.filter + - gnuradio.gr + - gnuradio.iio + - gnuradio.network + - gnuradio.pdu + - gnuradio.qtgui + - gnuradio.soapy + - gnuradio.trellis + - gnuradio.uhd + - gnuradio.video_sdl + - gnuradio.vocoder + - gnuradio.wavelet + - gnuradio.zeromq + - pmt + +about: + home: https://gnuradio.org/ + license: GPL-3.0-or-later + license_file: COPYING + summary: The free and open software radio ecosystem + description: > + GNU Radio is a free software development toolkit that provides the signal + processing runtime and processing blocks to implement software radios using + readily-available, low-cost external RF hardware and commodity processors. + It is widely used in hobbyist, academic and commercial environments to + support wireless communications research as well as to implement real-world + radio systems. + + GNU Radio applications are primarily written using the Python programming + language, while the supplied, performance-critical signal processing path + is implemented in C++ using processor floating point extensions where + available. Thus, the developer is able to implement real-time, high- + throughput radio systems in a simple-to-use, rapid-application-development + environment. + doc_url: https://gnuradio.org/doc/doxygen/ + dev_url: https://github.com/gnuradio/gnuradio + +extra: + recipe-maintainers: + - ryanvolz diff --git a/.packaging/conda_recipe/yum_requirements.txt b/.packaging/conda_recipe/yum_requirements.txt new file mode 100644 index 0000000000..73d0ccb85a --- /dev/null +++ b/.packaging/conda_recipe/yum_requirements.txt @@ -0,0 +1,14 @@ +mesa-libGL +mesa-dri-drivers +libselinux +libudev +libX11 +libXcomposite +libXcursor +libXdamage +libXext +libXfixes +libXi +libXinerama +libXrandr +libXxf86vm |