-
Notifications
You must be signed in to change notification settings - Fork 0
182 lines (152 loc) · 5.06 KB
/
Copy pathall.yml
File metadata and controls
182 lines (152 loc) · 5.06 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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
name: Test/Build
# TODO: also run cargo clippy?
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
# This tests the CLI and core lib functionality
cli_test:
runs-on: ubuntu-latest
container:
image: gleesus/decktricks
steps:
- name: Preserve $HOME set in the container
run: echo HOME=/root >> "$GITHUB_ENV"
- uses: actions/checkout@v4
- name: Run CLI Tests
run: cargo test
cli_test_release:
runs-on: ubuntu-latest
container:
image: gleesus/decktricks
steps:
- name: Preserve $HOME set in the container
run: echo HOME=/root >> "$GITHUB_ENV"
- uses: actions/checkout@v4
- name: Run CLI Tests (Release)
run: cargo test --release
# TODO: package CLI into separate tar here
gui_test:
runs-on: ubuntu-latest
container:
image: gleesus/decktricks
steps:
- name: Preserve $HOME set in the container
run: echo HOME=/root >> "$GITHUB_ENV"
- uses: actions/checkout@v4
- name: Run GUI Tests
run: cd gui/rust && cargo test
gui_test_release:
runs-on: ubuntu-latest
container:
image: gleesus/decktricks
steps:
- name: Preserve $HOME set in the container
run: echo HOME=/root >> "$GITHUB_ENV"
- uses: actions/checkout@v4
- name: Run GUI Tests (Release)
run: cd gui/rust && cargo test --release
# This tests only some basic GUI functionality
gui_build:
runs-on: ubuntu-latest
container:
image: gleesus/decktricks
steps:
- name: Preserve $HOME set in the container
run: echo HOME=/root >> "$GITHUB_ENV"
- uses: actions/checkout@v4
- run: ./ci_scripts/init.sh
# NOTE: the following steps could be parallelized, if it helps
- run: ./ci_scripts/place_build_assets.sh
- run: ./ci_scripts/cli.sh
- run: ./ci_scripts/gui.sh
- name: Verify GUI tests pass before building
run: cd gui/rust && cargo test --release
- run: ./ci_scripts/compress.sh
- name: Create tarball checksum file
run: |
cd ./build
xxh64sum decktricks.tar.xz > DECKTRICKS_TARBALL_XXH64SUM
# These are separate so that if-no-files-found actually errors if just one is missing {{{
- name: Upload tarball
if: ${{ !env.ACT }}
uses: actions/upload-artifact@v4
with:
name: verified-gui-tar
path: ./build/decktricks.tar.xz
if-no-files-found: error
- name: Upload installer desktop
if: ${{ !env.ACT }}
uses: actions/upload-artifact@v4
with:
name: verified-gui-installer-desktop
path: ./build/decktricks-install.desktop
if-no-files-found: error
- name: Upload installer script
if: ${{ !env.ACT }}
uses: actions/upload-artifact@v4
with:
name: verified-gui-installer-script
path: ./build/decktricks-install.sh
if-no-files-found: error
- name: Upload update script
if: ${{ !env.ACT }}
uses: actions/upload-artifact@v4
with:
name: verified-gui-update-script
path: ./build/decktricks-update.sh
if-no-files-found: error
- name: Upload tarball checksum
if: ${{ !env.ACT }}
uses: actions/upload-artifact@v4
with:
name: verified-gui-tar-checksum
path: ./build/DECKTRICKS_TARBALL_XXH64SUM
if-no-files-found: error
# }}}
# TODO: ensure this is enough gating to prevent branch/main PRs from triggering latest tags
update_latest_branch:
if: github.event_name == 'push'
needs:
- gui_build
- cli_test
- cli_test_release
- gui_test
- gui_test_release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Update latest branch
run: |
./scripts/update_latest_branch.sh
update_latest_release:
if: github.event_name == 'push'
needs:
- update_latest_branch
runs-on: ubuntu-latest
steps:
- run: mkdir /tmp/artifacts
- uses: actions/download-artifact@v4
with:
path: /tmp/artifacts
- run: find /tmp/artifacts
- name: Create latest release
uses: softprops/action-gh-release@v2
#if: startsWith(github.ref, 'refs/tags/')
with:
fail_on_unmatched_files: true
prerelease: true
name: Latest RC
tag_name: latest
make_latest: false
body: A release candidate for pushing out. This has passed all automated tests and should be safe to use, but has not yet received human verification.
files: |
/tmp/artifacts/verified-gui-tar/decktricks.tar.xz
/tmp/artifacts/verified-gui-installer-desktop/decktricks-install.desktop
/tmp/artifacts/verified-gui-installer-script/decktricks-install.sh
/tmp/artifacts/verified-gui-update-script/decktricks-update.sh
/tmp/artifacts/verified-gui-tar-checksum/DECKTRICKS_TARBALL_XXH64SUM