Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to add matlab to github actions #334

Merged
merged 22 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 0 additions & 61 deletions .github/workflows/run_codecoverage.yml

This file was deleted.

93 changes: 93 additions & 0 deletions .github/workflows/run_matlab_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Run the Matlab tests

on:
release:
types: [published]

env:
BUILD_FOLDER: build
EXAMPLES_FOLDER: examples

jobs:
build:
strategy:
matrix:
include:
- os: ubuntu-22.04
label: linux-64
prefix: /usr/share/miniconda3/envs/ezc3d
name: ${{ matrix.label }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v1
id: cpu-cores

# - name: Setup environment
# uses: conda-incubator/setup-miniconda@v2
# with:
# miniforge-variant: Mambaforge
# miniforge-version: latest
# use-mamba: true

# - name: Print mamba info
# run: |
# mamba info
# mamba list

# - name: Install dependencies
# run: |
# mamba install cmake git pkgconfig -cconda-forge
# mamba list
# git submodule update --init --recursive

# - name: Install MATLAB
# uses: matlab-actions/setup-matlab@v2

# - name: Build ezc3d
# run: |
# MAIN_FOLDER=`pwd`
# cd
# HOME=`pwd`
# cd $MAIN_FOLDER
# 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 ..
# make install -j${{ steps.cpu-cores.outputs.count }}
# cd $MAIN_FOLDER

# - name: Run the MATLAB binder tests
# run: |
# MAIN_FOLDER=`pwd`
# cd
# HOME=`pwd`
# cd $MAIN_FOLDER/test/matlab
# cp $HOME/ezc3d_matlab/* .
# # We cannot run the tests as we do not have a license. They are however run on octave
# # matlab -batch test_binder_matlab.m
# # matlab -batch test_binder_matlab_force_platform.m
# cd $MAIN_FOLDER

# - name: Build MATLAB archives
# run: |
# zip -r ezc3d_matlab.zip $HOME/ezc3d_matlab
- name: Build MATLAB archives
run: |
zip -r ezc3d_matlab.zip README.md

- name: Upload files to a GitHub release
uses: xresloader/upload-to-github-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file: "ezc3d_matlab.zip"
update_latest_release: true
verbose: true
overwrite: true
72 changes: 0 additions & 72 deletions .github/workflows/run_octave_tests.yml

This file was deleted.

109 changes: 0 additions & 109 deletions .github/workflows/run_tests.yml

This file was deleted.