-
Notifications
You must be signed in to change notification settings - Fork 29
119 lines (100 loc) · 4.14 KB
/
copasi_se.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
name: Build and Test
on:
workflow_dispatch:
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@v4
- 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 (mac)
shell: bash
if: matrix.platform == 'macos-latest'
run: |
cmake -G Ninja -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCOPASI_INSTALL_C_API=ON -DSBML_TESTSUITE_RUN=ON -DBUILD_TESTS=ON -DBUILD_GUI=OFF -DENABLE_JIT=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: Configure COPASI
shell: bash
if: matrix.platform != 'macos-latest'
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@v4
with:
name:
copasi-se-${{ matrix.platform }}
path: ${{github.workspace}}/install/*
retention-days: 10
if-no-files-found: error