-
Notifications
You must be signed in to change notification settings - Fork 9
134 lines (107 loc) · 3.63 KB
/
Copy pathci.yml
File metadata and controls
134 lines (107 loc) · 3.63 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
client:
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@nightly
with:
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
with:
shared-key: client
cache-on-failure: true
- name: Install Vulkan SDK
uses: jakoch/install-vulkan-sdk-action@37effcfa045411f8bfbbda26df2fd1b3bf3436fa
with:
vulkan_version: 1.4.341.0
install_runtime: false
cache: true
stripdown: true
- name: Install Linux dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libvulkan-dev libxkbcommon-dev libwayland-dev libasound2-dev libudev-dev
- name: Format check
if: matrix.os == 'ubuntu-latest'
run: |
cargo fmt -p pomme-client -- --check
cargo fmt -p pomme-protocol -- --check
- name: Clippy
run: |
cargo clippy -p pomme-client --release --all-targets --all-features -- -D warnings
cargo clippy -p pomme-protocol --release --all-targets --all-features -- -D warnings
- name: Tests
if: matrix.os == 'ubuntu-latest'
# --release reuses the dependency artifacts the clippy step built.
run: |
cargo test -p pomme-protocol
cargo test -p pomme-client --release -- net::azalea_compat world::block
launcher-frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: pnpm/action-setup@v6
with:
version: 10
- uses: actions/setup-node@v6
with:
node-version: 24
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- name: Install dependencies
run: pnpm install
- name: Format check
run: pnpm --filter pomme-launcher format:check
- name: Lint
run: pnpm --filter pomme-launcher lint
- name: Type check
run: pnpm --filter pomme-launcher exec tsc --noEmit
launcher:
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@nightly
with:
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
with:
shared-key: launcher
cache-on-failure: true
- name: Install Linux dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- name: Format check
if: matrix.os == 'ubuntu-latest'
run: cargo fmt -p pomme-launcher -- --check
- name: Clippy
run: cargo clippy -p pomme-launcher --release --all-targets --all-features -- -D warnings
- name: Check bindings are up to date
if: matrix.os == 'ubuntu-latest'
run: |
cargo run -p pomme-launcher --quiet --bin generate-bindings
if ! git diff --exit-code -- ./pomme-launcher/src/bindings; then
echo "::error::pomme-launcher/src/bindings is stale. Run 'cargo run -p pomme-launcher --bin generate-bindings' and commit."
exit 1
fi