-
Notifications
You must be signed in to change notification settings - Fork 53
104 lines (87 loc) · 3.04 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
name: Rust tests
on:
push:
branches: [main]
paths:
- logger_core/**
- glide-core/**
- submodules/**
- utils/cluster_manager.py
- .github/workflows/rust.yml
pull_request:
paths:
- logger_core/**
- glide-core/**
- submodules/**
- utils/cluster_manager.py
- .github/workflows/rust.yml
concurrency:
group: rust-${{ github.head_ref || github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
load-engine-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.load-engine-matrix.outputs.matrix }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Load the engine matrix
id: load-engine-matrix
shell: bash
run: echo "matrix=$(jq -c . < .github/json_matrices/engine-matrix.json)" >> $GITHUB_OUTPUT
build:
runs-on: ubuntu-latest
needs: load-engine-matrix
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
engine: ${{ fromJson(needs.load-engine-matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install shared software dependencies
uses: ./.github/workflows/install-shared-dependencies
with:
os: "ubuntu"
target: "x86_64-unknown-linux-gnu"
engine-version: ${{ matrix.engine.version }}
- uses: Swatinem/rust-cache@v2
- name: Run tests
working-directory: ./glide-core
run: cargo test --all-features -- --nocapture --test-threads=1 # TODO remove the concurrency limit after we fix test flakyness.
- name: Run logger tests
working-directory: ./logger_core
run: cargo test --all-features -- --nocapture --test-threads=1
- name: Check features
working-directory: ./glide-core
run: |
cargo check --benches --all-features
cargo check --no-default-features
- uses: ./.github/workflows/test-benchmark
with:
language-flag: -rust
lint:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: ./.github/workflows/lint-rust
with:
cargo-toml-folder: ./glide-core
github-token: ${{ secrets.GITHUB_TOKEN }}
name: lint glide-core
- uses: ./.github/workflows/lint-rust
with:
cargo-toml-folder: ./logger_core
name: lint logger
- uses: ./.github/workflows/lint-rust
with:
cargo-toml-folder: ./benchmarks/rust
name: lint benchmark