Repository navigation
146 lines (128 loc) 路 4.97 KB
/
Copy pathlinux-app.yml
File metadata and controls
146 lines (128 loc) 路 4.97 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
name: Linux App
on:
pull_request:
paths:
- "apps/linux/**"
- ".github/workflows/linux-app.yml"
workflow_dispatch:
concurrency:
group: linux-app-${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
permissions:
contents: read
jobs:
build:
name: Build Linux companion
# Match the release build base so PR artifacts have the same glibc floor.
runs-on: ubuntu-22.04
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 1
fetch-tags: false
persist-credentials: false
submodules: false
- name: Install Tauri system dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
build-essential \
curl \
file \
gstreamer1.0-libav \
gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-good \
libayatana-appindicator3-dev \
librsvg2-dev \
libssl-dev \
libwebkit2gtk-4.1-dev \
libxdo-dev \
wget
- name: Install Rust
run: rustup toolchain install stable --profile minimal --component rustfmt
- name: Cache Cargo
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: |
~/.cargo/registry
~/.cargo/git
apps/linux/src-tauri/target
key: linux-app-${{ runner.os }}-${{ hashFiles('apps/linux/src-tauri/Cargo.lock') }}
restore-keys: |
linux-app-${{ runner.os }}-
- name: Setup Node environment
uses: ./.github/actions/setup-node-env
with:
install-bun: "false"
- name: Check Rust formatting
working-directory: apps/linux/src-tauri
run: cargo +stable fmt --check
- name: Run Rust tests
working-directory: apps/linux/src-tauri
run: cargo +stable test --locked --all-targets
- name: Build Linux companion bundles
working-directory: apps/linux/src-tauri
env:
# appimagetool strips fail on CI runners; Tauri documents NO_STRIP for Actions.
NO_STRIP: "true"
# PR builds have no TAURI_SIGNING_PRIVATE_KEY, and the configured updater
# pubkey makes the bundler hard-require it. Skip updater artifacts here;
# linux-app-release.yml builds the signed updater bundles.
run: pnpm dlx @tauri-apps/cli@2.11.4 build --bundles deb,appimage --config '{"bundle":{"createUpdaterArtifacts":false}}'
- name: Upload bundles
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: openclaw-linux-companion
retention-days: 14
if-no-files-found: error
path: |
apps/linux/src-tauri/target/release/bundle/deb/*.deb
apps/linux/src-tauri/target/release/bundle/appimage/*.AppImage
test-macos:
name: Test macOS companion
# This app also ships macOS desktop-test bundles, but the only job that
# compiles them (linux-app-release.yml build_macos) runs behind a manual
# dispatch input. Without a per-PR check, a macOS-gated Tauri API can break
# the macOS target for weeks unnoticed - `WebviewWindowBuilder::transparent`
# did exactly that.
#
# macos-15, not macos-14: tauri-plugin-notifications' Swift sources use
# typed throws (`throws(FFIResult)`), which needs Swift 6. The macos-14
# image still ships Swift 5.x and fails to parse them.
runs-on: macos-15
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 1
fetch-tags: false
persist-credentials: false
submodules: false
- name: Install Rust
run: rustup toolchain install stable --profile minimal
- name: Setup Node environment
uses: ./.github/actions/setup-node-env
with:
install-bun: "false"
- name: Cache Cargo
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: |
~/.cargo/registry
~/.cargo/git
apps/linux/src-tauri/target
key: macos-app-${{ runner.os }}-${{ hashFiles('apps/linux/src-tauri/Cargo.lock') }}
restore-keys: |
macos-app-${{ runner.os }}-
- name: Test macOS companion
working-directory: apps/linux/src-tauri
# `test` rather than `check`: it additionally links and runs the
# binaries, which is the only way macOS link-time breakage (a missing
# Swift runtime rpath, say) shows up at all. `--all-targets` keeps the
# compile coverage `check --all-targets` used to give.
run: cargo +stable test --locked --all-targets