-
Notifications
You must be signed in to change notification settings - Fork 0
135 lines (111 loc) · 3.74 KB
/
all.yml
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
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
# TODO: package CLI into separate tar here
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
# This tests only some basic GUI functionality
gui_build_and_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
- 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
- run: ./ci_scripts/compress.sh
- name: Get binary from tar
run: |
mkdir /tmp/decktricks_work
tar xvf ./build/decktricks.tar.xz -C /tmp/decktricks_work
- name: Run GUI e2e scripts
run: ./scripts/run_all_gui_e2e_tests.sh /tmp/decktricks_work/decktricks-gui
# These are separate so that if-no-files-found actually errors if just one is missing {{{
- name: Upload tar
uses: actions/upload-artifact@v4
with:
name: verified-gui-tar
path: ./build/decktricks.tar.xz
if-no-files-found: error
- name: Upload installer desktop
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
uses: actions/upload-artifact@v4
with:
name: verified-gui-installer-script
path: ./build/decktricks-install.sh
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_and_test
- cli_test
- cli_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