Repository navigation
131 lines (126 loc) · 4.67 KB
/
Copy pathcandidate.yml
File metadata and controls
131 lines (126 loc) · 4.67 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: Candidate
# One call per release target: each target's verification waits only for its own build,
# and pull requests run exactly the packaging and verification that releases run.
on:
workflow_call:
inputs:
candidate_sha:
type: string
required: true
target:
type: string
required: true
os:
type: string
required: true
smoke:
description: Smoke-test the packages only. Version-only releases set this because their parent ran every suite.
type: boolean
default: false
permissions:
contents: read
jobs:
media:
uses: ./.github/workflows/media.yml
with:
candidate_sha: ${{ inputs.candidate_sha }}
target: ${{ inputs.target }}
build:
name: Build
needs: media
runs-on: ${{ inputs.os }}
timeout-minutes: 45
env:
CANDIDATE_SHA: ${{ inputs.candidate_sha }}
steps:
- uses: actions/checkout@v7
with:
ref: ${{ inputs.candidate_sha }}
- uses: ./.github/actions/setup
with:
builder: "true"
- uses: actions/download-artifact@v8
with:
name: media-${{ inputs.target }}
path: work/media-build/${{ inputs.target }}
- name: Use the ffmpeg and ffprobe built from source
run: bun scripts/provision-media.ts --from work/media-build/${{ inputs.target }}
- name: Package
run: ${{ runner.os == 'Windows' && 'bun run dist:win:all' || runner.os == 'macOS' && 'bun run dist:mac:all' || 'bun run dist' }}
env:
CSC_IDENTITY_AUTO_DISCOVERY: false
- name: Retain exact candidate and verification inputs
run: bun scripts/ci-stage.ts pack ${{ inputs.target }}
- uses: actions/upload-artifact@v7
with:
name: candidate-${{ inputs.target }}
path: work/candidate/
if-no-files-found: error
retention-days: 14
verify:
name: Verify
needs: build
runs-on: ${{ inputs.os }}
timeout-minutes: 60
env:
CANDIDATE_SHA: ${{ inputs.candidate_sha }}
steps:
- uses: actions/checkout@v7
with:
ref: ${{ inputs.candidate_sha }}
- uses: ./.github/actions/setup
with:
builder: "true"
- uses: actions/download-artifact@v8
with:
name: candidate-${{ inputs.target }}
path: work/candidate
- name: Restore exact candidate
run: bun scripts/ci-candidate.ts restore ${{ inputs.target }} work/candidate .
- name: Create fixtures before installed and launcher checks
run: bun tests/create-fixtures.ts
env:
FFMPEG_PATH: ${{ github.workspace }}/resources/media/ffmpeg${{ runner.os == 'Windows' && '.exe' || '' }}
FFPROBE_PATH: ${{ github.workspace }}/resources/media/ffprobe${{ runner.os == 'Windows' && '.exe' || '' }}
- name: Verify packaged media, installer, in-app update and editor workflows
run: bun run verify:package
env:
ATTACUT_PACKAGE_SMOKE: ${{ inputs.smoke && '1' || '' }}
- name: Record successful verification of unchanged candidate
run: bun scripts/ci-stage.ts receipt ${{ inputs.target }}
- uses: actions/upload-artifact@v7
with:
name: verified-${{ inputs.target }}
path: work/verified/
if-no-files-found: error
retention-days: 14
- name: Retain in-app update evidence
if: always() && runner.os == 'Windows'
continue-on-error: true
uses: actions/upload-artifact@v7
with:
name: update-e2e-${{ inputs.target }}
path: work/update-e2e/
if-no-files-found: ignore
retention-days: 14
overwrite: true
- name: Retain browser retry traces
if: always()
continue-on-error: true
uses: actions/upload-artifact@v7
with:
name: traces-${{ inputs.target }}
path: test-results/**/trace.zip
if-no-files-found: ignore
retention-days: 14
overwrite: true
- name: Retain failure diagnostics
if: failure()
continue-on-error: true
uses: actions/upload-artifact@v7
with:
name: diagnostics-${{ inputs.target }}
path: test-results/
if-no-files-found: ignore
retention-days: 14
overwrite: true