Skip to content

Commit 22722e7

Browse files
authored
Merge branch 'develop' into check_grad_sbml_test_suite
2 parents cf34778 + 32730f0 commit 22722e7

30 files changed

+352
-147
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Install apt dependencies
2+
description: Install apt dependencies for the AMICI Python package
3+
runs:
4+
using: "composite"
5+
steps:
6+
- run: |
7+
sudo apt-get update \
8+
&& sudo apt-get install -y \
9+
g++ \
10+
libatlas-base-dev \
11+
libboost-chrono-dev \
12+
libboost-math-dev \
13+
libboost-serialization-dev \
14+
libhdf5-serial-dev \
15+
swig
16+
shell: bash
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Set up doxygen
2+
description: |
3+
Download, build, and install doxygen.
4+
5+
runs:
6+
using: "composite"
7+
steps:
8+
- name: Install apt dependencies for doxygen
9+
run: |
10+
sudo apt-get update \
11+
&& sudo apt-get install -y \
12+
bison \
13+
ragel \
14+
graphviz \
15+
texlive-latex-extra
16+
shell: bash
17+
18+
- name: Download and build doxygen
19+
run: sudo scripts/downloadAndBuildDoxygen.sh
20+
shell: bash
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Set up Sonar tools
2+
description: Download and install sonar-scanner and build-wrapper
3+
runs:
4+
using: "composite"
5+
steps:
6+
- run: echo "SONAR_SCANNER_VERSION=5.0.1.3006" >> $GITHUB_ENV
7+
shell: bash
8+
- run: echo "SONAR_SCANNER_HOME=${HOME}/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux" >> $GITHUB_ENV
9+
shell: bash
10+
- run: echo "SONAR_SCANNER_OPTS=-server" >> $GITHUB_ENV
11+
shell: bash
12+
- run: echo "${SONAR_SCANNER_HOME}/bin" >> $GITHUB_PATH
13+
shell: bash
14+
- run: echo "${HOME}/.sonar/build-wrapper-linux-x86" >> $GITHUB_PATH
15+
shell: bash
16+
17+
- name: Install sonarcloud tools
18+
run: |
19+
sudo apt-get install nodejs curl unzip \
20+
&& curl --create-dirs -sSLo $HOME/.sonar/sonar-scanner.zip \
21+
https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux.zip \
22+
&& unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/ \
23+
&& curl --create-dirs -sSLo $HOME/.sonar/build-wrapper-linux-x86.zip \
24+
https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip \
25+
&& unzip -o $HOME/.sonar/build-wrapper-linux-x86.zip -d $HOME/.sonar/ \
26+
shell: bash
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Set up SWIG
2+
description: |
3+
Download and build SWIG and set the SWIG environment variable to the path of
4+
the SWIG executable.
5+
6+
inputs:
7+
swig_version:
8+
description: 'Swig version to build'
9+
required: false
10+
default: '4.1.1'
11+
12+
runs:
13+
using: "composite"
14+
steps:
15+
- name: Download and build SWIG
16+
run: scripts/downloadAndBuildSwig.sh
17+
shell: bash
18+
19+
- run: echo "SWIG=${AMICI_DIR}/ThirdParty/swig-${{ inputs.swig_version }}/install/bin/swig" >> $GITHUB_ENV
20+
shell: bash

.github/workflows/deploy_branch.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,10 @@ jobs:
2121
with:
2222
fetch-depth: 20
2323

24-
- run: echo "AMICI_DIR=$(pwd)" >> $GITHUB_ENV
25-
- run: echo "SWIG=${AMICI_DIR}/ThirdParty/swig-4.0.1/install/bin/swig" >> $GITHUB_ENV
24+
- name: Set up SWIG
25+
uses: ./.github/actions/setup-swig
2626

27-
- name: Build swig4
28-
run: |
29-
sudo scripts/downloadAndBuildSwig.sh
27+
- run: echo "AMICI_DIR=$(pwd)" >> $GITHUB_ENV
3028

3129
- name: Create AMICI sdist
3230
run: |

.github/workflows/deploy_release.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,10 @@ jobs:
2424
with:
2525
fetch-depth: 20
2626

27-
- run: echo "AMICI_DIR=$(pwd)" >> $GITHUB_ENV
28-
- run: echo "SWIG=${AMICI_DIR}/ThirdParty/swig-4.0.1/install/bin/swig" >> $GITHUB_ENV
27+
- name: Set up SWIG
28+
uses: ./.github/actions/setup-swig
2929

30-
- name: Build swig4
31-
run: |
32-
sudo scripts/downloadAndBuildSwig.sh
30+
- run: echo "AMICI_DIR=$(pwd)" >> $GITHUB_ENV
3331

