-
Notifications
You must be signed in to change notification settings - Fork 20
129 lines (111 loc) · 4.47 KB
/
bsts_local.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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: BSTS local
# derived from https://raw.githubusercontent.com/biosimulators/Biosimulators/dev/.github/workflows/validateCommitSimulator.yml
on:
workflow_dispatch:
inputs:
biosimulators_vcell_tag:
description: 'version.major.minor.patch'
required: true
default: '7.5.0.127'
# vcell_build:
# description: 'build number'
# required: true
# default: '23'
# vcell_site:
# description: 'rel or alpha'
# required: true
# default: 'alpha'
# server_only:
# description: 'Deploy only the server components?'
# required: true
# default: 'false'
jobs:
validateCommit:
name: Validate and/or commit simulator
runs-on: ubuntu-22.04 # includes Docker
steps:
- name: Install Python
uses: actions/setup-python@v3
with:
python-version: '3.11'
- name: Install pip and setuptools
run: |
python -m pip install --upgrade setuptools
# wget https://bootstrap.pypa.io/get-pip.py
# python get-pip.py pip==20.3.4
python -m pip install pip==20.3.4
- name: Install Java # for pyNeuroML
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '15'
- name: Install Perl # for BioNetGen
run: |
sudo apt-get update -y
sudo apt-get install -y --no-install-recommends perl
- name: Install XPP
run: |
sudo apt-get install -y --no-install-recommends xppaut
- name: Install Go (for Singularity)
uses: actions/setup-go@v3
with:
go-version: '^1.13.1' # The Go version to download (if necessary) and use.
- name: Install Singularity # to validate that the Docker image can be converted into a Singularity image
env:
GO_VERSION: 1.17.2
SINGULARITY_VERSION: 3.9.5
OS: linux
ARCH: amd64
run: |
sudo apt-get install -y --no-install-recommends \
build-essential \
libseccomp-dev \
pkg-config \
squashfs-tools \
cryptsetup
wget https://dl.google.com/go/go$GO_VERSION.$OS-$ARCH.tar.gz
sudo tar -C /usr/local -xzvf go$GO_VERSION.$OS-$ARCH.tar.gz
rm go$GO_VERSION.$OS-$ARCH.tar.gz
echo 'export PATH=/usr/local/go/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
echo "/usr/local/go/bin" >> $GITHUB_PATH
wget https://github.com/sylabs/singularity/releases/download/v${SINGULARITY_VERSION}/singularity-ce-${SINGULARITY_VERSION}.tar.gz
tar -xzf singularity-ce-${SINGULARITY_VERSION}.tar.gz
cd singularity-ce-${SINGULARITY_VERSION}
./mconfig
make -C builddir
sudo make -C builddir install
- name: checkout vcell
uses: actions/checkout@v3
- name: Login into Docker registries
run: |
# VCell Docker registry (GHCR)
echo ${{ secrets.ACTION_TOKEN }} | docker login ghcr.io -u ${{ secrets.ACTION_USER }} --password-stdin
- name: configure biosimulations.json
working-directory: ${{ github.workspace }}
run: |
docker pull ghcr.io/virtualcell/biosimulators_vcell:${{ github.event.inputs.biosimulators_vcell_tag }}
IMAGE_DIGEST=$(docker image inspect ghcr.io/virtualcell/biosimulators_vcell:${{ github.event.inputs.biosimulators_vcell_tag }} | jq -r '.[0].RepoDigests[0]' | cut -d "@" -f 2-)
sed -i "s/_VC_DIGEST_TAG_/${IMAGE_DIGEST}/g" biosimulators.json
sed -i 's/_VC_VERSION_TAG_/${{github.event.inputs.biosimulators_vcell_tag}}/g' biosimulators.json
- name: Install simulator validation utilities
working-directory: ${{ github.workspace }}
run: |
python -m pip install "biosimulators-test-suite[containers,sbml]"
python --version
python -m pip freeze
- name: Validate and commit simulator
working-directory: ${{ github.workspace }}
run: |
biosimulators-test-suite --verbose biosimulators.json
- name: Setup tmate session 3 (if failed)
uses: mxschmitt/action-tmate@v3
if: ${{ failure() }}
timeout-minutes: 40
- name: Save test results
uses: actions/upload-artifact@v2
if: success() || failure()
with:
name: Validation test results
path: ${{ github.workspace }}/.biosimulators-test-suite-results.json
if-no-files-found: warn