Skip to content

Commit 33ddfa2

Browse files
Add Build CI (#46)
* Add matrix-enabled CI workflow * Add manifests for gcc, intel, oneapi and [+~]use_access_fms, add standard datafile * Forgot to put in the standard data, whoops * Add FMS dependency to manifests with ~use_access_fms * Add gcc-runtime to manifests with oneapi * Specify FMS ~openmp in manifests * Specify FMS precision=64 in manifests --------- Co-authored-by: Dougie Squire <[email protected]>
1 parent 20faef7 commit 33ddfa2

8 files changed

+125
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"intel_compiler": "[email protected]",
3+
"gcc_compiler": "[email protected]",
4+
"oneapi_compiler": "[email protected]"
5+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
spack:
2+
specs:
3+
# *_compiler is defined in the .github/build-ci/data/standard.json file
4+
- access-generic-tracers@git.{{ ref }} ~use_access_fms
5+
packages:
6+
fms:
7+
require:
8+
- '@git.2025.02=2025.02 ~openmp precision=64'
9+
all:
10+
require:
11+
- '%{{ gcc_compiler }} target=x86_64'
12+
concretizer:
13+
unify: false
14+
view: false
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
spack:
2+
specs:
3+
# *_compiler is defined in the .github/build-ci/data/standard.json file
4+
- access-generic-tracers@git.{{ ref }} +use_access_fms
5+
packages:
6+
all:
7+
require:
8+
- '%{{ gcc_compiler }} target=x86_64'
9+
concretizer:
10+
unify: false
11+
view: false
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
spack:
2+
specs:
3+
# *_compiler is defined in the .github/build-ci/data/standard.json file
4+
- access-generic-tracers@git.{{ ref }} ~use_access_fms
5+
packages:
6+
fms:
7+
require:
8+
- '@git.2025.02=2025.02 ~openmp precision=64'
9+
all:
10+
require:
11+
- '%{{ intel_compiler }} target=x86_64'
12+
concretizer:
13+
unify: false
14+
view: false
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
spack:
2+
specs:
3+
# *_compiler is defined in the .github/build-ci/data/standard.json file
4+
- access-generic-tracers@git.{{ ref }} +use_access_fms
5+
packages:
6+
all:
7+
require:
8+
- '%{{ intel_compiler }} target=x86_64'
9+
concretizer:
10+
unify: false
11+
view: false
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
spack:
2+
specs:
3+
# *_compiler is defined in the .github/build-ci/data/standard.json file
4+
- access-generic-tracers@git.{{ ref }} ~use_access_fms
5+
packages:
6+
fms:
7+
require:
8+
- '@git.2025.02=2025.02 ~openmp precision=64'
9+
gcc-runtime:
10+
require:
11+
- '%gcc'
12+
all:
13+
require:
14+
- '%{{ oneapi_compiler }} target=x86_64'
15+
concretizer:
16+
unify: false
17+
view: false
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
spack:
2+
specs:
3+
# *_compiler is defined in the .github/build-ci/data/standard.json file
4+
- access-generic-tracers@git.{{ ref }} +use_access_fms
5+
packages:
6+
gcc-runtime:
7+
require:
8+
- '%gcc'
9+
all:
10+
require:
11+
- '%{{ oneapi_compiler }} target=x86_64'
12+
concretizer:
13+
unify: false
14+
view: false

.github/workflows/ci.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Build
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- main
7+
jobs:
8+
pre-ci:
9+
name: Pre-CI
10+
runs-on: ubuntu-latest
11+
outputs:
12+
matrix: ${{ steps.set-matrix.outputs.matrix }}
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Set up matrix
17+
id: set-matrix
18+
# Find all relevant files under .github/build-ci/manifests
19+
# then output them as a JSON array (minus the last comma)
20+
run: |
21+
files=$(find .github/build-ci/manifests/ -iname '*.j2' -printf '"%p",')
22+
echo "matrix=[${files%,}]" >> $GITHUB_OUTPUT
23+
24+
ci:
25+
name: CI
26+
needs: pre-ci
27+
strategy:
28+
fail-fast: false
29+
max-parallel: 3
30+
matrix:
31+
file: ${{ fromJson(needs.pre-ci.outputs.matrix) }}
32+
uses: access-nri/build-ci/.github/workflows/ci.yml@v2
33+
with:
34+
spack-manifest-path: ${{ matrix.file }}
35+
spack-manifest-data-path: .github/build-ci/data/standard.json
36+
allow-ssh-into-spack-install: false # If true, PR author must ssh into instance to complete job
37+
# spack-packages-ref: main
38+
# spack-config-ref: main
39+
# spack-ref: releases/v0.22

0 commit comments

Comments
 (0)