File tree Expand file tree Collapse file tree 5 files changed +31
-16
lines changed Expand file tree Collapse file tree 5 files changed +31
-16
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff 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 : |
Original file line number Diff line number Diff 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 : |
Original file line number Diff line number Diff line change 5555 - run : git fetch --prune --unshallow
5656
5757 - run : echo "AMICI_DIR=$(pwd)" >> $GITHUB_ENV
58- - run : echo "SWIG=${AMICI_DIR}/ThirdParty/swig-4.1.1/install/bin/swig" >> $GITHUB_ENV
5958
6059 - name : Set up doxygen
6160 uses : ./.github/actions/setup-doxygen
7170 pandoc \
7271 python3-venv \
7372
74- - name : Build swig
75- run : |
76- sudo scripts/downloadAndBuildSwig.sh
73+ - uses : ./.github/actions/setup-swig
7774
7875 - name : sphinx
7976 run : scripts/run-sphinx.sh
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22# Download and build SWIG
3- set -e
3+ #
4+ # Usage: downloadAndBuildSwig.sh [swig_version]
5+ set -euo pipefail
46
57SCRIPT_PATH=$( dirname " $BASH_SOURCE " )
68AMICI_PATH=$( cd " $SCRIPT_PATH /.." && pwd)
79
8- swig_version=4.1.1
10+ swig_version=" ${1 :- " 4.1.1" } "
911SWIG_ARCHIVE=" swig-${swig_version} .tar.gz"
1012SWIG_URL=" http://downloads.sourceforge.net/project/swig/swig/swig-${swig_version} /${SWIG_ARCHIVE} "
1113SWIG_DIR=" swig-${swig_version} "
You can’t perform that action at this time.
0 commit comments