-
Notifications
You must be signed in to change notification settings - Fork 3
79 lines (64 loc) · 2.06 KB
/
spack.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
name: spack
on:
push:
pull_request:
branches:
- master
jobs:
test-spack:
runs-on: ubuntu-22.04
defaults:
run:
shell: bash
strategy:
matrix:
spack-version: ['develop']
micro-arch: ['x86_64_v3']
fail-fast: false
env:
SPACK_DISABLE_LOCAL_CONFIG: "true"
SPACK_USER_CACHE_PATH: "/tmp/spack"
steps:
- name: install additional ubuntu packages
run: |
sudo apt-get update -qq
sudo apt-get install -y gfortran
- name: checkout
uses: actions/checkout@v4
with:
path: hwmalloc
- name: clone ghex spack repo
run: git clone --depth=1 https://github.com/ghex-org/spack-repos.git repos
- name: clone spack
run: git clone -c feature.manyFiles=true --depth 1 --branch ${{ matrix.spack-version }} https://github.com/spack/spack.git spack
- name: initialize spack and add online buildcache
run: |
cat <<EOF > spack/etc/spack/config.yaml
config:
install_tree:
padded_length: 128
build_jobs: 4
EOF
cat <<EOF > spack/etc/spack/packages.yaml
packages:
all:
require:
- 'target=${{ matrix.micro-arch }}'
- '%gcc'
EOF
source spack/share/spack/setup-env.sh
spack compiler find
spack mirror add --unsigned local-buildcache oci://ghcr.io/boeschf/spack-buildcache
spack repo add repos
spack reindex
- name: build-and-test
run: |
source spack/share/spack/setup-env.sh
# print dependencies
spack spec -I --reuse hwmalloc@develop
# dev-build does not respect test dependencies - workaround
spack install --reuse googletest
spack load googletest
# need `--dirty` here for environment variables and googletest test dependency to propagate
cd hwmalloc
spack dev-build --test=root --dirty --reuse hwmalloc@develop