-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
Mochi Test Build Action | ||
======================= | ||
|
||
This action is meant to be used by the Mochi collection of packages | ||
to test that they can be built using Spack (their latest version or | ||
any other specified version). The following is a minimal example of | ||
github workflow that tests every day that the latest version of the | ||
package can be built with the develop branch of Spack. | ||
|
||
```yaml | ||
name: Build the latest release using Spack | ||
|
||
on: | ||
workflow_dispatch: {} | ||
schedule: | ||
- cron: "0 0 * * *" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
name: Build the latest version of the package | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: mochi-hpc/mochi-test-build-action@main | ||
``` | ||
This workflow will infer the name of the package to install from the | ||
name of the repository running the action (for instance if mochi-hpc/mochi-margo | ||
runs the action, then the action will install mochi-margo). | ||
Here is a more complete version of the workflow, specifying all the possible | ||
inputs: | ||
```yaml | ||
name: Build the latest release using Spack | ||
|
||
on: | ||
workflow_dispatch: {} | ||
schedule: | ||
- cron: "0 0 * * *" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
name: Build the latest version of the package | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: mochi-hpc/mochi-test-build-action@main | ||
with: | ||
# The package name will default to the name of the repository | ||
package-name: mochi-margo | ||
# The version will default to whatever is the preferred version for the package | ||
# Note that the "@" is required before the version | ||
package-version: '@1.2.3' | ||
# If specified, build-cache-token should be set to ${{ secrets.GITHUB_TOKEN }}, | ||
# this will make the workflow push any dependencies built to the mochi-spack-buildcache | ||
# after a successful installation of the package | ||
build-cache-token: ${{ secrets.GITHUB_TOKEN }} | ||
# Version of spack to use (default is the develop branch) | ||
spack-version: v0.22.1 | ||
# Reference (main or a commit hash) to use for mochi-spack-packages (default is main) | ||
mochi-spack-packages-version: main | ||
``` | ||