Repository navigation
72 lines (66 loc) · 3.22 KB
/
Copy pathdesktop.yml
File metadata and controls
72 lines (66 loc) · 3.22 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
name: Desktop
# The shell is the one thing here that cannot be proved by running it on Linux: it is a macOS app, a
# Windows app and a Linux app built from one tree, and the ways they differ are exactly the ways
# this fails. So it tests and builds on all three, on every change to it.
# `shared/harnesses.json` and `shared/marks/**` are watched here even though they are not under
# desktop/: the catalogue the setup window draws moved there so the web app could read one copy, and
# these jobs are the only ones that prove it still deserializes into `Harness` — `catalogue()` parses
# it at runtime with an `expect`, so a bad row panics the window rather than failing a type check.
on:
pull_request:
paths: ["desktop/**", "shared/harnesses.json", "shared/marks/**", "shared/recorder-extension.json", "package.json", ".github/workflows/desktop.yml", ".github/workflows/desktop-build.yml"]
push:
branches: [main]
paths: ["desktop/**", "shared/harnesses.json", "shared/marks/**", "shared/recorder-extension.json", "package.json", ".github/workflows/desktop.yml", ".github/workflows/desktop-build.yml"]
workflow_call:
secrets:
OPENBOT_GOOGLE_MODEL_OAUTH_CLIENT_SECRET:
required: false
permissions:
contents: read
concurrency:
group: desktop-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
# Match the source publisher's exact repository/distribution identity in official and fork builds.
env:
OPENBOT_DISTRIBUTION_ID: ${{ vars.OPENBOT_DISTRIBUTION_ID || github.repository }}
OPENBOT_RELEASE_REPOSITORY: ${{ github.repository }}
OPENBOT_RELEASE_CHANNEL: ${{ vars.OPENBOT_RELEASE_CHANNEL || 'stable' }}
jobs:
# Fast formatting and lint checks. Rust regression tests run once per platform below.
core:
name: core
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
persist-credentials: false
- uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # v1
with:
toolchain: stable
components: rustfmt, clippy
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
with:
workspaces: desktop/src-tauri
# Linux is the only target needing system libraries, and it needs them even to check.
- run: |
sudo apt-get update -qq
sudo apt-get install -y -qq libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- run: cargo fmt --check
working-directory: desktop/src-tauri
- run: cargo clippy --all-targets -- -D warnings
working-directory: desktop/src-tauri
# The three artifacts, built by the shared workflow. A pull request build is unchanged: unpinned, no CLI, kept 7 days.
app:
name: app
uses: $/.github/workflows/desktop-build.yml
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
channel: internal
bundle_cli: false
manifest_artifact: ""
retention_days: 7
platforms: '["macos","windows","linux"]'
secrets:
OPENBOT_GOOGLE_MODEL_OAUTH_CLIENT_SECRET: ${{ secrets.OPENBOT_GOOGLE_MODEL_OAUTH_CLIENT_SECRET }}