-
Notifications
You must be signed in to change notification settings - Fork 6
53 lines (50 loc) · 1.75 KB
/
Copy pathtest.yml
File metadata and controls
53 lines (50 loc) · 1.75 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
name: "test"
on:
push:
branches:
- main
pull_request:
merge_group:
jobs:
test:
runs-on: ubuntu-24.04
env:
LLVM_SYS_221_PREFIX: /usr/lib/llvm-22
steps:
- name: Checkout
uses: actions/checkout@v7
with:
# Make sure the actual branch is checked out when running on pull requests
ref: ${{ github.head_ref }}
repository: ${{github.event.pull_request.head.repo.full_name || github.repository }}
- name: Install LLVM dependencies from APT (Linux)
if: runner.os == 'Linux'
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 22
sudo apt install libpolly-22-dev
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy
- name: Install Rust problem matchers
uses: r7kamura/rust-problem-matchers@v1
- name: Install cargo-tarpaulin
uses: taiki-e/install-action@v2
with:
tool: cargo-tarpaulin
- name: Use dependency cache
uses: Swatinem/rust-cache@v2
- name: cargo test
uses: actions-rs/cargo@v1
with:
command: tarpaulin
args: -o lcov --engine llvm --skip-clean
- name: Upload coverage
uses: codecov/codecov-action@v7
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}