Repository navigation
142 lines (121 loc) · 4.75 KB
/
Copy pathchecks.yml
File metadata and controls
142 lines (121 loc) · 4.75 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
135
136
137
138
139
140
141
142
name: Checks
# Tests and clippy on Linux (any warning fails), and core + FFI tests on macOS
# and Windows (Windows clippy warnings are reported only).
on:
push:
pull_request:
workflow_dispatch:
env:
# The Qt every job installs; bump it here and in the other workflows.
QT_VERSION: 6.12.0
jobs:
macos-core:
name: macOS core and standalone FFI (${{ matrix.runner }})
strategy:
fail-fast: false
matrix:
runner: [macos-latest, macos-15-intel]
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
key: macos-core-${{ matrix.runner }}
# Deliberately no Qt/app dependency to supply core features by unification:
# the Geode embedder must also compile on its own.
- run: cargo test -p blockwork-core -p blockwork-ffi
- name: Test native macOS bundle validation
run: python3 scripts/macos/test-verify-bundle.py
windows-core:
name: Windows core and FFI
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
with:
key: windows-core
# The Windows input backend and window code, which the Linux job never compiles.
- run: cargo clippy -p blockwork-core -p blockwork-ffi --all-targets
- run: cargo test -p blockwork-core -p blockwork-ffi
test:
name: Tests and clippy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Store submission regression checks
shell: pwsh
run: ./.github/tests/msstore-submission.ps1
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Release preparation regression checks
run: python -m unittest discover -s .github/tests -p 'test_*.py'
- name: Install Qt
run: |
python -m pip install py7zr==1.1.3 "aqtinstall @ git+https://github.com/miurahr/aqtinstall.git@076e1659807d0b362a3ed684d54c2e9c775eb9c7"
python -m aqt install-qt linux desktop ${{ env.QT_VERSION }} linux_gcc_64 --outputdir "$RUNNER_TEMP/Qt"
qmake=$(find "$RUNNER_TEMP/Qt/${{ env.QT_VERSION }}" -maxdepth 3 -path '*/bin/*' -name qmake | head -n 1)
test -n "$qmake"
echo "QMAKE=$qmake" >> "$GITHUB_ENV"
echo "LD_LIBRARY_PATH=$($qmake -query QT_INSTALL_LIBS)" >> "$GITHUB_ENV"
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Formatting
run: cargo fmt --all --check
- name: Cache Rust build artifacts
uses: Swatinem/rust-cache@v2
with:
key: checks
- name: Install Linux system dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends \
pkg-config \
build-essential \
cmake \
libssl-dev \
libxdo-dev \
libayatana-appindicator3-dev \
libdbus-1-dev \
libudev-dev \
libxkbcommon-dev \
libx11-dev \
libx11-xcb-dev \
libxtst-dev \
libwayland-dev \
libclang-dev \
libgl-dev
- name: Clippy
run: cargo clippy --workspace --all-targets -- -D warnings
- name: Tests
run: cargo test --workspace --exclude blockwork-linux-bridge
# The workspace's declared rust-version must really build it.
- name: Minimum Rust version
run: |
msrv=$(sed -n 's/^rust-version = "\(.*\)"/\1/p' Cargo.toml)
rustup toolchain install "$msrv" --profile minimal
cargo "+$msrv" check --workspace --exclude blockwork-linux-bridge
# blockwork-ffi's build regenerates the C header the Geometry Dash mod
# compiles against; a stale committed copy fails here.
- name: FFI header is current
run: git diff --exit-code blockwork-ffi/include
# The website's editor links blockwork-model alone; built on its own
# so nothing from the workspace's other crates sneaks in.
- name: Web editor core on blockwork-model alone
run: |
cargo test -p blockwork-model -p blockwork-web
# After the build, which stages the Lucide icons the QML tests import.
- name: QML tests
run: |
scripts/fetch-blockstitch.sh ../blockstitch
PATH="$(dirname "$QMAKE"):$PATH" python3 blockwork-qt/tests/run.py ../blockstitch
- name: Native window integration tests
run: PATH="$(dirname "$QMAKE"):$PATH" python3 blockwork-qt/window-tests/run.py