-
Notifications
You must be signed in to change notification settings - Fork 7
103 lines (90 loc) · 3.56 KB
/
cargo_required.yml
File metadata and controls
103 lines (90 loc) · 3.56 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
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
# *******************************************************************************
# Copyright (c) 2025 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************
name: cargo build, test, coverage and miri report
on:
push:
branches: [main, development]
pull_request:
branches: [main, development]
types: [opened, ready_for_review, reopened, synchronize]
env:
CARGO_TERM_COLOR: always
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
cargo-checks:
#permissions for docs deployment
permissions:
contents: write
pages: write
id-token: write
runs-on: ${{ vars.REPO_RUNNER_LABELS && fromJSON(vars.REPO_RUNNER_LABELS) || 'ubuntu-latest' }}
timeout-minutes: 45 # minutes is the maximum allowed for a cold run
steps:
- name: Checkout Repository
uses: actions/checkout@v4.2.2
- name: Setup Rust Build Environment
uses: ./.github/actions/setup-rust-build
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
# ---------- BUILD ----------
- name: Cargo build
run: cargo build --verbose
# ---------- TARPAULIN(TEST + COVERAGE) ----------
- name: Run tests under coverage
# The stack size is set to 8MB considering additional stack usage of instrumented code and possible additional consumption due to newer version of toolchain.
run: RUST_MIN_STACK=8388608 cargo +nightly tarpaulin --skip-clean --out html --verbose --no-dead-code --engine llvm
- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: ${{ github.event.repository.name }}_coverage_report
path: |
tarpaulin-report.html
cobertura.xml
# ---------- MIRI ----------
- name: Install nightly + miri (minimal profile)
uses: actions-rs/toolchain@v1
if: github.event.pull_request.draft == false
with:
toolchain: nightly-2025-05-30
profile: minimal
components: miri
override: true
- name: Prefetch crates for nightly
if: github.event.pull_request.draft == false
run: cargo +nightly-2025-05-30 fetch --locked
- name: Purge Miri artifacts
if: github.event.pull_request.draft == false
run: |
rm -rf target/miri
rm -rf ~/.cache/miri
- name: Prefetch and build dependencies for Miri
if: github.event.pull_request.draft == false
run: cargo +nightly-2025-05-30 miri setup
- name: Run Miri and save report
if: github.event.pull_request.draft == false
env:
CARGO_INCREMENTAL: "0" # turn off incremental
run: |
set -o pipefail
cargo +nightly-2025-05-30 miri test --workspace \
-- --skip test_mt_one_pop_one_stealer \
--skip test_mt_one_push_mpmc_one_stealer \
--skip test_one_producer_multi_stealer_mt_thread \
--skip test_one_producer_one_stealer_mt_thread \
2>&1 | tee miri_report.txt
# ---------- LOOM ----------
- name: Run Atomic tests with LOOM
if: github.event.pull_request.draft == false
run: |
set -o pipefail
cargo xtask build:loom