Skip to content

Commit

Permalink
Finished push binary action
Browse files Browse the repository at this point in the history
  • Loading branch information
pariterre committed Aug 12, 2024
1 parent 46388b4 commit 36bc382
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 20 deletions.
43 changes: 28 additions & 15 deletions .github/workflows/publish_matlab_binaries.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
name: Run the Matlab tests
name: Publish MATLAB binaries

on: [pull_request]
on:
release:
types: [published]

env:
BUILD_FOLDER: build
EXAMPLES_FOLDER: examples


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

- name: Build ezc3d
run: |
Expand All @@ -57,17 +67,20 @@ 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_SHARED_LIBS=OFF -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 ..
make install -j${{ steps.cpu-cores.outputs.count }}
cd $MAIN_FOLDER
- name: Run the Matlab binder tests
- name: Build MATLAB archives
run: |
MAIN_FOLDER=`pwd`
cd
HOME=`pwd`
cd $MAIN_FOLDER/test/matlab
cp $HOME/ezc3d_matlab/* .
matlab test_binder_matlab.m
matlab test_binder_matlab_force_platform.m
cd $MAIN_FOLDER
zip -r ezc3d_matlab.zip $HOME/ezc3d_matlab
- name: Upload files to a GitHub release
uses: xresloader/upload-to-github-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file: "ezc3d_matlab_${{ matrix.label }}_${{ matrix.version }}.zip"
update_latest_release: true
verbose: true
overwrite: true
2 changes: 1 addition & 1 deletion .github/workflows/run_codecoverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
include:
- os: ubuntu-20.04
- os: ubuntu-latest
label: linux-64
prefix: /usr/share/miniconda3/envs/biorbd_eigen
name: ${{ matrix.label }}
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/run_matlab_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,16 @@ jobs:
strategy:
matrix:
include:
- os: ubuntu-22.04
- os: ubuntu-latest
label: linux-64
prefix: /usr/share/miniconda3/envs/ezc3d
- os: macos-latest
label: osx-64
prefix: /Users/runner/miniconda3/envs/ezc3d
- os: windows-latest
label: win-64
prefix: C:\Miniconda3\envs\ezc3d
- version: [R2021b, R2022a, R2022b, R2023a, R2023b, R2024a]
name: ${{ matrix.label }}
runs-on: ${{ matrix.os }}
defaults:
Expand Down Expand Up @@ -57,7 +64,7 @@ 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_SHARED_LIBS=OFF -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=ON -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run_octave_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
include:
- os: ubuntu-20.04
- os: ubuntu-latest
label: linux-64
prefix: /usr/share/miniconda3/envs/ezc3d
- os: macos-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
include:
- os: ubuntu-20.04
- os: ubuntu-latest
label: linux-64
prefix: /usr/share/miniconda3/envs/ezc3d
- os: macos-latest
Expand Down

0 comments on commit 36bc382

Please sign in to comment.