From a1a81c1f67572cad172b16806bae8583155e4d55 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 6 Apr 2022 14:38:33 +0200 Subject: [PATCH 1/8] Add CI with conda-forge-provided dependencies --- .github/workflows/conda-forge-ci.yml | 90 ++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 .github/workflows/conda-forge-ci.yml diff --git a/.github/workflows/conda-forge-ci.yml b/.github/workflows/conda-forge-ci.yml new file mode 100644 index 00000000..d9a2ccd8 --- /dev/null +++ b/.github/workflows/conda-forge-ci.yml @@ -0,0 +1,90 @@ +name: C++ CI Workflow with conda-forge dependencies + +on: + push: + branches: + - master + pull_request: + schedule: + # * is a special character in YAML so you have to quote this string + # Execute a "nightly" build at 2 AM UTC + - cron: '0 2 * * *' + +jobs: + build: + name: '[${{ matrix.os }}@${{ matrix.build_type }}@conda]' + runs-on: ${{ matrix.os }} + strategy: + matrix: + build_type: [Release] + os: [ubuntu-latest, windows-latest, macos-latest] + fail-fast: false + + steps: + - uses: actions/checkout@v2 + + - uses: conda-incubator/setup-miniconda@v2 + with: + mamba-version: "*" + channels: conda-forge + channel-priority: true + + - name: Dependencies + shell: bash -l {0} + run: | + # Workaround for https://github.com/conda-incubator/setup-miniconda/issues/186 + conda config --remove channels defaults + # Compilation related dependencies + mamba install cmake compilers make ninja pkg-config + + - name: Windows-only Dependencies [Windows] + if: contains(matrix.os, 'windows') + shell: bash -l {0} + run: | + # Compilation related dependencies + mamba install vs2019_win-64 + + - name: Configure [Linux&macOS] + if: contains(matrix.os, 'macos') || contains(matrix.os, 'ubuntu') + shell: bash -l {0} + run: | + mkdir -p build + cd build + cmake -GNinja -DBUILD_TESTING:BOOL=ON -DFRAMEWORK_COMPILE_IK:BOOL=OFF \ + -DFRAMEWORK_COMPILE_PYTHON_BINDINGS:BOOL=ON -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} .. + + - name: Build [Linux&macOS] + if: contains(matrix.os, 'macos') || contains(matrix.os, 'ubuntu') + shell: bash -l {0} + run: | + cd build + cmake --build . --config ${{ matrix.build_type }} + + - name: Test [Linux&macOS] + if: contains(matrix.os, 'macos') || contains(matrix.os, 'ubuntu') + shell: bash -l {0} + run: | + cd build + ctest --output-on-failure -C ${{ matrix.build_type }} + + - name: Configure [Windows] + if: contains(matrix.os, 'windows') + shell: cmd /C call {0} + run: | + mkdir -p build + cd build + cmake -GNinja -DBUILD_TESTING:BOOL=ON -DFRAMEWORK_COMPILE_PYTHON_BINDINGS:BOOL=ON -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} .. + + - name: Build [Windows] + if: contains(matrix.os, 'windows') + shell: cmd /C call {0} + run: | + cd build + cmake --build . --config ${{ matrix.build_type }} + + - name: Test [Windows] + if: contains(matrix.os, 'windows') + shell: cmd /C call {0} + run: | + cd build + ctest --output-on-failure -C ${{ matrix.build_type }} From fc0bab2015db0a1c7856e71240a8399614d2764a Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 6 Apr 2022 14:43:31 +0200 Subject: [PATCH 2/8] Update conda-forge-ci.yml --- .github/workflows/conda-forge-ci.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/conda-forge-ci.yml b/.github/workflows/conda-forge-ci.yml index d9a2ccd8..a2e3a816 100644 --- a/.github/workflows/conda-forge-ci.yml +++ b/.github/workflows/conda-forge-ci.yml @@ -17,7 +17,8 @@ jobs: strategy: matrix: build_type: [Release] - os: [ubuntu-latest, windows-latest, macos-latest] + os: [ubuntu-latest, windows-2019, macos-latest] + cmake_version: ["3.16","3.18","3.21","3.23","latest"] fail-fast: false steps: @@ -35,7 +36,19 @@ jobs: # Workaround for https://github.com/conda-incubator/setup-miniconda/issues/186 conda config --remove channels defaults # Compilation related dependencies - mamba install cmake compilers make ninja pkg-config + mamba install compilers make ninja pkg-config + + - name: CMake (Latest) + shell: bash -l {0} + if: contains(matrix.cmake_version, 'latest') + run: | + mamba install cmake + + - name: CMake (Specified Version) + shell: bash -l {0} + if: !contains(matrix.cmake_version, 'latest') + run: | + mamba install cmake=${{ matrix.cmake_version }} - name: Windows-only Dependencies [Windows] if: contains(matrix.os, 'windows') From 70a6077386989f10138089a74f625b6b3f07935c Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 6 Apr 2022 14:44:52 +0200 Subject: [PATCH 3/8] Update conda-forge-ci.yml --- .github/workflows/conda-forge-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/conda-forge-ci.yml b/.github/workflows/conda-forge-ci.yml index a2e3a816..20d41ad5 100644 --- a/.github/workflows/conda-forge-ci.yml +++ b/.github/workflows/conda-forge-ci.yml @@ -78,7 +78,7 @@ jobs: shell: bash -l {0} run: | cd build - ctest --output-on-failure -C ${{ matrix.build_type }} + ctest --output-on-failure -C ${{ matrix.build_type }} -E "Bootstrap" - name: Configure [Windows] if: contains(matrix.os, 'windows') @@ -100,4 +100,4 @@ jobs: shell: cmd /C call {0} run: | cd build - ctest --output-on-failure -C ${{ matrix.build_type }} + ctest --output-on-failure -C ${{ matrix.build_type }} -E "Bootstrap" From 5f30b49184203885d4447f58e85b6920f22d1579 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 6 Apr 2022 14:48:07 +0200 Subject: [PATCH 4/8] Update conda-forge-ci.yml --- .github/workflows/conda-forge-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/conda-forge-ci.yml b/.github/workflows/conda-forge-ci.yml index 20d41ad5..a43ebaa2 100644 --- a/.github/workflows/conda-forge-ci.yml +++ b/.github/workflows/conda-forge-ci.yml @@ -38,15 +38,15 @@ jobs: # Compilation related dependencies mamba install compilers make ninja pkg-config - - name: CMake (Latest) + - name: CMake [Latest] shell: bash -l {0} if: contains(matrix.cmake_version, 'latest') run: | mamba install cmake - - name: CMake (Specified Version) + - name: CMake [Specified Version[ shell: bash -l {0} - if: !contains(matrix.cmake_version, 'latest') + if: not(contains(matrix.cmake_version, 'latest')) run: | mamba install cmake=${{ matrix.cmake_version }} From 02edb09ebefcc22d64ca4987c58a2d3571288610 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 6 Apr 2022 14:49:22 +0200 Subject: [PATCH 5/8] Update conda-forge-ci.yml --- .github/workflows/conda-forge-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/conda-forge-ci.yml b/.github/workflows/conda-forge-ci.yml index a43ebaa2..b70b1626 100644 --- a/.github/workflows/conda-forge-ci.yml +++ b/.github/workflows/conda-forge-ci.yml @@ -46,7 +46,7 @@ jobs: - name: CMake [Specified Version[ shell: bash -l {0} - if: not(contains(matrix.cmake_version, 'latest')) + if: !(contains(matrix.cmake_version, 'latest')) run: | mamba install cmake=${{ matrix.cmake_version }} From a473f9b65b931b1e7a51415f97e68fcbee1e1b50 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 6 Apr 2022 14:50:31 +0200 Subject: [PATCH 6/8] Update conda-forge-ci.yml --- .github/workflows/conda-forge-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/conda-forge-ci.yml b/.github/workflows/conda-forge-ci.yml index b70b1626..f6542df7 100644 --- a/.github/workflows/conda-forge-ci.yml +++ b/.github/workflows/conda-forge-ci.yml @@ -44,9 +44,9 @@ jobs: run: | mamba install cmake - - name: CMake [Specified Version[ + - name: CMake [Specified Version] shell: bash -l {0} - if: !(contains(matrix.cmake_version, 'latest')) + #if: !(contains(matrix.cmake_version, 'latest')) run: | mamba install cmake=${{ matrix.cmake_version }} From 6a70d0074657f87a2fc2f2c7b12554ce6a54d89f Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 6 Apr 2022 14:51:36 +0200 Subject: [PATCH 7/8] Update conda-forge-ci.yml --- .github/workflows/conda-forge-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/conda-forge-ci.yml b/.github/workflows/conda-forge-ci.yml index f6542df7..b409e6f3 100644 --- a/.github/workflows/conda-forge-ci.yml +++ b/.github/workflows/conda-forge-ci.yml @@ -40,13 +40,13 @@ jobs: - name: CMake [Latest] shell: bash -l {0} - if: contains(matrix.cmake_version, 'latest') + if: matrix.cmake_version == 'latest' run: | mamba install cmake - name: CMake [Specified Version] shell: bash -l {0} - #if: !(contains(matrix.cmake_version, 'latest')) + if: matrix.cmake_version != 'latest' run: | mamba install cmake=${{ matrix.cmake_version }} From 0870eb3e552b339af2fdfaca63a9f58704c2766c Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Wed, 6 Apr 2022 14:52:12 +0200 Subject: [PATCH 8/8] Update conda-forge-ci.yml --- .github/workflows/conda-forge-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/conda-forge-ci.yml b/.github/workflows/conda-forge-ci.yml index b409e6f3..5b93fe7f 100644 --- a/.github/workflows/conda-forge-ci.yml +++ b/.github/workflows/conda-forge-ci.yml @@ -12,7 +12,6 @@ on: jobs: build: - name: '[${{ matrix.os }}@${{ matrix.build_type }}@conda]' runs-on: ${{ matrix.os }} strategy: matrix: