team-ljyzipelo

공개
52줄1.7 KB
1name: Rust build and tests
2
3on:
4 pull_request:
5 push:
6 branches: [main]
7 workflow_dispatch:
8
9permissions:
10 contents: read
11
12concurrency:
13 group: rust-${{ github.workflow }}-${{ github.ref }}
14 cancel-in-progress: true
15
16jobs:
17 rust:
18 name: Rust (${{ matrix.os }})
19 runs-on: ${{ matrix.os }}
20 timeout-minutes: 45
21 strategy:
22 fail-fast: false
23 matrix:
24 os: [ubuntu-latest, windows-latest]
25 env:
26 CARGO_TERM_COLOR: always
27 CARGO_BUILD_JOBS: 1
28 CARGO_TARGET_DIR: ${{ github.workspace }}/tests/ci/target
29 RUST_BACKTRACE: 1
30 steps:
31 - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
32 with:
33 persist-credentials: false
34 - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1
35 with:
36 python-version: '3.13'
37 - name: Install Rust
38 run: rustup toolchain install 1.99.1 --profile minimal --no-self-update
39 - name: Install Linux GUI build dependencies and test font
40 if: runner.os == 'Linux'
41 run: |
42 sudo apt-get update
43 sudo apt-get install -y pkg-config libxkbcommon-dev libwayland-dev libgl1-mesa-dev fonts-noto-cjk
44 - name: Check CI runner
45 run: python -m unittest discover -s tests/ci -p 'test_*.py' -v
46 - name: Build every Rust crate and test harness
47 timeout-minutes: 20
48 run: python tests/ci/run_rust.py build
49 - name: Run Rust tests
50 if: ${{ !cancelled() }}
51 timeout-minutes: 20
52 run: python tests/ci/run_rust.py test