Repository navigation
75 lines (70 loc) · 2.36 KB
/
Copy pathci.yml
File metadata and controls
75 lines (70 loc) · 2.36 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
name: CI
# Draft pull requests only run the Linux checks. The macOS package job starts
# when a pull request is ready for review and on every push to main.
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
push:
branches: [main]
permissions:
contents: read
concurrency:
group: ci-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
rust:
name: Rust checks and tests
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- name: Check formatting
run: cargo fmt --all --check
- name: Lint
run: cargo clippy --workspace --all-targets --locked -- -D warnings
- name: Test
run: cargo test --workspace --locked
- name: Check the pinned plugin SDK release
run: scripts/verify-sdk-lock.sh --download
package:
name: Build and verify the macOS packages
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
runs-on: macos-26
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
# scripts/assemble-package.sh compiles the plugin backend for each
# architecture it packages.
- uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-apple-darwin, x86_64-apple-darwin
# Downloads are named by their SHA-256 and verified again before use.
- name: Restore verified third-party downloads
uses: actions/cache@v4
with:
path: |
.artifacts/jdtls-downloads
.artifacts/jdk-downloads
key: third-party-${{ hashFiles('third_party/*/manifest.json') }}
- name: Build, verify and archive both architectures
run: |
set -euo pipefail
for arch in arm64 x86_64; do
package=$(scripts/build-package.sh --arch "$arch")
scripts/archive-package.sh --package "$package" --arch "$arch"
done
- name: Upload the archives
uses: actions/upload-artifact@v4
with:
name: java-support-archives
path: dist/
retention-days: 7
if-no-files-found: error