Skip to content

Commit fd25cfe

Browse files
committed
work on v3.0
Signed-off-by: Harmen Stoppels <harmenstoppels@gmail.com>
1 parent b013095 commit fd25cfe

4 files changed

Lines changed: 51 additions & 15 deletions

File tree

.github/workflows/dev.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ jobs:
1010
runs-on: ubuntu-22.04
1111
strategy:
1212
matrix:
13-
ref:
13+
spack_ref:
1414
- develop
15-
- releases/v0.23
15+
- releases/v1.0
1616
steps:
1717
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
1818

1919
- name: Set up Spack
2020
uses: ./
2121
with:
22-
ref: ${{ matrix.ref }}
22+
spack_ref: ${{ matrix.spack_ref }}
2323
buildcache: true
2424
color: true
2525

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## v3.0.0
4+
5+
- **BREAKING**: Renamed `ref` input to `spack_ref` for clarity
6+
- Support Spack v1.x with separate `spack/spack` and `spack/spack-packages` repositories
7+
- Added new inputs: `packages_ref`, `packages_repository`, and `packages_path`
8+
- Automatically clones and configures the packages repository using `spack repo set`
9+
- Removed support for Spack v0.x
10+
311
## v2.1.1
412

513
- For Spack `v0.22.0.dev0` and higher `spack install` without further flags can

README.md

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,20 @@ speed up your actions.
55

66
## Options
77

8-
| Name | Description | Default |
9-
|-------------|--------------------------------------|----------------|
10-
| `ref` | Version of Spack | `"develop"` |
11-
| `buildcache`| Enable the GitHub Action build cache | `true` |
12-
| `color` | Force color output | `true` |
13-
| `path` | Path to install Spack to | `"spack"` |
14-
| `repository`| GitHub repository for Spack | `"spack/spack"`|
8+
| Name | Description | Default |
9+
|-----------------------|--------------------------------------------------|-------------------------|
10+
| `spack_ref` | Version of Spack | `"develop"` |
11+
| `buildcache` | Enable the GitHub Action build cache | `true` |
12+
| `color` | Force color output | `true` |
13+
| `path` | Path to install Spack to | `"spack"` |
14+
| `repository` | GitHub repository for Spack | `"spack/spack"` |
15+
| `packages_repository` | GitHub repository for Spack packages | `"spack/spack-packages"`|
16+
| `packages_path` | Path to install Spack packages repository | `"spack-packages"` |
17+
| `packages_ref` | Version of Spack packages | `"develop"` |
18+
19+
## How It Works
20+
21+
Spack v1.x uses separate repositories: `spack/spack` (the core) and `spack/spack-packages` (the package repository). This action automatically clones both repositories and configures them using `spack repo set --destination <clone dir> builtin`.
1522

1623
## Example: basic setup
1724

@@ -23,8 +30,8 @@ jobs:
2330
- name: Set up Spack
2431
uses: spack/setup-spack@v2
2532
with:
26-
ref: develop # Spack version (examples: develop, releases/v0.23)
27-
buildcache: true # Configure oci://ghcr.io/spack/github-actions-buildcache
33+
spack_ref: develop # Spack version (examples: develop, releases/v1.0)
34+
buildcache: true # Configure oci://ghcr.io/spack/github-actions-buildcache
2835
color: true # Force color output (SPACK_COLOR=always)
2936
path: spack # Where to clone Spack
3037
- run: spack install python

action.yml

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,12 @@ branding:
55
icon: "package"
66
color: "blue"
77
inputs:
8-
ref:
9-
description: "Version of Spack (git ref: develop, releases/v0.23, ...)"
8+
spack_ref:
9+
description: "Version of Spack (git ref: develop, releases/v1.1, ...)"
10+
required: false
11+
default: develop
12+
packages_ref:
13+
description: "Version of Spack packages (git ref: develop, releases/v1.1, ...)"
1014
required: false
1115
default: develop
1216
buildcache:
@@ -25,6 +29,14 @@ inputs:
2529
description: "GitHub repository where Spack or its fork lives"
2630
required: false
2731
default: "spack/spack"
32+
packages_repository:
33+
description: "GitHub repository of the Spack packages repository"
34+
required: false
35+
default: "spack/spack-packages"
36+
packages_path:
37+
description: "Path to install Spack packages repository"
38+
required: false
39+
default: "spack-packages"
2840
runs:
2941
using: "composite"
3042
steps:
@@ -33,7 +45,14 @@ runs:
3345
with:
3446
repository: ${{ inputs.repository }}
3547
path: ${{ inputs.path }}
36-
ref: ${{ inputs.ref }}
48+
ref: ${{ inputs.spack_ref }}
49+
50+
- name: Checkout Spack packages
51+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
52+
with:
53+
repository: ${{ inputs.packages_repository }}
54+
path: ${{ inputs.packages_path }}
55+
ref: ${{ inputs.packages_ref }}
3756

3857
- name: Spack environment variables
3958
run: |
@@ -47,6 +66,8 @@ runs:
4766
if [ ${{ inputs.buildcache }} = "true" ]; then
4867
spack mirror add --unsigned github-actions-buildcache oci://ghcr.io/spack/github-actions-buildcache
4968
fi
69+
# Configure separate packages repository
70+
spack repo set --destination "$(realpath ${{ inputs.packages_path }})" builtin
5071
shell: sh
5172

5273
- name: Create Spack bash shell

0 commit comments

Comments
 (0)