-
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (56 loc) · 1.53 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
name: rust
concurrency:
cancel-in-progress: false
group: ${{ github.event.repository.name }}-rust
env:
CARGO_TERM_COLOR: always
CRATE_BASENAME: ${{ github.event.repository.name }}
on:
pull_request:
branches: [ main ]
push:
branches: [ main ]
tags: [ v*.*.* ]
release:
types: [ created ]
repository_dispatch:
types: [ rust ]
schedule:
- cron: "30 21 * * 0" # Every Sunday at 9:30pm UTC
workflow_dispatch:
permissions: write-all
jobs:
build:
name: Build
strategy:
matrix:
platform: [ ubuntu-latest ]
toolchain: [ stable, nightly ]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- name: setup (rustup)
run: |
rustup default ${{ matrix.toolchain }}
rustup update
- name: build (workspace)
run: cargo build --all-features -r -v --workspace
- name: cache
uses: actions/cache@v4
with:
key: ${{ runner.os }}-cargo-${{ matrix.toolchain }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-${{ matrix.toolchain }}-
${{ runner.os }}-cargo-
${{ runner.os }}-
path: |
~/.cargo/registry
~/.cargo/git
target/debug
target/release
- name: cargo (bench)
if: matrix.toolchain == 'nightly'
run: cargo bench --features full -v --workspace
- name: cargo (test) [full]
id: test
run: cargo test --features full -v --workspace