diff --git a/.github/workflows/example.yml b/.github/workflows/example.yml index 5a67e56..175d6b7 100644 --- a/.github/workflows/example.yml +++ b/.github/workflows/example.yml @@ -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/checkout@v1.0.0 - - 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 \ No newline at end of file + - run: which patchelf diff --git a/action.yml b/action.yml index 790dea0..6e92b3d 100644 --- a/action.yml +++ b/action.yml @@ -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 diff --git a/readme.md b/readme.md index 0d2220d..185c004 100644 --- a/readme.md +++ b/readme.md @@ -15,13 +15,31 @@ jobs: os: - ubuntu-18.04 - ubuntu-20.04 + - macos-10.15 steps: - uses: actions/checkout@v1.0.0 - - 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 -``` \ No newline at end of file + 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 \ No newline at end of file