-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
169 lines (146 loc) · 4.48 KB
/
create-caches.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
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
name: Create Caches
on:
schedule:
# Run at 0:00 daily. (Basically as early as possible.)
- cron: 0 0 * * *
workflow_dispatch:
# TODO: Remove this. It is for testing purposes only.
pull_request:
# Prevent this workflow from being run more than once at a time.
concurrency:
group: ${{ github.workflow }}
jobs:
build:
name: Build
strategy:
# Don't cancel everything if one configuration happens to fail.
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
toolchain: [stable]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
- name: Install Linux dependencies
uses: ./.github/actions/install-linux-deps
- name: Build workspace
# Exclude bevy_dylib because it causes a linker error on Windows due to exporting more than 65k objects.
run: cargo build --workspace --exclude bevy_dylib
- name: Save cache
uses: ./.github/actions/cache
with:
kind: build
toolchain: ${{ matrix.toolchain }}
action: save
check:
name: Check
strategy:
# Don't cancel everything if one configuration happens to fail.
fail-fast: false
matrix:
include:
- os: ubuntu-latest
toolchain: nightly
target: default
- os: macos-latest
toolchain: nightly
target: default
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
- name: Install Linux dependencies
uses: ./.github/actions/install-linux-deps
- name: Check workspace
if: ${{ matrix.target == 'default' }}
run: cargo check --workspace
- name: Save cache
uses: ./.github/actions/cache
with:
kind: check
toolchain: ${{ matrix.toolchain }}
target: ${{ matrix.target }}
action: save
check-wasm:
name: Check WASM
strategy:
matrix:
include:
- os: ubuntu-latest
toolchain: stable
target: wasm
- os: ubuntu-latest
toolchain: nightly
target: wasm-atomics
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust (WASM)
if: ${{ matrix.target == 'wasm' }}
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
target: wasm32-unknown-unknown
- name: Install Rust (WASM Atomics)
if: ${{ matrix.target == 'wasm-atomics' }}
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
target: wasm32-unknown-unknown
components: rust-src
- name: Check workspace
if: ${{ matrix.target == 'wasm' }}
run: cargo check --target wasm32-unknown-unknown
- name: Check workspace
if: ${{ matrix.target == 'wasm-atomics' }}
run: cargo check --target wasm32-unknown-unknown -Z build-std=std,panic_abort
env:
RUSTFLAGS: "-C target-feature=+atomics,+bulk-memory"
- name: Save cache
uses: ./.github/actions/cache
with:
kind: check
toolchain: ${{ matrix.toolchain }}
target: ${{ matrix.target }}
action: save
doc:
name: Doc
strategy:
# Don't cancel everything if one configuration happens to fail.
fail-fast: false
matrix:
os: [ubuntu-latest]
toolchain: [nightly]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
- name: Install Linux dependencies
uses: ./.github/actions/install-linux-deps
with:
wayland: true
xkb: true
- name: Document workspace
run: |
cargo test --workspace --doc
cargo doc --workspace --all-features --no-deps --document-private-items
- name: Save cache
uses: ./.github/actions/cache
with:
kind: doc
toolchain: ${{ matrix.toolchain }}
action: save