-
Notifications
You must be signed in to change notification settings - Fork 8
150 lines (125 loc) · 4.56 KB
/
unstable-ci.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
# This version of the CI workflow is for the `unstable-rust` branch that uses Rust
# nightly exclusively, for the sake of testing unstable features in the Rust compiler.
#
# It is stored in the main branch because only the main branch gets *scheduled* runs.
# Scheduled runs are performed so that code is regularly re-tested on new nightlies.
#
# Differences from `ci.yml`:
#
# * matrix is 100% nightly
# * no fuzzing
# * no deployment
# * no testing of multiple feature configurations
# * no concept of a "primary" matrix configuration
name: Unstable Rust Features
permissions: {}
on:
pull_request:
branches:
- unstable-rust
workflow_dispatch:
schedule:
- cron: '43 14 * * 1'
push:
branches:
- unstable-rust
- ci
env:
CARGO_TERM_COLOR: always
# Disable incremental compilation because we aren't caching incremental compilation
# artifacts, so they won't be useful for anything (other than maybe the exhaustive
# builds with different features).
CARGO_INCREMENTAL: 0
jobs:
build:
strategy:
matrix:
include:
# Linux
- os: ubuntu
toolchain: nightly
depversions: locked
# Windows
- os: windows
toolchain: nightly
depversions: locked
# macOS
- os: macos
toolchain: nightly
depversions: locked
runs-on: ${{ matrix.os }}-latest
continue-on-error: true
steps:
- uses: actions/[email protected]
with:
ref: unstable-rust
- name: Set Rust toolchain
# The rust-toolchain.toml file specifies the targets and components we need.
# Therefore, CI only needs to set the toolchain override.
run: |
rustup override set "${{ matrix.toolchain }}"
rustup show # triggers installation of selected toolchain
- name: Install native libraries
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt update
sudo apt-get -y install libxrandr-dev xorg-dev libwayland-dev libasound2-dev
# libxrandr-dev xorg-dev libwayland-dev: needed for windowing
# Note that `libwayland-dev` provides the library called `wayland-client`
# libasound2-dev: needed for audio via `kira`
# Load cache before doing any Rust builds
- uses: Swatinem/[email protected]
# break this out as a separate non-silenced build step
- name: Compile xtask
run: cargo build --package xtask
- name: Update dependencies
run: |
cargo xtask update "${{ matrix.depversions }}"
cargo tree --all-features
- name: Install wasm-pack
run: cargo install [email protected]
# Use workspace target dir for cargo install's build, so that the build will be cached.
env:
CARGO_TARGET_DIR: target/
- name: Install cargo-about
run: cargo install [email protected]
# Use workspace target dir for cargo install's build, so that the build will be cached.
env:
CARGO_TARGET_DIR: target/
- name: Compile basic tests
# compile is broken out so we have visibility into compile vs. run times
run: cargo xtask --scope=only-normal test --timings --no-run
- name: Run basic tests
run: cargo xtask --scope=only-normal test --timings
# Save the test-renderers results so we can download and view them
- name: Save test-renderers output
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: test-renderers-output ${{ matrix.os }} ${{ matrix.toolchain }} ${{ matrix.depversions }}
path: |
target/test-renderers-output/
- name: Lint
run: cargo xtask --scope=only-normal lint --timings
# Save timing reports so we can download and view them
# (for understanding build performance in CI)
- name: Save cargo --timings output
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: cargo-timings ${{ matrix.os }} ${{ matrix.toolchain }} ${{ matrix.depversions }}
path: |
target/cargo-timings/cargo-timing-*.html
miri:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: Swatinem/[email protected]
- name: Install Rust toolchain
run: |
rustup toolchain install nightly --component miri
- name: Run Miri tests
# `universe::owning_guard` is the only module that contains nontrivial unsafe code,
# and the tests in `universe` are those most worth running to exercise it.
run: |
cargo +nightly miri test --no-default-features -p all-is-cubes universe::