3432
- name: sdist
3533
run: |

.github/workflows/test_benchmark_collection_models.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,8 @@ jobs:
3737
with:
3838
fetch-depth: 20
3939

40-
# install dependencies
41-
- name: apt
42-
run: |
43-
sudo apt-get update \
44-
&& sudo apt-get install -y swig libatlas-base-dev
40+
- name: Install apt dependencies
41+
uses: ./.github/actions/install-apt-dependencies
4542

4643
- run: echo "${HOME}/.local/bin/" >> $GITHUB_PATH
4744

.github/workflows/test_doc.yml

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ on:
1616
jobs:
1717
doxygen:
1818
name: Test Doxygen
19-
2019
runs-on: ubuntu-22.04
2120

2221
strategy:
@@ -32,26 +31,14 @@ jobs:
3231
- uses: actions/checkout@v3
3332
- run: git fetch --prune --unshallow
3433

35-
- name: apt
36-
run: |
37-
sudo apt-get update \
38-
&& sudo apt-get install -y \
39-
bison \
40-
ragel \
41-
graphviz \
42-
texlive-latex-extra
43-
44-
- name: Build doxygen
45-
run: |
46-
sudo scripts/downloadAndBuildDoxygen.sh
34+
- name: Set up doxygen
35+
uses: ./.github/actions/setup-doxygen
4736

4837
- name: Run doxygen
49-
run: |
50-
scripts/run-doxygen.sh
38+
run: scripts/run-doxygen.sh
5139

5240
sphinx:
5341
name: Test Sphinx
54-
5542
runs-on: ubuntu-22.04
5643

5744
strategy:
@@ -68,11 +55,9 @@ jobs:
6855
- run: git fetch --prune --unshallow
6956

7057
- run: echo "AMICI_DIR=$(pwd)" >> $GITHUB_ENV
71-
- run: echo "SWIG=${AMICI_DIR}/ThirdParty/swig-4.1.1/install/bin/swig" >> $GITHUB_ENV
7258

73-
- name: Build doxygen
74-
run: |
75-
sudo scripts/downloadAndBuildDoxygen.sh
59+
- name: Set up doxygen
60+
uses: ./.github/actions/setup-doxygen
7661

7762
# install amici dependencies
7863
- name: apt
@@ -85,10 +70,7 @@ jobs:
8570
pandoc \
8671
python3-venv \
8772
88-
- name: Build swig
89-
run: |
90-
sudo scripts/downloadAndBuildSwig.sh
73+
- uses: ./.github/actions/setup-swig
9174

9275
- name: sphinx
93-
run: |
94-
scripts/run-sphinx.sh
76+
run: scripts/run-sphinx.sh

.github/workflows/test_install.yml

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,14 @@ jobs:
2222

2323
- run: echo "AMICI_DIR=$(pwd)" >> $GITHUB_ENV
2424

25-
# install amici dependencies
25+
- name: Install apt dependencies
26+
uses: ./.github/actions/install-apt-dependencies
27+
2628
- name: apt
2729
run: |
2830
sudo apt-get update \
2931
&& sudo apt-get install -y \
30-
cmake \
31-
g++ \
32-
libatlas-base-dev \
33-
libboost-serialization-dev \
34-
libhdf5-serial-dev \
35-
swig
32+
cmake
3633
3734
- name: Build suitesparse
3835
run: |
@@ -70,16 +67,8 @@ jobs:
7067

7168
- run: echo "AMICI_DIR=$(pwd)" >> $GITHUB_ENV
7269

73-
# install amici dependencies
74-
- name: apt
75-
run: |
76-
sudo apt-get update \
77-
&& sudo apt-get install -y \
78-
g++ \
79-
libatlas-base-dev \
80-
libboost-serialization-dev \
81-
libhdf5-serial-dev \
82-
swig
70+
- name: Install apt dependencies
71+
uses: ./.github/actions/install-apt-dependencies
8372

8473
- name: Create AMICI sdist
8574
run: |

.github/workflows/test_performance.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,9 @@ jobs:
3535
with:
3636
fetch-depth: 20
3737

38-
# install dependencies
39-
- name: apt
40-
run: |
41-
sudo apt-get update \
42-
&& sudo apt-get install -y swig libatlas-base-dev
38+
- name: Install apt dependencies
39+
uses: ./.github/actions/install-apt-dependencies
40+
4341
- run: pip3 install petab shyaml build
4442

4543
- run: echo "${HOME}/.local/bin/" >> $GITHUB_PATH

0 commit comments

Comments
 (0)