Repository navigation
106 lines (100 loc) · 2.98 KB
/
Copy pathci.yml
File metadata and controls
106 lines (100 loc) · 2.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
# Checks every pull request and push to main.
name: CI
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
ui:
name: Page
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: 24
cache: npm
cache-dependency-path: ui/package-lock.json
- name: Verify SDK source provenance
run: node scripts/verify-sdk-source.mjs
- name: Install page dependencies
working-directory: ui
run: npm ci
- name: Type-check, test, and bundle the page
working-directory: ui
run: |
npm run check
npm test
npm run build
backend:
name: Backend
runs-on: macos-26
timeout-minutes: 30
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- uses: actions/cache@v6
with:
path: |
~/.cargo/registry
~/.cargo/git
backend/target
key: backend-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('backend/Cargo.lock') }}
- name: Format, lint, and test
working-directory: backend
run: |
cargo fmt --all -- --check
cargo clippy --locked --all-targets -- -D warnings
cargo test --locked
package:
name: Package and end-to-end check
needs: [ui, backend]
runs-on: macos-26
timeout-minutes: 45
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: 24
cache: npm
cache-dependency-path: ui/package-lock.json
- uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-apple-darwin, x86_64-apple-darwin
- uses: actions/cache@v6
with:
path: |
~/.cargo/registry
~/.cargo/git
backend/target
.artifacts/lithe/rust/target
key: package-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('backend/Cargo.lock', 'e2e/lithe-core.json') }}
- name: Build the universal package
run: |
npm ci --prefix ui
node scripts/package.mjs
- name: Run the backend through Rust Core
run: node scripts/e2e.mjs --source https://github.com/1lck/Lithe-IDEA.git --ref preview
- name: Check the archive holds the package
run: |
id=$(node -p "require('./plugin.json').id")
mkdir -p dist/verify
ditto -x -k dist/*-darwin.zip dist/verify
diff -r "dist/$id" "dist/verify/$id"
test "$(lipo -archs "dist/verify/$id/bin/lithe-database-backend")" = "x86_64 arm64"
- uses: actions/upload-artifact@v7
with:
name: package
path: |
dist/*-darwin.zip
dist/*-darwin.zip.sha256
retention-days: 7