Repository navigation
64 lines (60 loc) · 1.94 KB
/
Copy pathci.yml
File metadata and controls
64 lines (60 loc) · 1.94 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
name: CI
on:
push:
branches: [main, tauri]
pull_request:
workflow_dispatch:
jobs:
test:
name: test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
workspaces: core
# Linux would also need webkit2gtk; the app only targets macOS and Windows.
- name: Test
working-directory: core
run: cargo test --locked
- name: Lint
working-directory: core
run: cargo clippy --locked --all-targets -- -D warnings
build:
name: build (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
workspaces: core
- run: npm ci
# No signing key here, and updater artifacts refuse to build without one — CI
# bundles are throwaway builds to download, never something the updater serves.
- name: Build bundle
shell: bash
run: npx tauri build --bundles ${{ runner.os == 'Windows' && 'nsis' || 'app' }} --config '{"bundle":{"createUpdaterArtifacts":false}}'
# Unsigned, so both platforms will warn on launch — but it means a Windows
# installer is downloadable from any commit, which is the only way to try the
# Windows build without a release.
- uses: actions/upload-artifact@v4
with:
name: notchly-${{ matrix.os }}
path: |
core/target/release/bundle/nsis/*.exe
core/target/release/bundle/macos/*.app
if-no-files-found: warn
retention-days: 14