-
Notifications
You must be signed in to change notification settings - Fork 3
50 lines (50 loc) · 1.98 KB
/
test.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
name: test
on: [push, pull_request]
jobs:
feature-matrix:
uses: ./.github/workflows/feature-matrix.yml
test:
name: test ${{ matrix.package.name }} (${{ matrix.package.features }})
runs-on: ubuntu-latest
needs: [feature-matrix]
strategy:
fail-fast: false
matrix:
package: ${{ fromJson(needs.feature-matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Install accelsim dependencies
# if: ${{ matrix.package.need_accelsim_build_dependencies }}
run: >-
sudo apt-get install -y wget build-essential xutils-dev bison zlib1g-dev flex libglu1-mesa-dev libssl-dev libxml2-dev libboost-all-dev git g++
- name: Install CUDA
uses: Jimver/[email protected]
# for testing, we always install CUDA
# if: ${{ matrix.package.need_cuda }}
id: cuda-toolkit
with:
cuda: "11.8.0"
method: "network"
use-github-cache: true
# list of available packages here:
# https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/
sub-packages: '["nvcc", "runtime", "profiler-api"]'
- name: Lint
continue-on-error: true # for now we are not too pedantic
run: >-
cargo clippy --package "${{ matrix.package.name }}" --no-default-features --features "${{ matrix.package.features }}" --tests --benches --examples --all-targets -- -Dclippy::all -Dclippy::pedantic
- name: Test
run: >-
cargo test --package "${{ matrix.package.name }}" --no-default-features --features "${{ matrix.package.features }}" --all-targets -- --test-threads=1
publish:
name: publish (dry-run)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Publish crates (dry-run)
uses: romnn/publish-crates@main
with:
dry-run: true
resolve-versions: true