-
Notifications
You must be signed in to change notification settings - Fork 2
108 lines (92 loc) · 3.17 KB
/
fix-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: Process biomodels into 'final'.
on:
# push:
workflow_dispatch:
jobs:
fixEntries:
name: Fix the entries of BioModels and commit to the repository
strategy:
matrix:
job: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
fail-fast: false
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: recursive
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Setup pip cache
uses: actions/cache@v4
with:
path: /opt/hostedtoolcache/Python
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install pip and setuptools
run: |
python -m pip install pip==23.0.0
python -m pip install pip==23.0.0
- uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '15'
- name: Install Systems Biology Format Converter (SBFC)
run: |
cd /tmp
wget https://sourceforge.net/projects/sbfc/files/sbfc/sbfc-1.3.7.zip/download -O sbfc-1.3.7.zip
unzip sbfc-1.3.7.zip
mv sbfc-1.3.7 /opt/
rm sbfc-1.3.7.zip
echo "/opt/sbfc-1.3.7" >> $GITHUB_PATH
- name: Install Octave
run: |
sudo apt update -y
sudo apt-get install -y --no-install-recommends octave
- name: Install Scilab
run: sudo apt-get install -y --no-install-recommends scilab
- name: Install XPP
run: |
sudo apt-get update -y
sudo apt-get install -y --no-install-recommends xppaut
- name: Install BioModels QC
working-directory: biomodels-qc
run: |
python -m pip install cython
python -m pip install .
- name: Install requirements
run: python -m pip install -r requirements.txt
- name: Fix entries
run: python fix-entries.py --convert-files --validate-sbml --num-jobs 20 --job ${{ matrix.job }}
- name: Setup Git
run: |
git config --global user.email "[email protected]"
git config --global user.name "Center for Reproducible Biomodeling Modeling Bot"
git config pull.rebase false
- id: commit-final-entries
name: Commit changes to the fixed entries
run: |
git stash
git pull
set +e
git stash pop
chmod a+x git_add.bat
./git_add.bat
git pull
git commit -m "Automated update fixed versions of entries"
if [[ $? = 0 ]]; then
finalEntriesChanged=1
else
finalEntriesChanged=0
fi
echo "finalEntriesChanged=$finalEntriesChanged" >> $GITHUB_OUTPUT
- name: Push the changes to the fixed entries
if: steps.commit-final-entries.outputs.finalEntriesChanged == '1'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}