Skip to content

Commit

Permalink
Merge branch 'develop' into gha_update_pyver
Browse files Browse the repository at this point in the history
  • Loading branch information
dweindl authored Nov 16, 2023
2 parents b60e833 + 32730f0 commit 730b490
Show file tree
Hide file tree
Showing 21 changed files with 181 additions and 121 deletions.
16 changes: 16 additions & 0 deletions .github/actions/install-apt-dependencies/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Install apt dependencies
description: Install apt dependencies for the AMICI Python package
runs:
using: "composite"
steps:
- run: |
sudo apt-get update \
&& sudo apt-get install -y \
g++ \
libatlas-base-dev \
libboost-chrono-dev \
libboost-math-dev \
libboost-serialization-dev \
libhdf5-serial-dev \
swig
shell: bash
20 changes: 20 additions & 0 deletions .github/actions/setup-doxygen/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Set up doxygen
description: |
Download, build, and install doxygen.
runs:
using: "composite"
steps:
- name: Install apt dependencies for doxygen
run: |
sudo apt-get update \
&& sudo apt-get install -y \
bison \
ragel \
graphviz \
texlive-latex-extra
shell: bash

- name: Download and build doxygen
run: sudo scripts/downloadAndBuildDoxygen.sh
shell: bash
26 changes: 26 additions & 0 deletions .github/actions/setup-sonar-tools/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Set up Sonar tools
description: Download and install sonar-scanner and build-wrapper
runs:
using: "composite"
steps:
- run: echo "SONAR_SCANNER_VERSION=5.0.1.3006" >> $GITHUB_ENV
shell: bash
- run: echo "SONAR_SCANNER_HOME=${HOME}/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux" >> $GITHUB_ENV
shell: bash
- run: echo "SONAR_SCANNER_OPTS=-server" >> $GITHUB_ENV
shell: bash
- run: echo "${SONAR_SCANNER_HOME}/bin" >> $GITHUB_PATH
shell: bash
- run: echo "${HOME}/.sonar/build-wrapper-linux-x86" >> $GITHUB_PATH
shell: bash

- name: Install sonarcloud tools
run: |
sudo apt-get install nodejs curl unzip \
&& curl --create-dirs -sSLo $HOME/.sonar/sonar-scanner.zip \
https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux.zip \
&& unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/ \
&& curl --create-dirs -sSLo $HOME/.sonar/build-wrapper-linux-x86.zip \
https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip \
&& unzip -o $HOME/.sonar/build-wrapper-linux-x86.zip -d $HOME/.sonar/ \
shell: bash
20 changes: 20 additions & 0 deletions .github/actions/setup-swig/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Set up SWIG
description: |
Download and build SWIG and set the SWIG environment variable to the path of
the SWIG executable.
inputs:
swig_version:
description: 'Swig version to build'
required: false
default: '4.1.1'

runs:
using: "composite"
steps:
- name: Download and build SWIG
run: scripts/downloadAndBuildSwig.sh
shell: bash

- run: echo "SWIG=${AMICI_DIR}/ThirdParty/swig-${{ inputs.swig_version }}/install/bin/swig" >> $GITHUB_ENV
shell: bash
8 changes: 3 additions & 5 deletions .github/workflows/deploy_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@ jobs:
with:
fetch-depth: 20

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

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

- name: Create AMICI sdist
run: |
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/deploy_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,10 @@ jobs:
with:
fetch-depth: 20

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

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

- name: sdist
run: |
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/test_benchmark_collection_models.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,8 @@ jobs:
with:
fetch-depth: 20

# install dependencies
- name: apt
run: |
sudo apt-get update \
&& sudo apt-get install -y swig libatlas-base-dev
- name: Install apt dependencies
uses: ./.github/actions/install-apt-dependencies

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

Expand Down
32 changes: 7 additions & 25 deletions .github/workflows/test_doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ on:
jobs:
doxygen:
name: Test Doxygen

runs-on: ubuntu-22.04

strategy:
Expand All @@ -32,26 +31,14 @@ jobs:
- uses: actions/checkout@v3
- run: git fetch --prune --unshallow

- name: apt
run: |
sudo apt-get update \
&& sudo apt-get install -y \
bison \
ragel \
graphviz \
texlive-latex-extra
- name: Build doxygen
run: |
sudo scripts/downloadAndBuildDoxygen.sh
- name: Set up doxygen
uses: ./.github/actions/setup-doxygen

- name: Run doxygen
run: |
scripts/run-doxygen.sh
run: scripts/run-doxygen.sh

sphinx:
name: Test Sphinx

runs-on: ubuntu-22.04

strategy:
Expand All @@ -68,11 +55,9 @@ jobs:
- run: git fetch --prune --unshallow

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

- name: Build doxygen
run: |
sudo scripts/downloadAndBuildDoxygen.sh
- name: Set up doxygen
uses: ./.github/actions/setup-doxygen

# install amici dependencies
- name: apt
Expand All @@ -85,10 +70,7 @@ jobs:
pandoc \
python3-venv \
- name: Build swig
run: |
sudo scripts/downloadAndBuildSwig.sh
- uses: ./.github/actions/setup-swig

- name: sphinx
run: |
scripts/run-sphinx.sh
run: scripts/run-sphinx.sh
23 changes: 6 additions & 17 deletions .github/workflows/test_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,14 @@ jobs:

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

# install amici dependencies
- name: Install apt dependencies
uses: ./.github/actions/install-apt-dependencies

- name: apt
run: |
sudo apt-get update \
&& sudo apt-get install -y \
cmake \
g++ \
libatlas-base-dev \
libboost-serialization-dev \
libhdf5-serial-dev \
swig
cmake
- name: Build suitesparse
run: |
Expand Down Expand Up @@ -70,16 +67,8 @@ jobs:

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

# install amici dependencies
- name: apt
run: |
sudo apt-get update \
&& sudo apt-get install -y \
g++ \
libatlas-base-dev \
libboost-serialization-dev \
libhdf5-serial-dev \
swig
- name: Install apt dependencies
uses: ./.github/actions/install-apt-dependencies

- name: Create AMICI sdist
run: |
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/test_performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,9 @@ jobs:
with:
fetch-depth: 20

# install dependencies
- name: apt
run: |
sudo apt-get update \
&& sudo apt-get install -y swig libatlas-base-dev
- name: Install apt dependencies
uses: ./.github/actions/install-apt-dependencies

- run: pip3 install petab shyaml build

- run: echo "${HOME}/.local/bin/" >> $GITHUB_PATH
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test_petab_test_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ jobs:
with:
fetch-depth: 20

- name: Install apt dependencies
uses: ./.github/actions/install-apt-dependencies

# install dependencies
- name: apt
run: |
sudo apt-get update \
&& sudo apt-get install -y \
swig \
libatlas-base-dev \
python3-venv
&& sudo apt-get install -y python3-venv
- name: Build BNGL
run: |
Expand Down
27 changes: 5 additions & 22 deletions .github/workflows/test_python_cplusplus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,11 @@ jobs:
- run: echo "AMICI_DIR=$(pwd)" >> $GITHUB_ENV
- run: echo "BNGPATH=${GITHUB_WORKSPACE}/ThirdParty/BioNetGen-2.7.0" >> $GITHUB_ENV

# sonar cloud
- run: echo "SONAR_SCANNER_VERSION=5.0.1.3006" >> $GITHUB_ENV
- run: echo "SONAR_SCANNER_HOME=${HOME}/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux" >> $GITHUB_ENV
- run: echo "SONAR_SCANNER_OPTS=-server" >> $GITHUB_ENV
- run: echo "${SONAR_SCANNER_HOME}/bin" >> $GITHUB_PATH
- run: echo "${HOME}/.sonar/build-wrapper-linux-x86" >> $GITHUB_PATH

# TODO: add to ci image
- name: Install sonarcloud tools
run: |
sudo apt-get install nodejs curl unzip \
&& curl --create-dirs -sSLo $HOME/.sonar/sonar-scanner.zip \
https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux.zip \
&& unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/ \
&& curl --create-dirs -sSLo $HOME/.sonar/build-wrapper-linux-x86.zip \
https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip \
&& unzip -o $HOME/.sonar/build-wrapper-linux-x86.zip -d $HOME/.sonar/ \
- name: Set up Sonar tools
uses: ./.github/actions/setup-sonar-tools

- name: Install apt dependencies
uses: ./.github/actions/install-apt-dependencies

# install amici dependencies
- name: apt
Expand All @@ -60,12 +48,7 @@ jobs:
&& sudo apt-get install -y \
cmake \
g++ \
libatlas-base-dev \
libboost-serialization-dev \
libboost-chrono-dev \
libhdf5-serial-dev \
python3-venv \
swig \
lcov \
libboost-math-dev
Expand Down
11 changes: 2 additions & 9 deletions .github/workflows/test_python_ver_matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,8 @@ jobs:
with:
fetch-depth: 20

# install dependencies
- name: apt
run: |
sudo apt-get update \
&& sudo apt-get install -y \
swig \
libatlas-base-dev \
libhdf5-serial-dev \
libboost-math-dev
- name: Install apt dependencies
uses: ./.github/actions/install-apt-dependencies

# install AMICI
- name: Build BNGL
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test_sbml_semantic_test_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: apt
run: |
sudo apt-get update \
&& sudo apt-get install -y swig4.0 libatlas-base-dev

- name: Install apt dependencies
uses: ./.github/actions/install-apt-dependencies

- run: AMICI_PARALLEL_COMPILE=2 ./scripts/installAmiciSource.sh
- run: AMICI_PARALLEL_COMPILE=2 ./scripts/run-SBMLTestsuite.sh ${{ matrix.cases }}

Expand Down
22 changes: 8 additions & 14 deletions .github/workflows/test_valgrind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,17 @@ jobs:
- uses: actions/checkout@v3
- run: git fetch --prune --unshallow

- name: Install apt dependencies
uses: ./.github/actions/install-apt-dependencies

# install amici dependencies
- name: apt
run: |
sudo apt-get update \
&& sudo apt-get install -y \
cmake \
g++ \
libatlas-base-dev \
libboost-serialization-dev \
libhdf5-serial-dev \
python3-venv \
swig \
valgrind \
libboost-math-dev
valgrind
- name: Build AMICI
run: |
Expand Down Expand Up @@ -78,20 +75,17 @@ jobs:
- uses: actions/checkout@v3
- run: git fetch --prune --unshallow

- name: Install apt dependencies
uses: ./.github/actions/install-apt-dependencies

# install amici dependencies
- name: apt
run: |
sudo apt-get update \
&& sudo apt-get install -y \
cmake \
g++ \
libatlas-base-dev \
libboost-serialization-dev \
libhdf5-serial-dev \
python3-venv \
swig \
valgrind \
libboost-math-dev
valgrind
- name: Build AMICI
run: |
Expand Down
Loading

0 comments on commit 730b490

Please sign in to comment.