Skip to content

Commit ec5ba6c

Browse files
authored
Merge branch 'develop' into check_grad_sbml_test_suite
2 parents 22722e7 + b4ab8a2 commit ec5ba6c

File tree

320 files changed

+17409
-9871
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

320 files changed

+17409
-9871
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Install AMICI dependencies for MacOS
2+
description: Install AMICI dependencies for MacOS
3+
4+
runs:
5+
using: "composite"
6+
steps:
7+
# use all available cores
8+
- run: echo "AMICI_PARALLEL_COMPILE=" >> $GITHUB_ENV
9+
shell: bash
10+
11+
# AMICI repository root
12+
- run: echo "AMICI_DIR=$(pwd)" >> $GITHUB_ENV
13+
shell: bash
14+
15+
# BioNetGen path
16+
- run: echo "BNGPATH=${AMICI_DIR}/ThirdParty/BioNetGen-2.7.0" >> $GITHUB_ENV
17+
shell: bash
18+
19+
# CMake hints
20+
# Ensure CMake is using the python version that we will use for the python tests later on
21+
- run: echo "PYTHON_EXECUTABLE=${Python3_ROOT_DIR}/bin/python3" >> $GITHUB_ENV
22+
shell: bash
23+
- run: echo "OpenMP_ROOT=$(brew --prefix)/opt/libomp" >> $GITHUB_ENV
24+
shell: bash
25+
- run: echo "BOOST_ROOT=$(brew --prefix)/opt/boost" >> $GITHUB_ENV
26+
shell: bash
27+
28+
# install amici dependencies
29+
- name: homebrew
30+
run: brew install hdf5 swig gcc libomp boost
31+
shell: bash
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Set up AMICI C++
2+
description: |
3+
Build the AMICI C++ interface and set things for for coverage analysis.
4+
(Currently ubuntu-only).
5+
6+
runs:
7+
using: "composite"
8+
steps:
9+
# BioNetGen Path
10+
- run: echo "BNGPATH=${GITHUB_WORKSPACE}/ThirdParty/BioNetGen-2.7.0" >> $GITHUB_ENV
11+
shell: bash
12+
13+
# use all available cores
14+
- run: echo "AMICI_PARALLEL_COMPILE=" >> $GITHUB_ENV
15+
shell: bash
16+
17+
# enable coverage
18+
- run: echo "ENABLE_GCOV_COVERAGE=TRUE" >> $GITHUB_ENV
19+
shell: bash
20+
21+
- run: echo "PYTHONFAULTHANDLER=1" >> $GITHUB_ENV
22+
shell: bash
23+
24+
- name: Set up Sonar tools
25+
uses: ./.github/actions/setup-sonar-tools
26+
27+
- name: Install apt dependencies
28+
uses: ./.github/actions/install-apt-dependencies
29+
30+
- name: Install additional apt dependencies
31+
run: |
32+
sudo apt-get update \
33+
&& sudo apt-get install -y \
34+
cmake \
35+
python3-venv \
36+
lcov
37+
shell: bash
38+
39+
- name: Build AMICI dependencies
40+
run: scripts/buildDependencies.sh
41+
shell: bash
42+
43+
- name: Build AMICI
44+
run: scripts/buildAmici.sh
45+
shell: bash
46+
env:
47+
CI_SONARCLOUD: "TRUE"

.github/actions/setup-sonar-tools/action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ runs:
1616

1717
- name: Install sonarcloud tools
1818
run: |
19-
sudo apt-get install nodejs curl unzip \
19+
sudo apt-get update \
20+
&& sudo apt-get install nodejs curl unzip \
2021
&& curl --create-dirs -sSLo $HOME/.sonar/sonar-scanner.zip \
2122
https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux.zip \
2223
&& unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/ \

.github/actions/setup-swig/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ inputs:
77
swig_version:
88
description: 'Swig version to build'
99
required: false
10-
default: '4.1.1'
10+
default: '4.2.0'
1111

1212
runs:
1313
using: "composite"

.github/workflows/deploy_branch.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Deploy Branch
2-
on: [push, merge_group, workflow_dispatch]
2+
on: [push, pull_request, merge_group, workflow_dispatch]
33

44
jobs:
55
sdist:
@@ -13,11 +13,11 @@ jobs:
1313

1414
steps:
1515
- name: Set up Python ${{ matrix.python-version }}
16-
uses: actions/setup-python@v4
16+
uses: actions/setup-python@v5
1717
with:
1818
python-version: ${{ matrix.python-version }}
1919

20-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@v4
2121
with:
2222
fetch-depth: 20
2323

@@ -31,7 +31,7 @@ jobs:
3131
scripts/buildSdist.sh
3232
3333
- name: "Upload artifact: sdist"
34-
uses: actions/upload-artifact@v3
34+
uses: actions/upload-artifact@v4
3535
with:
3636
name: sdist
3737
path: python/sdist/dist/amici-*.gz

.github/workflows/deploy_protected.yml

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,25 @@ on:
1313
workflow_dispatch:
1414

1515
jobs:
16+
check-secret:
17+
runs-on: ubuntu-latest
18+
outputs:
19+
secrets-defined: ${{ steps.secret-check.outputs.defined }}
20+
steps:
21+
- name: Check for Secret availability
22+
id: secret-check
23+
shell: bash
24+
run: |
25+
if [ "${{ secrets.DOCKER_USERNAME }}" != '' ]; then
26+
echo "defined=true" >> $GITHUB_OUTPUT;
27+
else
28+
echo "defined=false" >> $GITHUB_OUTPUT;
29+
fi
30+
1631
dockerhub:
17-
# https://github.com/marketplace/actions/publish-docker
1832
name: Deploy Dockerhub
19-
33+
needs: [check-secret]
34+
if: needs.check-secret.outputs.secrets-defined == 'true'
2035
runs-on: ubuntu-22.04
2136

2237
strategy:
@@ -25,15 +40,15 @@ jobs:
2540

2641
steps:
2742
- name: Set up Python ${{ matrix.python-version }}
28-
uses: actions/setup-python@v4
43+
uses: actions/setup-python@v5
2944
with:
3045
python-version: ${{ matrix.python-version }}
31-
- uses: actions/checkout@v3
46+
- uses: actions/checkout@v4
3247
- run: git archive -o container/amici.tar.gz --format=tar.gz HEAD
3348
- name: Set up QEMU
34-
uses: docker/setup-qemu-action@v2
49+
uses: docker/setup-qemu-action@v3
3550
- name: Set up Docker Buildx
36-
uses: docker/setup-buildx-action@v2
51+
uses: docker/setup-buildx-action@v3
3752
- name: Publish to Registry
3853
uses: elgohr/Publish-Docker-Github-Action@v4
3954
with:

.github/workflows/deploy_release.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,20 @@ jobs:
1414
matrix:
1515
python-version: [3.9]
1616

17+
environment:
18+
name: pypi
19+
url: https://pypi.org/p/amici
20+
21+
permissions:
22+
id-token: write
23+
1724
steps:
1825
- name: Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v4
26+
uses: actions/setup-python@v5
2027
with:
2128
python-version: ${{ matrix.python-version }}
2229

23-
- uses: actions/checkout@v3
30+
- uses: actions/checkout@v4
2431
with:
2532
fetch-depth: 20
2633

@@ -29,15 +36,17 @@ jobs:
2936

3037
- run: echo "AMICI_DIR=$(pwd)" >> $GITHUB_ENV
3138

39+
- name: Remove direct dependencies from setup.cfg
40+
# Remove any "git+https"-based dependencies that are not supported
41+
# by PyPI and are only required for testing.
42+
run: sed -i '/git+https/d' python/sdist/setup.cfg
43+
3244
- name: sdist
33-
run: |
34-
scripts/buildSdist.sh
45+
run: scripts/buildSdist.sh
3546

3647
- name: Publish a Python distribution to PyPI
3748
uses: pypa/gh-action-pypi-publish@release/v1
3849
with:
39-
user: __token__
40-
password: ${{ secrets.pypi_password }}
4150
packages-dir: python/sdist/dist
4251

4352
bioSimulatorsUpdateCliAndDockerImage:

.github/workflows/test_benchmark_collection_models.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ jobs:
2929

3030
steps:
3131
- name: Set up Python ${{ matrix.python-version }}
32-
uses: actions/setup-python@v4
32+
uses: actions/setup-python@v5
3333
with:
3434
python-version: ${{ matrix.python-version }}
3535

36-
- uses: actions/checkout@v3
36+
- uses: actions/checkout@v4
3737
with:
3838
fetch-depth: 20
3939

@@ -44,20 +44,20 @@ jobs:
4444

4545
# install AMICI
4646
- name: Create AMICI sdist
47-
run: |
48-
pip3 install build && cd python/sdist && python3 -m build --sdist
47+
run: pip3 install build && cd python/sdist && python3 -m build --sdist
48+
4949
- name: Install AMICI sdist
5050
run: |
5151
pip3 install --user petab[vis] && \
52-
AMICI_PARALLEL_COMPILE=2 pip3 install -v --user \
52+
AMICI_PARALLEL_COMPILE="" pip3 install -v --user \
5353
$(ls -t python/sdist/dist/amici-*.tar.gz | head -1)[petab,test,vis]
5454
5555
# retrieve test models
5656
- name: Download and test benchmark collection
5757
run: |
5858
git clone --depth 1 https://github.com/benchmarking-initiative/Benchmark-Models-PEtab.git \
5959
&& export BENCHMARK_COLLECTION="$(pwd)/Benchmark-Models-PEtab/Benchmark-Models/" \
60-
&& AMICI_PARALLEL_COMPILE=2 tests/benchmark-models/test_benchmark_collection.sh
60+
&& AMICI_PARALLEL_COMPILE="" tests/benchmark-models/test_benchmark_collection.sh
6161
6262
# run gradient checks
6363
- name: Run Gradient Checks
@@ -66,9 +66,9 @@ jobs:
6666
&& cd tests/benchmark-models && pytest ./test_petab_benchmark.py
6767
6868
# upload results
69-
- uses: actions/upload-artifact@v3
69+
- uses: actions/upload-artifact@v4
7070
with:
71-
name: computation times
71+
name: computation-times-${{ matrix.python-version }}-${{ matrix.extract_subexpressions }}
7272
path: |
7373
tests/benchmark-models/computation_times.csv
7474
tests/benchmark-models/computation_times.png

.github/workflows/test_doc.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ jobs:
2424

2525
steps:
2626
- name: Set up Python ${{ matrix.python-version }}
27-
uses: actions/setup-python@v4
27+
uses: actions/setup-python@v5
2828
with:
2929
python-version: ${{ matrix.python-version }}
3030

31-
- uses: actions/checkout@v3
31+
- uses: actions/checkout@v4
3232
- run: git fetch --prune --unshallow
3333

3434
- name: Set up doxygen
@@ -43,34 +43,34 @@ jobs:
4343

4444
strategy:
4545
matrix:
46-
python-version: [ "3.10" ]
46+
python-version: [ "3.11" ]
4747

4848
steps:
4949
- name: Set up Python ${{ matrix.python-version }}
50-
uses: actions/setup-python@v4
50+
uses: actions/setup-python@v5
5151
with:
5252
python-version: ${{ matrix.python-version }}
5353

54-
- uses: actions/checkout@v3
54+
- uses: actions/checkout@v4
5555
- run: git fetch --prune --unshallow
5656

5757
- run: echo "AMICI_DIR=$(pwd)" >> $GITHUB_ENV
5858

5959
- name: Set up doxygen
6060
uses: ./.github/actions/setup-doxygen
6161

62-
# install amici dependencies
63-
- name: apt
62+
- name: Install apt dependencies
63+
uses: ./.github/actions/install-apt-dependencies
64+
65+
- name: Install further dependencies
6466
run: |
6567
sudo apt-get update \
6668
&& sudo apt-get install -y \
67-
g++ \
68-
libatlas-base-dev \
69-
libboost-serialization-dev \
7069
pandoc \
71-
python3-venv \
70+
&& pip install tox
7271
73-
- uses: ./.github/actions/setup-swig
72+
- name: Set up SWIG
73+
uses: ./.github/actions/setup-swig
7474

75-
- name: sphinx
76-
run: scripts/run-sphinx.sh
75+
- name: Run sphinx
76+
run: tox -e doc

0 commit comments

Comments
 (0)