forked from NeuroJSON/zmat
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
82 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: ZMat CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
octave_test: | ||
name: Octave tests | ||
strategy: | ||
# provided octave versions: ubuntu-20.04 = 5.2, ubuntu-22.04 = 6.4, macos-11 = 8.1, windows-2019 = 7.3 | ||
matrix: | ||
os: [ubuntu-20.04, ubuntu-22.04, macos-11, windows-2019] | ||
runs-on: ${{ matrix.os }} | ||
defaults: | ||
run: | ||
shell: bash | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: 'recursive' | ||
- name: Install dependencies | ||
run: | | ||
[[ "$RUNNER_OS" == "Linux" ]] && sudo apt-get update && sudo apt-get install -y octave | ||
[[ "$RUNNER_OS" == "macOS" ]] && brew install octave | ||
if [[ "$RUNNER_OS" == "Windows" ]]; then | ||
curl --retry 3 -kL http://cdimage.debian.org/mirror/gnu.org/gnu/octave/windows/octave-7.3.0-w64-64.7z --output octave_7.3.0.7z | ||
7z x octave_7.3.0.7z -ooctave -y | ||
echo "$PWD/octave/octave-7.3.0-w64-64/mingw64/bin" >> $GITHUB_PATH | ||
fi | ||
- name: Build static library | ||
run: | | ||
make -C src lib | ||
make -C example/c all LIBTYPE= | ||
if [ "$TRAVIS_OS_NAME" = "macOS" ]; then | ||
DYLD_LIBRARY_PATH=lib example/c/testzmat; | ||
else | ||
LD_LIBRARY_PATH=lib example/c/testzmat; | ||
fi | ||
- name: Build dynamic library | ||
run: | | ||
make -C src dll | ||
make -C example/c all LIBTYPE= | ||
if [ "$RUNNER_OS" = "macOS" ]; then | ||
DYLD_LIBRARY_PATH=lib example/c/testzmat; | ||
else | ||
LD_LIBRARY_PATH=lib example/c/testzmat; | ||
fi | ||
- name: Build octave mex | ||
run: | | ||
make -C src oct; | ||
- name: Run octave test | ||
run: | | ||
octave-cli --version | ||
octave-cli --eval "addpath(pwd);cd test;run_zmat_test"; | ||
matlab_test: | ||
name: MATLAB test | ||
strategy: | ||
matrix: | ||
os: [ubuntu-20.04, macos-11, windows-2019] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: 'recursive' | ||
- name: Set up MATLAB | ||
uses: matlab-actions/setup-matlab@v1 | ||
- name: Build octave mex | ||
run: | | ||
make -C src mex; | ||
- name: Run MATLAB examples | ||
uses: matlab-actions/run-command@v1 | ||
with: | ||
command: addpath(pwd);cd test;run_zmat_test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters