-
Notifications
You must be signed in to change notification settings - Fork 1
83 lines (68 loc) · 1.97 KB
/
ci.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
name: Pingvin Build
on:
push:
branches: [main]
tags: ["v*.*.*"]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
id-token: write
contents: read
env:
CONDA_CACHE_NUMBER: 1
defaults:
run:
# See https://github.com/marketplace/actions/setup-miniconda#important
shell: bash -el {0}
jobs:
build-and-test:
#runs-on: ["self-hosted", "1ES.Pool=biomedsigproc-github-NC6s_v3"]
runs-on: ["self-hosted", "1ES.Pool=biomedsigproc-gadgetron-NC6s_v3"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check GPU availability
shell: bash
run: nvidia-smi
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
# Do not specify environment file - see Cache step below
activate-environment: gadgetron
- name: Get Date
id: get-date
shell: bash
run: echo "YEARMONTH=$(date -u +'%Y%m')" >> $GITHUB_ENV
- name: Cache Conda Env
id: cache-conda
uses: actions/cache@v3
with:
path: ${{ env.CONDA }}/envs
key:
conda-${{ runner.os }}-${{ runner.arch }}-${{
hashFiles('environment.yml') }}-${{
env.YEARMONTH }}-${{
env.CONDA_CACHE_NUMBER }}
- name: Update Environment
run: conda env update -n gadgetron -f environment.yml
if: steps.cache-conda.outputs.cache-hit != 'true'
#- name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
- name: Build
run: |
mkdir -p build
cd build/
cmake -G Ninja \
-D CMAKE_BUILD_TYPE=Release \
-D USE_CUDA=ON \
-D USE_MKL=ON \
-D BUILD_DOCUMENTATION=OFF \
-D CMAKE_INSTALL_PREFIX=${CONDA_PREFIX} \
../
ninja
- name: Unit Test
run: |
cd build/
./test_all