forked from ROCm/dyninst
-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (71 loc) · 2.17 KB
/
spack-build.yaml
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
name: Spack Build
on:
schedule:
- cron: '0 3 * * 0' # Every Sunday at 3AM
workflow_dispatch:
jobs:
get-oses:
runs-on: ubuntu-latest
outputs:
latest: ${{ steps.all.outputs.latest }}
steps:
- name: Checkout
uses: actions/checkout@v4
- id: all
uses: ./.github/actions/os-versions
get-compilers:
runs-on: ubuntu-latest
outputs:
all: ${{ steps.compilers.outputs.value }}
steps:
- name: Checkout
uses: actions/checkout@v4
- id: compilers
shell: bash
run: |
set -ex
script="./.github/scripts/compiler_configs.py"
names=$(python3 ${script} --print-names)
echo "value=${names}" >> $GITHUB_OUTPUT
spack-build:
runs-on: ubuntu-latest
needs: [get-oses, get-compilers]
strategy:
fail-fast: false
matrix:
os: ${{ fromJson(needs.get-oses.outputs.latest) }}
compiler: ${{ fromJson(needs.get-compilers.outputs.all) }}
permissions:
packages: read
container:
image: ghcr.io/dyninst/amd64/${{ matrix.os }}-base:latest
credentials:
username: ${{ github.actor }}
password: ${{ secrets.github_token }}
name: Spack (${{ matrix.os }}, ${{ matrix.compiler }})
steps:
- name: Install dependencies (Ubuntu)
if: ${{ startsWith(matrix.os, 'ubuntu') }}
shell: bash
run: |
set -ex
apt update -qq
apt install -y -qq m4 autoconf python3 python3-dev gettext libgettextpo-dev
- name: Install dependencies (Fedora)
if: ${{ startsWith(matrix.os, 'fedora') }}
shell: bash
run: |
set -ex
yum install -y m4 autoconf python3 python3-devel xz lbzip2 patch gettext
- name: Install spack
shell: bash
run: |
set -ex
git clone --depth=1 --branch=develop https://github.com/spack/spack
spack/bin/spack compiler find
spack/bin/spack external find --not-buildable cmake m4 gettext
- name: Build
shell: bash
run: |
set -ex
spack/bin/spack install -j2 dyninst@master %${{ matrix.compiler }}