-
Notifications
You must be signed in to change notification settings - Fork 23
69 lines (63 loc) · 1.69 KB
/
rust.yml
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
name: Rust
on:
push:
branches-ignore:
- gh-readonly-queue/**
- master
pull_request:
merge_group:
branches: [master]
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest"]
cargo-options: [""]
include:
- os: "windows-latest"
cargo-options: '--features "egl"'
- os: "windows-latest"
cargo-options: '--features "build_dlls"'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Set env
if: contains(matrix.os, 'ubuntu')
run: echo "LIBCLANG_PATH=/usr/lib/llvm-14/lib" >> $GITHUB_ENV
- name: Run tests
run: cargo test --verbose ${{ matrix.cargo-options }}
linux-cross-compile:
name: linux (${{ matrix.target }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
- aarch64-unknown-linux-gnu
- armv7-unknown-linux-gnueabihf
container: ghcr.io/servo/cross-${{ matrix.target }}:main
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- run: apt update && apt install -y libx11-dev
- run: cargo test --target ${{ matrix.target }}
build_result:
name: homu build finished
runs-on: ubuntu-latest
needs:
- "build"
- "linux-cross-compile"
steps:
- name: Mark the job as successful
run: exit 0
if: success()
- name: Mark the job as unsuccessful
run: exit 1
if: "!success()"