From f97e038818886fd54fe393729d60fb4282a50e31 Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Wed, 15 Nov 2023 17:11:35 +0100 Subject: [PATCH] .. --- .../actions/install-apt-dependencies/action.yml | 1 + .github/actions/setup-sonar-tools/action.yml | 15 +++++++++++++++ .github/workflows/test_install.yml | 15 +++------------ .github/workflows/test_valgrind.yml | 12 ++++-------- 4 files changed, 23 insertions(+), 20 deletions(-) create mode 100644 .github/actions/setup-sonar-tools/action.yml diff --git a/.github/actions/install-apt-dependencies/action.yml b/.github/actions/install-apt-dependencies/action.yml index b9ef5c0dd5..0474e5befa 100644 --- a/.github/actions/install-apt-dependencies/action.yml +++ b/.github/actions/install-apt-dependencies/action.yml @@ -6,6 +6,7 @@ runs: - run: | sudo apt-get update \ && sudo apt-get install -y \ + g++ \ libatlas-base-dev \ libboost-chrono-dev \ libboost-math-dev \ diff --git a/.github/actions/setup-sonar-tools/action.yml b/.github/actions/setup-sonar-tools/action.yml new file mode 100644 index 0000000000..b9ef5c0dd5 --- /dev/null +++ b/.github/actions/setup-sonar-tools/action.yml @@ -0,0 +1,15 @@ +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 \ + libatlas-base-dev \ + libboost-chrono-dev \ + libboost-math-dev \ + libboost-serialization-dev \ + libhdf5-serial-dev \ + swig + shell: bash diff --git a/.github/workflows/test_install.yml b/.github/workflows/test_install.yml index 1ff9208485..0ad1ec0a14 100644 --- a/.github/workflows/test_install.yml +++ b/.github/workflows/test_install.yml @@ -29,8 +29,7 @@ jobs: run: | sudo apt-get update \ && sudo apt-get install -y \ - cmake \ - g++ + cmake - name: Build suitesparse run: | @@ -68,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: | diff --git a/.github/workflows/test_valgrind.yml b/.github/workflows/test_valgrind.yml index 2d4fe44229..7b513f28dd 100644 --- a/.github/workflows/test_valgrind.yml +++ b/.github/workflows/test_valgrind.yml @@ -43,7 +43,6 @@ jobs: sudo apt-get update \ && sudo apt-get install -y \ cmake \ - g++ \ python3-venv \ valgrind @@ -76,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: |