Repository navigation
134 lines (127 loc) · 5.42 KB
/
Copy pathci.yml
File metadata and controls
134 lines (127 loc) · 5.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
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:
concurrency:
group: ci-${{ github.ref }}
# Master runs finish so rust-cache saves and every commit gets a result.
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
# Debug info makes a Bevy target dir too big for the runner's disk.
CARGO_PROFILE_DEV_DEBUG: 0
RUSTFLAGS: -D warnings
jobs:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
# rust-toolchain.toml pins the version and its components.
- run: rustup toolchain install
- run: bash scripts/prepare-patched-deps.sh
- run: cargo fmt --all --check
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
# rust-toolchain.toml pins the version and its components.
- run: rustup toolchain install
- name: Install Bevy's system libraries
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
pkg-config libasound2-dev libudev-dev libwayland-dev libxkbcommon-dev \
mesa-vulkan-drivers libvulkan1
- run: bash scripts/test-patched-deps.sh
- run: bash scripts/prepare-patched-deps.sh
- uses: Swatinem/rust-cache@v2
- name: Clippy
run: >
cargo clippy --all-targets
-p blockloom-core -p blockloom-protocol -p blockloom-app -p blockloom-runtime
-p blockloom-plugin-api -p blockloom-plugin-host -p blockloom-plugin-gpu
-p blockloom-plugin-sdk -p blockloom-example-tally -p blockloom-example-palette -p blockloom-voxel
-p blockloom-physics-probes
-p blockloom-net
# GPU tests are #[ignore]d and stay manual. Tests that only start the
# renderer run on lavapipe, Mesa's software Vulkan.
- name: Test
env:
VK_ICD_FILENAMES: /usr/share/vulkan/icd.d/lvp_icd.json
BLOCKLOOM_TEST_OPAQUE_FD: 1
run: >
cargo test
-p blockloom-core -p blockloom-protocol -p blockloom-app -p blockloom-runtime
-p blockloom-plugin-api -p blockloom-plugin-host -p blockloom-plugin-gpu
-p blockloom-plugin-sdk -p blockloom-example-tally -p blockloom-example-palette -p blockloom-voxel
-p blockloom-physics-probes
-p blockloom-net
# The harness, the scaffold's source and process isolation sit behind features.
- name: Test (plugin kit and isolation)
run: |
cargo test -p blockloom-plugin-sdk --features testing
cargo test -p blockloom-plugin-host --features test-fixtures
# The compute engine's tests open a device, so they are #[ignore]d; lavapipe runs them.
- name: Test (plugin GPU compute on lavapipe)
env:
VK_ICD_FILENAMES: /usr/share/vulkan/icd.d/lvp_icd.json
run: cargo test -p blockloom-plugin-gpu --features engine -- --include-ignored
# The browser player (Phase 8): the runtime has to keep building for wasm,
# and a script has to keep compiling to a wasm module. The headless smoke
# run (`just web-smoke`) needs a WebGPU browser and stays manual.
web:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- run: rustup toolchain install
- run: rustup target add wasm32-unknown-unknown
- run: bash scripts/prepare-patched-deps.sh
- uses: Swatinem/rust-cache@v2
with:
key: wasm32
- name: Clippy (wasm32)
run: >
cargo clippy -p blockloom-runtime --no-default-features --features plugins
--target wasm32-unknown-unknown
- name: Scripts compile for the web
run: >
cargo test -p blockloom-core --lib
script::tests::a_script_built_for_the_web_is_a_module_importing_the_host_calls
# The plugin SDK's wasm half: lint it for the target, then run the
# example plugin's module through the portable executor.
- name: Plugin SDK (wasm32)
run: cargo clippy -p blockloom-plugin-sdk -p blockloom-example-tally -p blockloom-example-palette -p blockloom-voxel --target wasm32-unknown-unknown
- name: Example plugins as wasm modules
env:
BLOCKLOOM_REQUIRE_WASM: 1
run: cargo test -p blockloom-example-tally -p blockloom-example-palette -p blockloom-voxel
# The Android player (Phase 6.5): the runtime has to keep checking for both
# Android triples, built the way the APK builds it (no default features).
# No SDK install: a standalone NDK feeds the C build scripts, and the Rust
# std comes from rustup. Installs and emulator runs stay manual
# (`just android-smoke`).
android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- run: rustup toolchain install
- run: rustup target add aarch64-linux-android x86_64-linux-android
- run: bash scripts/prepare-patched-deps.sh
- uses: Swatinem/rust-cache@v2
with:
key: android
- uses: taiki-e/install-action@just
- name: Fetch the pinned NDK major
run: |
curl -sS -o /tmp/ndk.zip \
https://dl.google.com/android/repository/android-ndk-r27d-linux.zip
unzip -q /tmp/ndk.zip -d /tmp
ls /tmp/android-ndk-r27d/toolchains/llvm/prebuilt/linux-x86_64/bin/ \
| grep -E "29-clang$|llvm-ar"
- uses: taiki-e/install-action@v2
with:
tool: just
- name: Check the shipped shape
run: just android-runtime-check /tmp/android-ndk-r27d