Skip to content

Commit

Permalink
Merge pull request #2 from haampie-spack/main
Browse files Browse the repository at this point in the history
Fix macOS and allow pinning of spack
  • Loading branch information
haampie authored Jul 5, 2021
2 parents 49dbb26 + 3bab483 commit a18a7df
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 12 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,20 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04, ubuntu-20.04]
os:
- ubuntu-18.04
- ubuntu-20.04
- macos-10.15

steps:
- uses: actions/[email protected]

- name: "Set up Spack"
- name: Set up Spack
uses: ./
with:
os: ${{ matrix.os }}
ref: develop
- run: spack --version
- run: spack config blame config
- run: spack install zlib
- run: which patchelf
- run: which patchelf
17 changes: 12 additions & 5 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
name: 'Setup Spack'
description: 'Setup Spack and its dependencies'
name: "Setup Spack"
description: "Setup Spack and its dependencies"
inputs:
os:
description: 'Runner operating system (ubuntu-18.04, ubuntu20.04)'
description: "Operating system (ubuntu-18.04, ubuntu-20.04, macos-10.15)"
required: true
ref:
description: "Version of Spack (develop, v0.16.2)"
required: false
default: develop
runs:
using: "composite"
steps:
- name: Install Spack's dependencies
run: |
curl -LfSs -o spack.tar.zstd https://github.com/haampie-spack/setup-spack/releases/download/develop/${{ inputs.os }}.tar.zst
tar --use-compress-program="zstd" -xf spack.tar.zstd -C ~/
TAR=tar
if [ "$RUNNER_OS" == macOS ]; then TAR=gtar; fi
$TAR --use-compress-program=zstd -xf spack.tar.zstd -C ~/
echo "$HOME/.setup-spack/view/bin" >> $GITHUB_PATH
shell: bash
- name: Install Spack itself
run: |
git clone --depth 5 https://github.com/spack/spack.git
git clone https://github.com/spack/spack.git
(cd spack && git checkout "${{ inputs.ref }}")
echo "$PWD/spack/bin" >> $GITHUB_PATH
mkdir ~/.spack
echo "config:" > ~/.spack/config.yaml
Expand Down
26 changes: 22 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,31 @@ jobs:
os:
- ubuntu-18.04
- ubuntu-20.04
- macos-10.15

steps:
- uses: actions/[email protected]
- name: "Set up Spack"
- name: Set up Spack
uses: haampie-spack/setup-spack@v1
with:
os: ${{ matrix.os }}
- run: spack --version
- run: spack install zlib
```
ref: develop
- run: |
spack --version
spack install zlib
```
## How is Spack bootstrapped?
This environment is built
https://github.com/haampie-spack/setup-spack/blob/rebuild-spack/spack.yaml
and the binaries are uploaded as release assets to
https://github.com/haampie-spack/setup-spack/releases/tag/develop
Todo:
- [ ] Add checksum verification

0 comments on commit a18a7df

Please sign in to comment.