-
Notifications
You must be signed in to change notification settings - Fork 523
122 lines (108 loc) · 3.48 KB
/
Copy pathdesktop-artifacts.yml
File metadata and controls
122 lines (108 loc) · 3.48 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
name: Desktop Artifacts
on:
workflow_dispatch:
pull_request:
branches: [main]
paths:
- '.github/workflows/desktop-artifacts.yml'
- 'desktop/**'
- 'frontend/**'
- 'cmd/**'
- 'internal/**'
- 'go.mod'
- 'go.sum'
- 'Makefile'
push:
branches: [main]
paths:
- '.github/workflows/desktop-artifacts.yml'
- 'desktop/**'
- 'frontend/**'
- 'cmd/**'
- 'internal/**'
- 'go.mod'
- 'go.sum'
- 'Makefile'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
build:
name: Desktop Build (${{ matrix.platform }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- platform: macos
os: macos-15
bundle: app
bundle_dir: macos
- platform: windows
os: windows-latest
bundle: nsis
bundle_dir: nsis
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version-file: go.mod
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: "24"
- name: Setup MinGW (Windows)
if: matrix.platform == 'windows'
uses: msys2/setup-msys2@4f806de0a5a7294ffabaff804b38a9b435a73bda # v2
with:
msystem: MINGW64
update: false
install: mingw-w64-x86_64-gcc
path-type: inherit
- name: Install desktop dependencies
run: npm ci
working-directory: desktop
- name: Desktop smoke tests
shell: bash
run: |
bash desktop/scripts/test-prepare-sidecar.sh
bash desktop/scripts/test-startup-ui.sh
cargo test --manifest-path desktop/src-tauri/Cargo.toml --lib
- name: Build desktop bundle
shell: bash
run: |
cd desktop
npm run prepare-sidecar
npx tauri build --bundles "${{ matrix.bundle }}"
- name: Smoke check sidecar metadata
shell: bash
run: |
target_triple="${TAURI_ENV_TARGET_TRIPLE:-${CARGO_BUILD_TARGET:-$(rustc -vV | awk '/^host: /{print $2}')}}"
if [ -z "$target_triple" ]; then
echo "target triple is empty" >&2
exit 1
fi
ext=""
if [[ "$target_triple" == *"windows"* ]]; then
ext=".exe"
fi
sidecar="desktop/src-tauri/binaries/agentsview-${target_triple}${ext}"
if [ ! -f "$sidecar" ]; then
echo "missing sidecar binary: $sidecar" >&2
exit 1
fi
"$sidecar" version > sidecar-version.txt
if grep -q "commit unknown" sidecar-version.txt; then
echo "sidecar metadata missing commit: $(cat sidecar-version.txt)" >&2
exit 1
fi
if grep -Eq "built[[:space:]]*\)$" sidecar-version.txt; then
echo "sidecar metadata missing build date: $(cat sidecar-version.txt)" >&2
exit 1
fi
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: agentsview-desktop-${{ matrix.platform }}
path: desktop/src-tauri/target/release/bundle/${{ matrix.bundle_dir }}/
if-no-files-found: error