Skip to content

Submit VCell 7.7.0.7 #2718

Submit VCell 7.7.0.7

Submit VCell 7.7.0.7 #2718

name: Validate and/or commit simulator
on:
issues:
types: [labeled, edited]
jobs:
validateCommit:
name: Validate and/or commit simulator
runs-on: ubuntu-22.04 # includes Docker
if: |
github.event.issue.state == 'open'
&& contains(github.event.issue.labels.*.name, 'Validate/submit simulator')
&& (
github.event.action == 'edited'
|| (
github.event.action == 'labeled'
&& github.event.label.name == 'Validate/submit simulator'
)
|| (
github.event.action == 'labeled'
&& github.event.label.name == 'Approved'
&& github.event.sender.login != 'biosimulators-daemon'
)
)
steps:
- name: Install Python
# uses: actions/setup-python@v3
# with:
# python-version: '3.11-dev'
run: |
sudo apt-get install -y python3.11-dev python3-pip python3-venv python3.11-venv
#- name: Setup pip cache
# uses: actions/cache@v2
# with:
# path: /opt/hostedtoolcache/Python
# key: ${{ runner.os }}-pip-${{ hashFiles('${GITHUB_WORKSPACE}/requirements.txt') }}-${{ hashFiles('${GITHUB_WORKSPACE}/requirements.optional.txt') }}
# restore-keys: |
# ${{ runner.os }}-pip-
- name: Install pip and setuptools
run: |
python3.11 -m pip install --upgrade setuptools
# wget https://bootstrap.pypa.io/get-pip.py
# python get-pip.py pip==20.3.4
python3.11 -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 HDF5 and H5PY
# run: |
# sudo apt-get install -y libhdf5-serial-dev hdf5-tools libhdf5-dev
# sudo apt-get install -y zlib1g-dev zip libjpeg8-dev liblapack-dev libblas-dev build-essential
# #python3.11 -m pip install -U pip testresources
# #ln -s /usr/include/locale.h /usr/include/xlocale.h
# python3.11 -m pip install Cython==0.29.36
# python3.11 -m pip install numpy==1.23.5
# #python3.11 -m pip install pkgconfig
# echo '---'
# echo $(python3.11 --version)
# echo $(which python3.11)
# echo '---'
# python3.11 -m pip install --no-binary=h5py h5py
- name: Check Docker Version
run: |
docker version
- 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.11.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: 0.2
# - name: Install simulator validation utilities
# working-directory: ${{ github.workspace }}
# run: |
# # python3.11 -m pip cache purge
# # python -m pip install git+https://github.com/biosimulators/RBApy.git#egg=rbapy
# python3.11 -m pip install docker python-libsbml "urllib3<2.0"
# python3.11 -m pip install --no-cache-dir "biosimulators_utils @ git+https://github.com/biosimulators/Biosimulators_utils@depFixes#egg=biosimulators_utils[containers,bngl,cellml,lems,neuroml,sbml,smoldyn]"
# - name: Intall BioSimulators Test Suite
# run: |
# python3.11 -m pip install -e .[all]
# python3.11 --version
# python3.11 -m pip freeze
# - name: Install Poetry
# env:
# POETRY_VERSION: "1.7.1"
# shell: bash
# run: |
# curl -sSL https://install.python-poetry.org | python - -y
# echo "$HOME/.local/bin" >> $GITHUB_PATH
# poetry config virtualenvs.in-project true
# Since we may have projects that use poetry, and singularity containers are not fully self-contained
# we need to avoid accidentally using the test-suite's poetry installation, and not the one intended
# to be used in the singularity container
- name: Install Virtualized Poetry
shell: bash
run: |
mkdir -p /home/runner/poetry-install-dir
python3.11 -m venv /home/runner/poetry-install-dir
/home/runner/poetry-install-dir/bin/python -m pip install -U pip setuptools
/home/runner/poetry-install-dir/bin/python -m pip install poetry
- name: Install BioSimulators Test Suite with Poetry
shell: bash
run: /home/runner/poetry-install-dir/bin/poetry install --all-extras
- name: Login into Docker registries
run: |
# Docker Hub
docker login \
--username ${{ secrets.DOCKER_HUB_USERNAME }} \
--password ${{ secrets.DOCKER_HUB_TOKEN }}
# BioSimulators Docker registry (GHCR)
docker login ${{ secrets.DOCKER_REGISTRY_URL }} \
--username ${{ secrets.DOCKER_REGISTRY_USERNAME }} \
--password ${{ secrets.DOCKER_REGISTRY_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:
# run: |
# python3.11 -m pip install --force-reinstall "requests==2.31.0"
# python3.11 -m pip install --force-reinstall "urllib3==1.26.20"
# python3.11 -c "from biosimulators_test_suite.exec_gh_action import ValidateCommitSimulatorGitHubAction; ValidateCommitSimulatorGitHubAction().run(); exit();"
working-directory: ${{ github.workspace }}
run: |
/home/runner/poetry-install-dir/bin/poetry run python -c "from biosimulators_test_suite.exec_gh_action import ValidateCommitSimulatorGitHubAction; ValidateCommitSimulatorGitHubAction().run(); exit();"
- 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@v4
if: success() || failure()
with:
name: Validation test results
path: ${{ github.workspace }}/.biosimulators-test-suite-results.json
if-no-files-found: warn