Skip to content

- issue 3221: add test case #526

- issue 3221: add test case

- issue 3221: add test case #526

Workflow file for this run

name: Build and Test
on:
push:
paths:
- "**"
- "!.github/**"
- ".github/workflows/copasi_se.yml"
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build:
name:
${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
- uses: seanmiddleditch/gha-setup-ninja@master
- name: Add msbuild to PATH (Windows)
if: matrix.platform == 'windows-latest'
uses: ilammy/msvc-dev-cmd@v1.6.0
- name: Create Build Environment
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
shell: bash
run: |
cmake --version
curl -L https://github.com/copasi/copasi-dependencies/releases/latest/download/${{ matrix.platform }}.zip -o ${{ matrix.platform }}.zip
unzip -n -qq ${{ matrix.platform }}.zip -d dependencies
- name: Patch dependencies (windows)
shell: bash
if: matrix.platform == 'windows-latest'
working-directory: ${{github.workspace}}/dependencies/lib/cmake
run: |
sed -i 's|D:/a/copasi-dependencies/copasi-dependencies/install/|${_IMPORT_PREFIX}/|g' *.cmake
- name: Patch dependencies (ubuntu)
shell: bash
if: matrix.platform == 'ubuntu-latest'
working-directory: ${{github.workspace}}/dependencies/lib/cmake
run: |
sed -i 's|/home/runner/work/copasi-dependencies/copasi-dependencies/install/|${_IMPORT_PREFIX}/|g' *.cmake
- name: Patch dependencies (mac)
shell: bash
if: matrix.platform == 'macos-latest'
working-directory: ${{github.workspace}}/dependencies/lib/cmake
run: |
sed -i '.tmp' 's|/Users/runner/work/copasi-dependencies/copasi-dependencies/install/|${_IMPORT_PREFIX}/|g' *.cmake
rm lapack*
rm ../libblas.a
rm ../liblapack.a
rm ../libf2c.a
rm ../../include/clapack.h
rm ../../include/lapack.h
rm ../../include/blaswrap.h
rm ../../include/f2c.h
- name: Update COPASI Version
shell: bash
working-directory: ${{github.workspace}}
run: ./gitTools/UpdateCopasiVersion
- name: Download SBML Test Suite cases
shell: bash
working-directory: ${{github.workspace}}
run: |
curl -L http://bqfrank.spdns.org/Files/test-suite.zip -o test-suite.zip
unzip -n -qq test-suite.zip
- name: Configure COPASI
shell: bash
run: |
cmake -G Ninja -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCOPASI_INSTALL_C_API=ON -DSBML_TESTSUITE_RUN=ON -DBUILD_TESTS=ON -DBUILD_GUI=OFF -DCOPASI_DEPENDENCY_DIR=./dependencies/ -DCMAKE_INSTALL_PREFIX=./install/ -DBUILD_SBML_TESTSUITE:BOOL=ON -DSBML_TESTSUITE_CASES_DIR:PATH=$PWD/test-suite -S . -B ./build_copasi
- name: Build COPASI
shell: bash
working-directory: ${{github.workspace}}/build_copasi
run: cmake --build . --config $BUILD_TYPE
- name: Install COPASI
shell: bash
working-directory: ${{github.workspace}}/build_copasi
run: cmake --build . --config $BUILD_TYPE --target install
- name: Test
working-directory: ${{github.workspace}}/build_copasi
shell: bash
run: ctest -C $BUILD_TYPE -V
- name: binary archive
uses: actions/upload-artifact@v2
with:
name:
copasi-se-${{ matrix.platform }}
path: ${{github.workspace}}/install/*
retention-days: 10
if-no-files-found: error