-
Notifications
You must be signed in to change notification settings - Fork 487
84 lines (76 loc) · 2.66 KB
/
release-test.yml
File metadata and controls
84 lines (76 loc) · 2.66 KB
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
name: "Release Test"
on:
workflow_run:
workflows: ["Release"]
types: [completed]
workflow_dispatch:
inputs:
ref:
description: 'Git ref (tag or branch) to test'
required: true
default: 'main'
type: string
concurrency:
group: "release-test-${{ github.event_name == 'workflow_dispatch' && github.event.inputs.ref || github.event.workflow_run.head_branch }}"
cancel-in-progress: true
jobs:
status:
if: >-
github.event_name != 'workflow_dispatch' &&
github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
permissions:
statuses: write
steps:
- name: Link Release Test to commit
env:
GH_TOKEN: ${{ github.token }}
run: |
gh api repos/${{ github.repository }}/statuses/${{ github.event.workflow_run.head_sha }} \
-f state=pending \
-f target_url="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
-f context="Release Test" \
-f description="Tests are running"
pipeline:
if: >-
github.event_name == 'workflow_dispatch' ||
github.event.workflow_run.conclusion == 'success'
name: pipeline (${{ matrix.system }})
strategy:
fail-fast: false
matrix:
include:
- system: aarch64-linux
runs-on: '["self-hosted", "linux", "ARM64"]'
- system: x86_64-linux
runs-on: '["self-hosted", "linux", "X64"]'
- system: aarch64-darwin
runs-on: '["self-hosted", "macOS", "ARM64"]'
- system: x86_64-darwin
runs-on: '["macos-15-intel"]'
uses: ./.github/workflows/per-system-pipeline.yml
secrets: inherit
with:
system: ${{ matrix.system }}
runs-on: ${{ matrix.runs-on }}
ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.ref || github.event.workflow_run.head_sha }}
report:
if: >-
always() &&
github.event_name != 'workflow_dispatch' &&
github.event.workflow_run.conclusion == 'success'
needs: pipeline
runs-on: ubuntu-latest
permissions:
statuses: write
steps:
- name: Update commit status
env:
GH_TOKEN: ${{ github.token }}
STATE: ${{ needs.pipeline.result == 'success' && 'success' || 'failure' }}
run: |
gh api repos/${{ github.repository }}/statuses/${{ github.event.workflow_run.head_sha }} \
-f state="$STATE" \
-f target_url="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
-f context="Release Test" \
-f description="Tests $STATE"