-
Notifications
You must be signed in to change notification settings - Fork 15
100 lines (86 loc) · 3.17 KB
/
Copy pathbuild-hpc.yml
File metadata and controls
100 lines (86 loc) · 3.17 KB
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: build-hpc
on:
# Trigger the workflow on all pull requests
pull_request: ~
# Allow workflow to be dispatched on demand
workflow_dispatch: ~
# Trigger after public PR approved for CI
pull_request_target:
types: [labeled]
env:
ECLAND_TOOLS: ${{ github.workspace }}/.github/tools
CTEST_PARALLEL_LEVEL: 1
jobs:
ci-hpc:
name: ci-hpc
if: ${{ !github.event.pull_request.head.repo.fork && github.event.action != 'labeled' || github.event.label.name == 'approved-for-ci' }}
strategy:
fail-fast: false
matrix:
name:
- ac-cpu intel
- ac-cpu nvhpc
include:
- name: ac-cpu intel
site: ac-batch
sbatch_options: |
#SBATCH --time=00:20:00
#SBATCH --nodes=1
#SBATCH --ntasks=4
#SBATCH --cpus-per-task=32
#SBATCH --hint=nomultithread
#SBATCH --mem=60GB
#SBATCH --qos=np
arch: ecmwf/hpc2020/intel/2023.2.0/hpcx-openmpi/2.9.0
build_options: ~
- name: ac-cpu nvhpc
site: ac-batch
sbatch_options: |
#SBATCH --time=00:20:00
#SBATCH --nodes=1
#SBATCH --ntasks=4
#SBATCH --cpus-per-task=32
#SBATCH --hint=nomultithread
#SBATCH --mem=60GB
#SBATCH --qos=np
arch: ecmwf/hpc2020/nvhpc/24.5/hpcx-openmpi/2.17.1
build_options: ~
runs-on: [self-hosted, linux, hpc]
env:
GH_TOKEN: ${{ github.token }}
steps:
- uses: ecmwf-actions/reusable-workflows/ci-hpc-generic@v2
with:
site: ${{ matrix.site }}
troika_user: ${{ secrets.HPC_CI_SSH_USER }}
sbatch_options: ${{ matrix.sbatch_options }}
template: |
REPO=${{ github.event.pull_request.head.repo.full_name || github.repository }}
SHA=${{ github.event.pull_request.head.sha || github.sha }}
{ set +x; } 2>/dev/null # trace off
echo "::group::Checkout $(basename $REPO)"
{ set -x; } 2>/dev/null # trace on
mkdir -p $REPO
pushd $REPO
git init
git remote add origin ${{ github.server_url }}/$REPO
git fetch origin $SHA
git reset --hard FETCH_HEAD
{ set +x; } 2>/dev/null # trace off
echo "::endgroup::"
echo "::group::ecland-bundle create"
{ set -x; } 2>/dev/null # trace on
./ecland-bundle create
{ set +x; } 2>/dev/null # trace off
echo "::endgroup::"
echo "::group::ecland-bundle build"
{ set -x; } 2>/dev/null # trace on
./ecland-bundle build --arch arch/${{ matrix.arch }} --ninja --keep-going --retry-verbose ${{ matrix.build_options }}
{ set +x; } 2>/dev/null # trace off
echo "::endgroup::"
echo "::group::ecLand test"
{ set -x; } 2>/dev/null # trace on
export IFSBENCH_ARCH=atos
ctest --test-dir build/ecland -VV --output-on-failure
{ set +x; } 2>/dev/null # trace off
echo "::endgroup::"