-
Notifications
You must be signed in to change notification settings - Fork 1
133 lines (131 loc) · 4.3 KB
/
build.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
name: 'Build'
on:
push:
branches:
- main
pull_request:
jobs:
build-verifier:
runs-on: ubuntu-24.04
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install Go
uses: actions/setup-go@v5
with:
cache-dependency-path: verifier/go.sum
- name: Build Verifier
run: |
pushd verifier
./build.sh
popd
- name: Upload the artifacts
uses: actions/upload-artifact@v4
with:
name: verifier-builds
path: verifier/dist/*
publish-tauri:
needs: build-verifier
permissions:
contents: write
strategy:
fail-fast: false
matrix:
# maybe update to macOS 14 if this is ARM64-ready?
platform: [macos-13, ubuntu-20.04, windows-2025]
runs-on: ${{ matrix.platform }}
steps:
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.4
- name: Checkout Repository
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Download Verifier
uses: actions/download-artifact@v4
with:
name: verifier-builds
path: verifier/dist/
- name: Apply +x to verifier
if: matrix.platform != 'windows-2025'
run: chmod +x verifier/dist/*
- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: latest
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'pnpm'
- name: Deploy Rust to CI
uses: dtolnay/rust-toolchain@stable
- name: Install dependencies (Ubuntu only)
if: matrix.platform == 'ubuntu-20.04'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
- name: Deploy frontend dependencies
run: pnpm install
- name: Compile software
run: pnpm tauri build --ci
env:
SCCACHE_GHA_ENABLED: 'true'
RUSTC_WRAPPER: 'sccache'
- name: Upload the Linux packages (AppImage)
uses: actions/upload-artifact@v4
if: matrix.platform == 'ubuntu-20.04'
with:
name: linux-packages
path: src-tauri/target/release/bundle/appimage/*.AppImage
- name: Upload the Linux packages (ELF)
uses: actions/upload-artifact@v4
if: matrix.platform == 'ubuntu-20.04'
with:
name: linux-packages-raw
# TODO: a better way to find just the binary
path: src-tauri/target/release/fabulously-optimized-installer
- name: Upload the macOS packages
uses: actions/upload-artifact@v4
if: matrix.platform == 'macos-13'
with:
name: macos-packages
path: src-tauri/target/release/bundle/dmg/*.dmg
- name: Upload the Windows packages
uses: actions/upload-artifact@v4
if: matrix.platform == 'windows-2025'
with:
name: windows-packages
path: src-tauri/target/release/*.exe
- name: Compile software (debug)
run: pnpm tauri build --ci --debug
env:
SCCACHE_GHA_ENABLED: 'true'
RUSTC_WRAPPER: 'sccache'
- name: Upload the Linux packages (AppImage, debug)
uses: actions/upload-artifact@v4
if: matrix.platform == 'ubuntu-20.04'
with:
name: linux-packages-debug
path: src-tauri/target/debug/bundle/appimage/*.AppImage
- name: Upload the Linux packages (ELF, debug)
uses: actions/upload-artifact@v4
if: matrix.platform == 'ubuntu-20.04'
with:
name: linux-packages-raw-debug
# TODO: a better way to find just the binary
path: src-tauri/target/debug/fabulously-optimized-installer
- name: Upload the macOS packages (debug)
uses: actions/upload-artifact@v4
if: matrix.platform == 'macos-13'
with:
name: macos-packages-debug
path: src-tauri/target/debug/bundle/dmg/*.dmg
- name: Upload the Windows packages
uses: actions/upload-artifact@v4
if: matrix.platform == 'windows-2025'
with:
name: windows-packages-debug
path: src-tauri/target/debug/*.exe