-
Notifications
You must be signed in to change notification settings - Fork 1
128 lines (126 loc) · 4.14 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
name: 'Build'
on:
push:
branches:
- main
pull_request:
jobs:
build-verifier:
runs-on: ubuntu-24.04
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- 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:
platform: [macos-15, ubuntu-20.04, windows-2022]
runs-on: ${{ matrix.platform }}
steps:
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- name: Checkout Repository
uses: actions/checkout@v4
- name: Download Verifier
uses: actions/download-artifact@v4
with:
name: verifier-builds
path: verifier/dist/
- name: Apply +x to verifier
if: matrix.platform != 'windows-2022'
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-15'
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-2022'
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-15'
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-2022'
with:
name: windows-packages-debug
path: src-tauri/target/debug/*.exe