forked from argonne-lcf/THAPI-spack
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (60 loc) · 2.12 KB
/
Copy pathcron.yml
File metadata and controls
61 lines (60 loc) · 2.12 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
name: Install Thapi master and develop every week
on:
schedule:
# At 00:00 on Sunday.”
- cron: "0 0 * * 0"
workflow_dispatch:
env:
SPACK_OPT: "--show-log-on-error --fail-fast"
CACHE_DIR: "${{ github.workspace }}/thapi_cache_${{ github.run_id }}"
jobs:
# Install with nothing pre-arranged: no `spack external find`, no system llvm,
# no build cache. Checks that THAPI installs on a bare machine.
from_scratch:
strategy:
fail-fast: false
matrix:
version: ['thapi@master', 'thapi@develop']
runs-on: ubuntu-latest
name: Install ${{ matrix.version }} (from scratch)
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Checkout Spack
uses: actions/checkout@v6
with:
repository: spack/spack
ref: releases/latest
path: external/spack
- name: Activate
run: |
. external/spack/share/spack/setup-env.sh
spack repo add ./
- name: Install ${{ matrix.version }}
run: |
. external/spack/share/spack/setup-env.sh
spack install $SPACK_OPT ${{ matrix.version }}
# Exercise the same fast path the PR CI uses (external find + apt llvm +
# hand-declared +python external). PR CI only runs when someone opens a PR, so
# without this the fast path can rot unnoticed during a quiet week.
fast_path:
runs-on: ubuntu-latest
name: Install thapi@develop (fast path)
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Checkout dependencies (spack,...)
uses: ./.github/actions/setup-thapi-deps
with:
cache-dir: ${{ env.CACHE_DIR }}
install-llvm: 'true'
- name: Check llvm resolves to the external
run: |
. external/spack/share/spack/setup-env.sh
spack spec -j thapi@develop ^llvm@${LLVM_FULL_VER} | grep -v '^==>' \
| jq -e '.spec.nodes[] | select(.name == "llvm") | .external.path' \
|| { echo "llvm did not resolve to the external"; exit 1; }
- name: Install thapi@develop
run: |
. external/spack/share/spack/setup-env.sh
spack install $SPACK_OPT thapi@develop ^llvm@${LLVM_FULL_VER}