Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/build-ci/config/repos.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
repos:
# Note: We need to redeclare access_spack_packages above builtin in this scope
# otherwise builtin will resolve to a higher precedence than our
# access_spack_packages, which errors out sometimes where we have our own
# reimplementation (eg. fiat).
# The actual branch/destination values are still taken from lower scopes.
access_spack_packages:
git: https://github.com/ACCESS-NRI/access-spack-packages.git
builtin: $CALLER_REPOSITORY_PATH/repos/spack_repo/builtin
32 changes: 5 additions & 27 deletions .github/workflows/build-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@ on:
- 'access/**'
workflow_dispatch:
inputs:
upstream-spack-packages-ref:
description: 'builtin spack-packages ref to use'
required: true
type: string
access-spack-packages-ref:
description: 'access-spack-packages ref to use'
required: true
type: string
spack-config-ref:
description: 'spack-config ref to use'
required: true
Expand All @@ -40,30 +32,21 @@ jobs:
container: ghcr.io/access-nri/build-ci-runner:rocky
env:
# Note, this needs to be updated in line with refs in the CI job below
BUILD_CI_WORKFLOW_VERSION: v3
BUILD_CI_WORKFLOW_VERSION: v4
# Which directory under access-nri/access-spack-packages contains the spack packages
ACCESS_SPACK_PACKAGES_ROOT_DIR: spack_repo/access/nri/packages
outputs:
# Matrices used in CI job
manifest-matrix: ${{ steps.set-manifest-matrix.outputs.matrix }}
exclude-matrix: ${{ steps.set-manifest-matrix.outputs.exclude-matrix }}
# packages repositories
builtin-spack-packages-ref: ${{ inputs.upstream-spack-packages-ref || github.event.pull_request.head.sha }}
access-spack-packages-ref: ${{ inputs.access-spack-packages-ref || steps.defaults.outputs.access-spack-packages-ref }}
# Global defaults for CI job
spack-config-ref: ${{ inputs.spack-config-ref || steps.defaults.outputs.spack-config-ref }}
spack-ref: ${{ inputs.spack-ref || steps.defaults.outputs.spack-ref }}
steps:
- name: Checkout upstream-spack-packages-ref
uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.ref || inputs.upstream-spack-packages-ref }}

- name: Checkout access-spack-packages
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
repository: access-nri/access-spack-packages
ref: ${{ inputs.access-spack-packages-ref }}

- name: Get packages from access-spack-packages
id: access-spack-packages
Expand All @@ -85,7 +68,7 @@ jobs:
token: ${{ secrets.SPACK_INSTALL_COMMAND_PAT }}

- name: Checkout build-ci
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
repository: access-nri/build-ci
ref: ${{ env.BUILD_CI_WORKFLOW_VERSION }}
Expand All @@ -98,13 +81,11 @@ jobs:
run: |
default_spack_ref=$(yq '.on.workflow_call.inputs."spack-ref".default' .github/workflows/ci.yml)
default_spack_config_ref=$(yq '.on.workflow_call.inputs."spack-config-ref".default' .github/workflows/ci.yml)
default_access_spack_packages_ref=$(yq '.on.workflow_call.inputs."access-spack-packages-ref".default' .github/workflows/ci.yml)

echo "Default refs from ${{ env.BUILD_CI_WORKFLOW_VERSION }}: spack-ref=$default_spack_ref, spack-config-ref=$default_spack_config_ref, access-spack-packages-ref=$default_access_spack_packages_ref"
echo "Default refs from ${{ env.BUILD_CI_WORKFLOW_VERSION }}: spack-ref=$default_spack_ref, spack-config-ref=$default_spack_config_ref"

echo "spack-ref=$default_spack_ref" >> $GITHUB_OUTPUT
echo "spack-config-ref=$default_spack_config_ref" >> $GITHUB_OUTPUT
echo "access-spack-packages-ref=$default_access_spack_packages_ref" >> $GITHUB_OUTPUT

ci:
name: CI
Expand All @@ -124,19 +105,16 @@ jobs:
package: ${{ fromJson(needs.setup-ci.outputs.manifest-matrix) }}
# Exclude bundles and packages that can't build with build-ci
exclude: ${{ fromJson(needs.setup-ci.outputs.exclude-matrix) }}
uses: access-nri/build-ci/.github/workflows/ci.yml@v3
uses: access-nri/build-ci/.github/workflows/ci.yml@v4
with:
spack-manifest-repository: ${{ matrix.package.repository }}
spack-manifest-repository-ref: ${{ matrix.package.ref }}
spack-manifest-path: ${{ matrix.package.filepath }}
spack-manifest-data-path: .github/build-ci/data/standard.json
spack-manifest-data-pairs: |-
package ${{ matrix.package.template_value }}
ref: ${{ matrix.package.ref }}
spack-config-ref: ${{ needs.setup-ci.outputs.spack-config-ref }}
spack-ref: ${{ needs.setup-ci.outputs.spack-ref }}
builtin-spack-packages-ref: ${{ needs.setup-ci.outputs.builtin-spack-packages-ref }}
access-spack-packages-ref: ${{ needs.setup-ci.outputs.access-spack-packages-ref }}
# Workflow dispatch can switch depending on cluster/GitHub resourcing, otherwise run self-hosted
run-self-hosted: ${{ inputs.run-self-hosted || true }}
secrets:
Expand Down