Skip to content

Commit

Permalink
Fixing github action matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
pariterre committed Aug 12, 2024
1 parent 36bc382 commit d9026b1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
24 changes: 19 additions & 5 deletions .github/workflows/run_matlab_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,24 @@ on: [pull_request]

env:
BUILD_FOLDER: build
EXAMPLES_FOLDER: examples

jobs:
build:
strategy:
matrix:
version: [R2021b, R2022a, R2022b, R2023a, R2023b, R2024a]
include:
- os: ubuntu-latest
label: linux-64
prefix: /usr/share/miniconda3/envs/ezc3d
- os: macos-latest
label: osx-64
prefix: /Users/runner/miniconda3/envs/ezc3d
version: [R2021b, R2022a, R2022b, R2023a, R2024a]
- os: windows-latest
label: win-64
prefix: C:\Miniconda3\envs\ezc3d
- version: [R2021b, R2022a, R2022b, R2023a, R2023b, R2024a]
name: ${{ matrix.label }}
name: ${{ matrix.label }}_${{ matrix.version }}
runs-on: ${{ matrix.os }}
defaults:
run:
Expand Down Expand Up @@ -54,8 +54,10 @@ jobs:
- name: Install MATLAB
uses: matlab-actions/setup-matlab@v2
with:
release: ${{ matrix.version }}

- name: Build ezc3d
- name: Build ezc3d on UNIX
run: |
MAIN_FOLDER=`pwd`
cd
Expand All @@ -64,9 +66,21 @@ jobs:
CONDA_ENV_PATH=$CONDA/envs/ezc3d
mkdir -p $MAIN_FOLDER/$BUILD_FOLDER
cd $MAIN_FOLDER/$BUILD_FOLDER
cmake -DCMAKE_INSTALL_PREFIX=$CONDA_ENV_PATH -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=ON -DBUILD_DOC=OFF -DBUILD_EXAMPLE=OFF -DUSE_MATRIX_FAST_ACCESSOR=OFF -DBINDER_MATLAB=ON -DMatlab_ezc3d_INSTALL_DIR=$HOME -DBINDER_PYTHON3=OFF ..
cmake -DCMAKE_INSTALL_PREFIX=$CONDA_ENV_PATH -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=OFF -DBUILD_DOC=OFF -DBUILD_EXAMPLE=OFF -DUSE_MATRIX_FAST_ACCESSOR=OFF -DBINDER_MATLAB=ON -DMatlab_ezc3d_INSTALL_DIR=$HOME -DBINDER_PYTHON3=OFF ..
make install -j${{ steps.cpu-cores.outputs.count }}
cd $MAIN_FOLDER
if: matrix.label != 'win-64'

- name: Build ezc3d on WINDOWS
run: |
MAIN_FOLDER=`pwd`
CONDA_ENV_PATH=$CONDA/envs/ezc3d
mkdir -p $BUILD_FOLDER
cd $BUILD_FOLDER
cmake -G"Visual Studio 17 2022" -Ax64 -DCMAKE_INSTALL_PREFIX=$CONDA_ENV_PATH -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=OFF -DBUILD_DOC=OFF -DBUILD_EXAMPLE=OFF -DUSE_MATRIX_FAST_ACCESSOR=OFF -DBINDER_MATLAB=ON -DMatlab_ezc3d_INSTALL_DIR=$HOME -DBINDER_PYTHON3=OFF ..
cmake --build . --config Release --target install -j${{ steps.cpu-cores.outputs.count }}
cd $MAIN_FOLDER
if: matrix.label == 'win-64'

- name: Run the MATLAB binder tests
run: |
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ jobs:
- name: Build ezc3d WINDOWS
run: |
MAIN_FOLDER=`pwd`
echo ${{ matrix.prefix }}
CONDA_ENV_PATH=$CONDA/envs/ezc3d
mkdir -p $BUILD_FOLDER
cd $BUILD_FOLDER
Expand Down

0 comments on commit d9026b1

Please sign in to comment.