-
Notifications
You must be signed in to change notification settings - Fork 6
97 lines (90 loc) · 3.32 KB
/
cron-2023.5-core-macos-latest.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: cron-2023.5-core-macos-latest
# Edit these four variables as necessary, everything else should work as-is
env:
CONF_PLATFORM: macos-latest
CONF_DISTRO: core
CONF_EPOCH: '2023.5'
CONF_ISSUE_NUM: 71
on:
workflow_dispatch: {}
schedule:
# dev - every 8 hours, starting at the zeroth hour
# - cron: '37 0,8,16 * * *'
# rel - every other day
- cron: '37 3 */2 * *'
jobs:
conf:
runs-on: ubuntu-latest # this job is always run on linux
outputs:
platform: ${{ steps.set-vars.outputs.platform }}
distro: ${{ steps.set-vars.outputs.distro }}
epoch: ${{ steps.set-vars.outputs.epoch }}
issue-number: ${{ steps.set-vars.outputs.issue-number }}
steps:
- name: set-vars
id: set-vars
run: |
echo "::set-output name=platform::$CONF_PLATFORM"
echo "::set-output name=distro::$CONF_DISTRO"
echo "::set-output name=epoch::$CONF_EPOCH"
echo "::set-output name=issue-number::$CONF_ISSUE_NUM"
integrate:
needs: conf
runs-on: ${{ needs.conf.outputs.platform }}
outputs:
pkgs: ${{ steps.destructure.outputs.pkgs }}
metapackage-spec: ${{ steps.destructure.outputs.metapackage-spec }}
q2-channel: ${{ steps.destructure.outputs.q2-channel }}
steps:
- uses: actions/checkout@v2
- name: destructure metapackage
id: destructure
uses: ./.github/actions/destructure-metapackage
with:
distro: ${{ needs.conf.outputs.distro }}
epoch: ${{ needs.conf.outputs.epoch }}
test-package:
name: test ${{ matrix.pkg.name }}
needs: [conf, integrate]
runs-on: ${{ needs.conf.outputs.platform }}
strategy:
fail-fast: false
matrix:
pkg: ${{ fromJson(needs.integrate.outputs.pkgs) }}
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/configure-conda
- uses: ./.github/actions/test-package
with:
pkg-url: ${{ matrix.pkg.url }}
q2-channel: ${{ needs.integrate.outputs.q2-channel }}
metapackage-spec: ${{ needs.integrate.outputs.metapackage-spec }}
phone-home:
needs: [conf, test-package]
runs-on: ${{ needs.conf.outputs.platform }}
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/configure-conda
- uses: ./.github/actions/phone-home-pass
with:
token: ${{ secrets.LIBRARY_TOKEN }}
epoch: ${{ needs.conf.outputs.epoch }}
distro: ${{ needs.conf.outputs.distro }}
platform: ${{ needs.conf.outputs.platform }}
comment-on-any-failure:
runs-on: ubuntu-latest # this job is always run on linux
needs: [conf, integrate, test-package, phone-home]
if: |
always() && (needs.conf.result == 'failure' ||
needs.integrate.result == 'failure' ||
needs.test-package.result == 'failure' ||
needs.phone-home.result == 'failure')
steps:
- name: comment on failure
uses: peter-evans/create-or-update-comment@v1
with:
issue-number: ${{ needs.conf.outputs.issue-number }}
body: >
[GHA run](https://github.com/qiime2/package-integration/actions/runs/${{ github.run_id }})
${{ github.run_number }} for ${{ needs.conf.outputs.epoch }}
on ${{ needs.conf.outputs.platform }} failed.