Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure pull_request workflow runs using labels on Dom's self-hosted runner #274

Merged
merged 8 commits into from
Jul 26, 2022
28 changes: 18 additions & 10 deletions .github/workflows/macos-dom.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
name: macos-dom-build
on:
#pull_request:
# uncomment if we decide to run tests when merging to develop branch
#push:
# # merges to develop branch
# branches: [develop]
pull_request:
# pull request to develop with a label
types: [labeled]
branches: [develop]
workflow_dispatch:
inputs:
template:
description: 'Base spack.yaml template. Default is an empty environment.'
climbfuji marked this conversation as resolved.
Show resolved Hide resolved
required: false
required: true
default: 'jedi-ufs-all'
specs:
description: 'Which specs to add to the template. Default is none (empty string).'
Expand All @@ -20,6 +26,7 @@ defaults:

jobs:
macos-dom-build:
if: ${{ github.event.label.name == 'run-macos-dom' }}
climbfuji marked this conversation as resolved.
Show resolved Hide resolved
runs-on: [self-hosted, macOS, X64, macos-dom]

steps:
Expand All @@ -31,9 +38,9 @@ jobs:
- name: create-env
run: |
source ./setup.sh
spack stack create env --site macos.default --template ${{ inputs.template }} --name ${{ inputs.template }}.macos-dom
spack env activate -d envs/${{ inputs.template }}.macos-dom
spack add ${{ inputs.specs }}
spack stack create env --site macos.default --template ${{ inputs.template || 'jedi-ufs-all' }} --name ${{ inputs.template || 'jedi-ufs-all' }}.macos-dom
spack env activate -d envs/${{ inputs.template || 'jedi-ufs-all' }}.macos-dom
spack add ${{ inputs.specs || '' }}

spack external find
spack external find perl
Expand All @@ -46,8 +53,9 @@ jobs:
spack concretize
spack install --fail-fast

- name: upload-mirror
uses: actions/upload-artifact@v2
with:
name: spack_mirror
path: cache/source_cache
# Skip this - takes forever and isn't necessary
#- name: upload-mirror
# uses: actions/upload-artifact@v2
# with:
# name: spack_mirror
# path: cache/source_cache