-
Notifications
You must be signed in to change notification settings - Fork 84
106 lines (103 loc) · 3.27 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
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
name: Rust
on:
push:
branches: ['master']
pull_request:
branches: ["**"]
merge_group:
types: [checks_requested]
env:
CARGO_TERM_COLOR: always
jobs:
Build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-22.04, windows-latest]
rust: [nightly-2022-08-27, stable]
features: ["", "--features 'chains sm-winit sm-raw-window-handle'"]
target: ["default"]
include:
# rust nightly
- os: ubuntu-22.04
features: "--features 'chains sm-wayland-default'"
rust: nightly-2022-08-27
target: "default"
- os: ubuntu-22.04
target: "arm-linux-androideabi"
rust: nightly-2022-08-27
- os: windows-latest
features: "--features sm-angle-builtin"
rust: nightly-2022-08-27
target: "default"
- os: windows-latest
features: "--features 'chains sm-no-wgl sm-angle-builtin'"
rust: nightly-2022-08-27
target: "default"
- os: windows-latest
target: "aarch64-pc-windows-msvc"
rust: nightly-2022-08-27
# rust stable
- os: ubuntu-22.04
features: "--features sm-wayland-default"
rust: stable
target: "default"
- os: ubuntu-22.04
target: "arm-linux-androideabi"
rust: stable
- os: windows-latest
features: "--features 'chains sm-angle-builtin'"
rust: stable
target: "default"
- os: windows-latest
features: "--features 'chains sm-no-wgl sm-angle-builtin'"
rust: stable
target: "default"
- os: windows-latest
target: "aarch64-pc-windows-msvc"
rust: stable
# nightly only
- os: windows-latest
target: "aarch64-uwp-windows-msvc"
rust: nightly-2022-08-27
steps:
- uses: actions/checkout@v3
- name: Install deps on linux
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt update
sudo apt install gcc libxxf86vm-dev libosmesa6-dev libgles2-mesa-dev -y
- name: Install rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- name: Build target
if: matrix.target != 'default' && startsWith(matrix.target, 'aarch64-uwp-windows-msvc') != true
run: |
cd surfman
rustup target add ${{ matrix.target }}
cargo build --verbose ${{ matrix.features }} --target=${{ matrix.target }}
- name: Build
if: matrix.target == 'default'
run: |
cd surfman
cargo build --verbose ${{ matrix.features }}
- name: Build Windows
if: startsWith(matrix.target, 'aarch64-uwp-windows-msvc')
shell: cmd
run: |
cd surfman
rustup component add rust-src --target=aarch64-uwp-windows-msvc
cargo build -Z build-std --verbose --target=aarch64-uwp-windows-msvc
build_result:
name: Result
runs-on: ubuntu-latest
needs: ["Build"]
steps:
- name: Mark the job as successful
run: exit 0
if: success()
- name: Mark the job as unsuccessful
run: exit 1
if: "!success()"