-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
138 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
name: BSTS local | ||
# derived from https://raw.githubusercontent.com/biosimulators/Biosimulators/dev/.github/workflows/validateCommitSimulator.yml | ||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
validateCommit: | ||
name: Validate and/or commit simulator | ||
runs-on: ubuntu-20.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 BioSimulators test suite | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: biosimulators/biosimulators_test_suite | ||
fetch-depth: 1 | ||
ref: depFixes | ||
|
||
- name: Install simulator validation utilities | ||
working-directory: ${{ github.workspace }} | ||
run: | | ||
# python -m pip cache purge | ||
# python -m pip install --no-cache-dir "biosimulators_utils @ git+https://github.com/biosimulators/Biosimulators_utils@depFixes#egg=biosimulators_utils[containers,sbml]" | ||
# python -m pip install git+https://github.com/biosimulators/RBApy.git#egg=rbapy | ||
python -m pip install docker python-libsbml "urllib3<2.0" | ||
python -m pip install -e .[all] | ||
python --version | ||
python -m pip freeze | ||
- name: Login into Docker registries | ||
run: | | ||
# VCell Docker registry (GHCR) | ||
docker login ghcr.io --username ${{ secrets.GHCR_USERNAME }} --password ${{ secrets.GHCR_TOKEN }} | ||
- id: validateCommitSimulator | ||
name: Validate and commit simulator | ||
uses: GabrielBB/xvfb-action@v1 | ||
env: | ||
GH_REPO: ${{ github.repository }} | ||
GH_ACTION_RUN_ID: ${{ github.run_id }} | ||
GH_ISSUE_NUMBER: ${{ github.event.issue.number }} | ||
GH_ISSUES_USER: ${{ secrets.GH_ISSUES_USER }} | ||
GH_ISSUES_ACCESS_TOKEN: ${{ secrets.GH_ISSUES_ACCESS_TOKEN }} | ||
|
||
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }} | ||
|
||
DOCKER_REGISTRY_URL: ${{ secrets.DOCKER_REGISTRY_URL }} | ||
DOCKER_REGISTRY_USERNAME: ${{ secrets.DOCKER_REGISTRY_USERNAME }} | ||
DOCKER_REGISTRY_TOKEN: ${{ secrets.DOCKER_REGISTRY_TOKEN }} | ||
|
||
BIOSIMULATORS_API_CLIENT_ID: ${{ secrets.BIOSIMULATORS_API_CLIENT_ID }} | ||
BIOSIMULATORS_API_CLIENT_SECRET: ${{ secrets.BIOSIMULATORS_API_CLIENT_SECRET }} | ||
# BIOSIMULATORS_API_ENDPOINT: https://api.biosimulators.dev/ # uncomment to use the dev deployment of the BioSimulators API | ||
|
||
RUNBIOSIMULATIONS_API_CLIENT_ID: ${{ secrets.RUNBIOSIMULATIONS_API_CLIENT_ID }} | ||
RUNBIOSIMULATIONS_API_CLIENT_SECRET: ${{ secrets.RUNBIOSIMULATIONS_API_CLIENT_SECRET }} | ||
# RUNBIOSIMULATIONS_API_ENDPOINT: https://api.biosimulations.dev/ # uncomment to use the dev deployment of the BioSimulators API | ||
with: | ||
working-directory: ${{ github.workspace }} | ||
run: | | ||
python -m pip install --upgrade biosimulators_utils | ||
python -m biosimulators_test_suite.exec_cli.main --verbose biosimulators.json | ||
# If tmate is useful for a particular debugging issue, comment this back in: | ||
# - 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 |