Skip to content

Commit a18a7df

Browse files
authored
Merge pull request #2 from haampie-spack/main
Fix macOS and allow pinning of spack
2 parents 49dbb26 + 3bab483 commit a18a7df

File tree

3 files changed

+41
-12
lines changed

3 files changed

+41
-12
lines changed

.github/workflows/example.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,20 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
os: [ubuntu-18.04, ubuntu-20.04]
15+
os:
16+
- ubuntu-18.04
17+
- ubuntu-20.04
18+
- macos-10.15
1619

1720
steps:
1821
- uses: actions/[email protected]
1922

20-
- name: "Set up Spack"
23+
- name: Set up Spack
2124
uses: ./
2225
with:
2326
os: ${{ matrix.os }}
27+
ref: develop
2428
- run: spack --version
2529
- run: spack config blame config
2630
- run: spack install zlib
27-
- run: which patchelf
31+
- run: which patchelf

action.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,28 @@
1-
name: 'Setup Spack'
2-
description: 'Setup Spack and its dependencies'
1+
name: "Setup Spack"
2+
description: "Setup Spack and its dependencies"
33
inputs:
44
os:
5-
description: 'Runner operating system (ubuntu-18.04, ubuntu20.04)'
5+
description: "Operating system (ubuntu-18.04, ubuntu-20.04, macos-10.15)"
66
required: true
7+
ref:
8+
description: "Version of Spack (develop, v0.16.2)"
9+
required: false
10+
default: develop
711
runs:
812
using: "composite"
913
steps:
1014
- name: Install Spack's dependencies
1115
run: |
1216
curl -LfSs -o spack.tar.zstd https://github.com/haampie-spack/setup-spack/releases/download/develop/${{ inputs.os }}.tar.zst
13-
tar --use-compress-program="zstd" -xf spack.tar.zstd -C ~/
17+
TAR=tar
18+
if [ "$RUNNER_OS" == macOS ]; then TAR=gtar; fi
19+
$TAR --use-compress-program=zstd -xf spack.tar.zstd -C ~/
1420
echo "$HOME/.setup-spack/view/bin" >> $GITHUB_PATH
1521
shell: bash
1622
- name: Install Spack itself
1723
run: |
18-
git clone --depth 5 https://github.com/spack/spack.git
24+
git clone https://github.com/spack/spack.git
25+
(cd spack && git checkout "${{ inputs.ref }}")
1926
echo "$PWD/spack/bin" >> $GITHUB_PATH
2027
mkdir ~/.spack
2128
echo "config:" > ~/.spack/config.yaml

readme.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,31 @@ jobs:
1515
os:
1616
- ubuntu-18.04
1717
- ubuntu-20.04
18+
- macos-10.15
1819

1920
steps:
2021
- uses: actions/[email protected]
21-
- name: "Set up Spack"
22+
- name: Set up Spack
2223
uses: haampie-spack/setup-spack@v1
2324
with:
2425
os: ${{ matrix.os }}
25-
- run: spack --version
26-
- run: spack install zlib
27-
```
26+
ref: develop
27+
- run: |
28+
spack --version
29+
spack install zlib
30+
```
31+
32+
33+
34+
## How is Spack bootstrapped?
35+
36+
This environment is built
37+
38+
https://github.com/haampie-spack/setup-spack/blob/rebuild-spack/spack.yaml
39+
40+
and the binaries are uploaded as release assets to
41+
42+
https://github.com/haampie-spack/setup-spack/releases/tag/develop
43+
44+
Todo:
45+
- [ ] Add checksum verification

0 commit comments

Comments
 (0)