try to fix matrix a different way

This commit is contained in:
Alec Jacobson
2023-02-10 21:47:52 -05:00
parent 52df69ac39
commit 7489d2b601
+12 -30
View File
@@ -20,23 +20,14 @@ jobs:
####################
Unix:
name: ${{ matrix.os }} ${{ matrix.config }} ${{ fromJSON('["HeaderOnly", "Static"]')[matrix.static == 'ON'] }} ${{ matrix.tutorial == 'ON' && 'tutorial' || ''}} ${{ matrix.tests == 'OFF' && 'tests' || ''}}
name: ${{ matrix.os }} ${{ matrix.config }} ${{ fromJSON('["HeaderOnly", "Static"]')[matrix.build-params.static == 'ON'] }} ${{ matrix.build-params.tutorial == 'ON' && 'tutorial' || ''}} ${{ matrix.build-params.tests == 'OFF' && 'tests' || ''}}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, macos-latest]
config: [Release]
include:
- static: ON
tutorial: ON
tests: ON
- static: OFF
tutorial: OFF
tests: ON
- static: OFF
tutorial: ON
tests: OFF
build-params: [ {static: ON, tutorial: ON, tests: ON }, {static: OFF, tutorial: OFF, tests: ON }, {static: OFF, tutorial: ON, tests: OFF }]
env:
IGL_NUM_THREADS: 1 # See https://github.com/libigl/libigl/pull/996
steps:
@@ -66,7 +57,7 @@ jobs:
uses: actions/cache@v2
with:
path: ~/.ccache
key: ${{ runner.os }}-${{ matrix.config }}-${{ matrix.static }}-cache
key: ${{ runner.os }}-${{ matrix.config }}-${{ matrix.build-params.static }}-cache
- name: Prepare ccache
run: |
@@ -80,9 +71,9 @@ jobs:
cmake .. \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_BUILD_TYPE=${{ matrix.config }} \
-DLIBIGL_USE_STATIC_LIBRARY=${{ matrix.static }} \
-DLIBIGL_BUILD_TUTORIAL=${{ matrix.tutorial }} \
-DLIBIGL_BUILD_TESTS=${{ matrix.tests }} \
-DLIBIGL_USE_STATIC_LIBRARY=${{ matrix.build-params.static }} \
-DLIBIGL_BUILD_TUTORIAL=${{ matrix.build-params.tutorial }} \
-DLIBIGL_BUILD_TESTS=${{ matrix.build-params.tests }} \
-DLIBIGL_COPYLEFT_CGAL=ON
- name: Build
@@ -96,22 +87,13 @@ jobs:
####################
Windows:
name: Windows ${{ matrix.config }} ${{ fromJSON('["HeaderOnly", "Static"]')[matrix.static == 'ON'] }} ${{ matrix.tutorial == 'ON' && 'tutorial' || ''}} ${{ matrix.tests == 'OFF' && 'tests' || ''}}
name: Windows ${{ matrix.config }} ${{ fromJSON('["HeaderOnly", "Static"]')[matrix.build-params.static == 'ON'] }} ${{ matrix.build-params.tutorial == 'ON' && 'tutorial' || ''}} ${{ matrix.build-params.tests == 'OFF' && 'tests' || ''}}
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
config: [Release]
include:
- static: ON
tutorial: ON
tests: ON
- static: OFF
tutorial: OFF
tests: ON
- static: OFF
tutorial: ON
tests: OFF
build-params: [ {static: ON, tutorial: ON, tests: ON }, {static: OFF, tutorial: OFF, tests: ON }, {static: OFF, tutorial: ON, tests: OFF }]
steps:
- name: Checkout repository
uses: actions/checkout@v1
@@ -130,7 +112,7 @@ jobs:
uses: actions/cache@v2
with:
path: ${{ env.appdata }}\Mozilla\sccache
key: ${{ runner.os }}-${{ matrix.config }}-${{ matrix.static }}-cache
key: ${{ runner.os }}-${{ matrix.config }}-${{ matrix.build-params.static }}-cache
- name: Prepare sccache
run: |
@@ -147,10 +129,10 @@ jobs:
cmake -G Ninja ^
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache ^
-DCMAKE_BUILD_TYPE=${{ matrix.config }} ^
-DLIBIGL_USE_STATIC_LIBRARY=${{ matrix.static }} ^
-DLIBIGL_USE_STATIC_LIBRARY=${{ matrix.build-params.static }} ^
-DLIBIGL_COPYLEFT_CGAL=ON ^
-DLIBIGL_BUILD_TUTORIAL=${{ matrix.tutorial }} ^
-DLIBIGL_BUILD_TESTS=${{ matrix.tests }} ^
-DLIBIGL_BUILD_TUTORIAL=${{ matrix.build-params.tutorial }} ^
-DLIBIGL_BUILD_TESTS=${{ matrix.build-params.tests }} ^
-B build ^
-S .
cmake --build build -j1