-
Notifications
You must be signed in to change notification settings - Fork 147
70 lines (59 loc) · 1.77 KB
/
concrete_cpu_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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: concrete-cpu test
on:
workflow_dispatch:
pull_request:
paths:
- .github/workflows/concrete_cpu_test.yml
- backends/concrete-cpu/**
push:
branches:
- 'main'
- 'release/*'
concurrency:
group: concrete_cpu_test_${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
env:
CARGO_TERM_COLOR: always
jobs:
tests-linux:
strategy:
fail-fast: false
matrix:
runson: ["ubuntu-20.04"]
runs-on: ubuntu-20.04
env:
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Rust install
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
with:
toolchain: nightly-2024-09-30
override: true
components: rustfmt, clippy
- name: Download cargo cache
uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
- name: Formatting
run: |
cd backends/concrete-cpu/implementation
cargo fmt --check
- name: Remove header to force regeneration
run: |
cd backends/concrete-cpu/implementation
rm include/concrete-cpu.h
- name: Build
run: |
cd backends/concrete-cpu/implementation
cargo build --all-targets
- name: Check regenerated header is unchanged
run: |
cd backends/concrete-cpu/implementation
git diff --exit-code
- name: Lint
run: |
cd backends/concrete-cpu/implementation
cargo +stable clippy --all-targets
- name: Tests
run: |
cd backends/concrete-cpu/implementation
cargo test --no-fail-fast --all-targets --features=nightly