Skip to content

Commit

Permalink
ci: Use matrix instead of env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisv committed May 21, 2024
1 parent 57071cc commit a52ec40
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/ci-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ jobs:
fail-fast: true
matrix:
os: [windows-2019]
compiler: [cl, clang-cl]
compiler:
- cmd: cl
cppad_codegen: OFF
- cmd: clang-cl
cppad_codegen: ON

steps:
- uses: actions/checkout@v4
Expand All @@ -33,17 +37,16 @@ jobs:
auto-activate-base: false

- name: Setup cppad codegen
if: contains(matrix.compiler, 'clang')
if: contains(matrix.compiler.cmd, 'clang')
shell: cmd /C CALL {0}
run: |
conda install cppadcodegen
echo "BUILD_CPPAD_CODEGEN=ON" >> "$GITHUB_ENV"
- name: Build PyCppAD
shell: cmd /C CALL {0}
env:
CC: ${{ matrix.compiler }}
CXX: ${{ matrix.compiler }}
CC: ${{ matrix.compiler.cmd }}
CXX: ${{ matrix.compiler.cmd }}
run: |
:: Create build directory
mkdir build
Expand All @@ -56,7 +59,7 @@ jobs:
-DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX%\Library ^
-DPYTHON_SITELIB=%CONDA_PREFIX%\Lib\site-packages ^
-DPYTHON_EXECUTABLE=%CONDA_PREFIX%\python.exe ^
-DBUILD_WITH_CPPAD_CODEGEN_BINDINGS=%BUILD_CPPAD_CODEGEN% ^
-DBUILD_WITH_CPPAD_CODEGEN_BINDINGS=${{ matrix.compiler.cppad_codegen }} ^
..
:: Build
Expand Down

0 comments on commit a52ec40

Please sign in to comment.