Repository navigation
79 lines (74 loc) · 2.42 KB
/
Copy pathci.yml
File metadata and controls
79 lines (74 loc) · 2.42 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
name: CI
on:
push:
branches: [main]
pull_request:
jobs:
test:
name: Typecheck & test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install Linux native build deps
run: sudo apt-get update && sudo apt-get install -y libsecret-1-dev
# Skip the postinstall Electron-rebuild — vitest runs under system Node,
# which can't load binaries built for Electron's ABI. Install without
# lifecycle scripts, rebuild native modules for system Node, and then
# download the Electron binary on its own (some tests import `electron`
# and fail if the binary is missing). See scripts/rebuild-native-for-node.sh
# for the full rationale.
- run: npm ci --ignore-scripts
- name: Build native modules for system Node
shell: bash
run: ./scripts/rebuild-native-for-node.sh
- name: Install Electron binary
run: node node_modules/electron/install.js
- run: npm run typecheck
- run: npm test
build:
name: Build (${{ matrix.os }})
needs: test
# Best-effort packaging across platforms — don't fail the whole run if one OS hiccups.
continue-on-error: true
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install Linux native build deps
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y libsecret-1-dev
- run: npm ci
- run: npm run build
- name: Package
run: npx electron-builder --publish never
env:
# Skip macOS code signing for CI artifacts.
CSC_IDENTITY_AUTO_DISCOVERY: false
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: autopilotv-${{ matrix.os }}
path: |
release/*.dmg
release/*.zip
release/*.exe
release/*.AppImage
if-no-files-found: ignore