From e024f2428f37c5c0bfcc104f6073f8592aefadb8 Mon Sep 17 00:00:00 2001 From: ssun30 Date: Wed, 7 Jun 2023 22:23:24 -0400 Subject: [PATCH] Add Run Matlab Test Script to CI workflow --- .github/workflows/main.yml | 40 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 15d6ba4502..f855227a02 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,6 +9,7 @@ on: branches: - main - testing + - matlab_tests pull_request: # Build when a pull request targets main branches: @@ -19,6 +20,45 @@ concurrency: cancel-in-progress: true jobs: + matlab-test: + name: Run MATLAB Test Script + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + name: Checkout the repository + with: + submodules: recursive + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: '3.10' + architecture: x64 + - name: Install Apt dependencies + run: | + sudo apt update + sudo apt install libboost-dev gfortran libopenmpi-dev libpython3-dev \ + libblas-dev liblapack-dev libhdf5-dev + gcc --version + - name: Upgrade pip + run: python3 -m pip install -U pip setuptools wheel + - name: Install Python dependencies + # h5py is optional; some versions don't have binaries (yet) + run: | + python3 -m pip install ruamel.yaml scons==3.1.2 numpy cython pandas pytest \ + pytest-github-actions-annotate-failures pint + python3 -m pip install h5py + - name: Build Cantera + run: | + python3 `which scons` build env_vars=all -j2 debug=n --debug=time \ + hdf_libdir=$HDF5_LIBDIR hdf_include=$HDF5_INCLUDEDIR \ + cc_flags=-D_GLIBCXX_ASSERTIONS + - name: Set up MATLAB + uses: matlab-actions/setup-matlab@v1 + - name: Run script + uses: matlab-actions/run-command@v1 + with: + command: cd ~/work/cantera/cantera; addpath([pwd, '/test/matlab_experimental']); ctRunTests; + ubuntu-multiple-pythons: name: ${{ matrix.os }} with Python ${{ matrix.python-version }} runs-on: ${{ matrix.os }}