generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 37
63 lines (59 loc) · 1.8 KB
/
rust.yml
File metadata and controls
63 lines (59 loc) · 1.8 KB
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
name: Rust
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
permissions:
contents: read
id-token: write
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: rustfmt, clippy, llvm-tools-preview
- name: Install cargo-llvm-cov
run: cargo install cargo-llvm-cov
- name: Install ninja-build tool for aws-lc-fips-sys on Windows
if: runner.os == 'Windows'
uses: seanmiddleditch/gha-setup-ninja@v6
- name: Install NASM for aws-lc-fips-sys on Windows
if: runner.os == 'Windows'
uses: ilammy/setup-nasm@v1
- name: Install golang for aws-lc-fips-sys on macos
if: runner.os == 'MacOS'
uses: actions/setup-go@v5
with:
go-version: "stable"
- name: Check licenses
run: |
cargo install cargo-deny
cargo-deny check licenses
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose --all-features --no-fail-fast --workspace --exclude integration-tests
- name: Code Coverage
run: cargo llvm-cov --all-features --workspace --exclude integration-tests --codecov --output-path ./codecov.json
- name: Publish Code Coverage
uses: codecov/codecov-action@v5
with:
files: ./codecov.json
fail_ci_if_error: true
use_oidc: true
- name: Lint
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --all-targets --all-features