-
Notifications
You must be signed in to change notification settings - Fork 46
48 lines (45 loc) · 1.69 KB
/
linux.yaml
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
name: Linux
on:
push:
branches-ignore: [ '**win**', '**android**', '**macos**', '**bsd**', '**haiku**', '**wasm**', '**ios**' ]
pull_request:
branches: [ main ]
schedule:
- cron: '0 0 * * SUN'
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
RUST_LOG: webbrowser=TRACE
jobs:
build:
name: Build
runs-on: ubuntu-latest
if: ${{ !contains(github.event.head_commit.message, '#build-') || contains(github.event.head_commit.message, '#build-linux') }}
strategy:
max-parallel: 1
matrix:
rust: [stable, beta, nightly]
continue-on-error: ${{ matrix.rust != 'stable' && matrix.rust != 'beta' }}
steps:
- uses: actions/checkout@v3
name: Checkout
- name: Install rust version
run: |
rustup install ${{ matrix.rust }} --profile minimal
rustup component add --toolchain ${{ matrix.rust }} rustfmt clippy
- name: Compile
run: cargo +${{ matrix.rust }} build
- name: Run Tests
env:
BROWSER: firefox --screenshot %s
run: cargo +${{ matrix.rust }} test --all --locked --verbose
- name: Run Tests (hardened)
run: cargo +${{ matrix.rust }} test --features hardened --locked --verbose --test test_unix tests::test_hardened_mode
- name: Check compilation with WSL disabled
run: cargo +${{ matrix.rust }} build --features disable-wsl
- name: Check Code Formatting
if: ${{ matrix.rust == 'stable' || matrix.rust == 'beta' }}
run: cargo +${{ matrix.rust }} fmt --all -- --check
- name: Lints
if: ${{ matrix.rust == 'stable' || matrix.rust == 'beta' }}
run: cargo +${{ matrix.rust }} clippy --all-targets -- -D warnings