forked from milind-soni/OpenMausBot
-
Notifications
You must be signed in to change notification settings - Fork 0
116 lines (110 loc) · 3.98 KB
/
Copy pathci.yml
File metadata and controls
116 lines (110 loc) · 3.98 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
name: CI
on:
push:
branches: [main]
pull_request:
# least privilege: CI only reads the checkout, it never writes back
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
test:
name: typecheck + test (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
# The harness and pure desktop capabilities stay portable across all
# supported host platforms. POSIX-only process tests self-skip.
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: pnpm/action-setup@ff378ebe6b225b0680b81c1ad4498ae0d1d3a5e3 # v6.0.10
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm typecheck
- run: pnpm test
- run: pnpm check:electron
- name: production UI build
if: matrix.os == 'ubuntu-latest'
run: pnpm exec vite build
package-linux:
name: package + smoke (Ubuntu 24.04 x64)
runs-on: ubuntu-24.04
timeout-minutes: 25
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: pnpm/action-setup@ff378ebe6b225b0680b81c1ad4498ae0d1d3a5e3 # v6.0.10
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
cache: pnpm
- name: Install package validation and native smoke tools
run: >-
sudo apt-get update && sudo apt-get install -y
at-spi2-core dbus-x11 desktop-file-utils libxi6 libxkbcommon0 squashfs-tools xvfb
- run: pnpm install --frozen-lockfile
- name: Stage the pinned CUA runtime
run: pnpm build:cua:linux
- name: Package from the verified offline CUA stage
run: pnpm package:linux:offline
- run: node scripts/verify-linux-package.mjs
- name: Configure Chromium sandbox for the unpacked app
run: |
sudo chown root:root release/linux-unpacked/chrome-sandbox
sudo chmod 4755 release/linux-unpacked/chrome-sandbox
test "$(stat -c '%U:%G %a' release/linux-unpacked/chrome-sandbox)" = "root:root 4755"
- name: Launch packaged app and verify lifecycle
env:
OMB_KEEP_SMOKE_DIR: "1"
run: pnpm smoke:linux-package
- name: Upload smoke diagnostics on failure
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: failure()
with:
name: openmausbot-ubuntu-smoke-diagnostics
path: |
${{ runner.temp }}/omb-linux-smoke-*
${{ runner.temp }}/omb-linux-smoke-runtime-*
if-no-files-found: warn
include-hidden-files: true
retention-days: 7
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: always()
with:
name: openmausbot-ubuntu-x64
path: |
release/*.deb
release/*.AppImage
if-no-files-found: error
ios:
name: Swift tests + iOS build
runs-on: macos-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Swift package tests
run: swift test --package-path ios
- name: Generate the Xcode project
run: |
brew install xcodegen
cd ios
xcodegen generate
- name: Build the simulator app
run: |
cd ios
xcodebuild \
-project OpenMausCompanion.xcodeproj \
-scheme OpenMausCompanion \
-sdk iphonesimulator \
-destination 'generic/platform=iOS Simulator' \
CODE_SIGNING_ALLOWED=NO \
build