Skip to content

Commit a20fc23

Browse files
authored
Add basic build-ci (#6)
1 parent 3b2b38f commit a20fc23

File tree

4 files changed

+65
-0
lines changed

4 files changed

+65
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"gcc_compiler": "gcc@13.2.0",
3+
"intel_compiler": "intel@2021.10.0",
4+
"oneapi_compiler": "oneapi@2025.2.0",
5+
"target": "x86_64"
6+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
spack:
2+
specs:
3+
- access-test-component @git.{{ ref }}
4+
packages:
5+
all:
6+
require:
7+
- '%{{ gcc_compiler }} target={{ target}}'
8+
concretizer:
9+
unify: false
10+
view: false
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
spack:
2+
specs:
3+
- access-test-component @git.{{ ref }}
4+
packages:
5+
all:
6+
require:
7+
- '%{{ intel_compiler }} target={{ target }}'
8+
concretizer:
9+
unify: false
10+
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: 5
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+
allow-ssh-into-spack-install: false # If true, PR author must ssh into instance to complete job
36+
spack-manifest-data-path: .github/build-ci/data/standard.json
37+
# spack-packages-ref: main
38+
# spack-config-ref: main
39+
# spack-ref: releases/v0.22

0 commit comments

Comments
 (0)