Singularity container support for run script #7
Workflow file for this run
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
name: SingularityQuicktest | |
on: | |
pull_request: | |
branches: [ dev ] | |
push: | |
branches: [ dev ] | |
jobs: | |
build_and_test: | |
name: Build and test Singularity container | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Maximize build space | |
uses: easimon/maximize-build-space@master | |
with: | |
root-reserve-mb: '32768' | |
remove-docker-images: 'true' | |
remove-android: 'true' | |
remove-haskell: 'true' | |
remove-codeql: 'true' | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Docker | |
uses: docker/setup-buildx-action@v2 | |
with: | |
driver: docker | |
- name: Set up Singularity | |
run: | | |
sudo add-apt-repository -y ppa:apptainer/ppa | |
sudo apt update | |
sudo apt install -y apptainer | |
alias singularity="apptainer" | |
- name: Build Docker image | |
uses: docker/build-push-action@v4 | |
with: | |
file: docker/Dockerfile.finn | |
context: . | |
load: true | |
tags: finn_docker_export:latest | |
- name: Build Singularity image | |
run: singularity build finn_singularity_image.sif docker-daemon://finn_docker_export:latest | |
- name: Run quicktest | |
run: | | |
export FINN_ROOT=$(pwd) | |
export FINN_BUILD_DIR=/tmp/finn_gha | |
export FINN_INST_NAME=finn_gha | |
export FINN_SINGULARITY=finn_singularity_image.sif | |
./run-docker.sh quicktest |