-
Notifications
You must be signed in to change notification settings - Fork 51
49 lines (40 loc) · 1.3 KB
/
singularity.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
name: Singularity
on:
push:
branches:
- main
tags: '*'
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CONTAINER_NAME: palace.sif
jobs:
build-and-test-singularity:
runs-on: palace_ubuntu-latest_16-core
steps:
- uses: actions/checkout@v4
- uses: singularityhub/install-singularity@main
- name: Build container
run: |
sudo singularity build --bind ${{ github.workspace }}:/opt/palace-src:ro \
$CONTAINER_NAME singularity/singularity.def
- name: Run tests
env:
NUM_PROC_TEST_MAX: '8'
run: |
# Configure environment
export NUM_PROC_TEST=$(nproc 2> /dev/null || sysctl -n hw.ncpu)
if [[ "$NUM_PROC_TEST" -gt "$NUM_PROC_TEST_MAX" ]]; then
NUM_PROC_TEST=$NUM_PROC_TEST_MAX
fi
export PALACE_TEST="singularity run $(pwd)/$CONTAINER_NAME"
# Run tests
julia --project=test/examples -e 'using Pkg; Pkg.instantiate()'
julia --project=test/examples --color=yes test/examples/runtests.jl
- uses: actions/upload-artifact@v4
with:
name: ${{ env.CONTAINER_NAME }}
path: ${{ env.CONTAINER_NAME }}
retention-days: 1