This repository was archived by the owner on Mar 10, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
149 lines (119 loc) · 3.45 KB
/
ci.yml
File metadata and controls
149 lines (119 loc) · 3.45 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# Copyright 2025 Accenture.
#
# SPDX-License-Identifier: Apache-2.0
name: CI
permissions:
contents: read
on:
push:
branches: ["main"]
pull_request:
branches: ["*"]
workflow_dispatch:
jobs:
bazel-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: bazelbuild/setup-bazelisk@v3
- name: Install Clang
run: |
sudo apt update
sudo apt install -y clang
- uses: actions/cache@v4
with:
path: "~/.cache/bazel"
key: bazel
- name: Build all workspace targets
run: bazel build //...
- name: Run all workspace tests
run: bazel test //...
- name: Lint rust code (with clippy)
run: bazel build --config=lint-rust //...
cargo-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.83.0
components: clippy, rustfmt
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Clang
run: |
sudo apt update
sudo apt install -y clang
- run: cargo fmt --check
- run: cargo clippy --workspace --all-features --exclude mini-adas -- -D warnings
- run: cargo build --workspace --all-features --exclude mini-adas
cargo-build-mini-adas:
name: Compile and check mini-adas with mutually exclusive features
runs-on: ubuntu-latest
strategy:
matrix:
com_type:
- com_iox2
signaling_type:
- signalling_direct_mpsc
- signalling_direct_tcp
- signalling_direct_unix
- signalling_relayed_tcp
recording:
- "--features recording"
- ""
exclude:
- signaling_type: signalling_direct_mpsc
recording: "--features recording"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.83.0
components: clippy, rustfmt
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Clang
run: |
sudo apt update
sudo apt install -y clang
- run: |
cargo clippy -p mini-adas \
--no-default-features \
--features ${{ matrix.com_type }} \
--features ${{ matrix.signaling_type }} \
${{ matrix.recording }} \
-- -D warnings
- run: |
cargo build -p mini-adas \
--no-default-features \
--features ${{ matrix.com_type }} \
--features ${{ matrix.signaling_type }} \
${{ matrix.recording }}
cargo-miri:
runs-on: ubuntu-latest
env:
MIRIFLAGS: "-Zmiri-disable-isolation"
steps:
- uses: actions/checkout@v4
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2024-12-17
components: miri, rust-src
- name: Install Clang
run: |
sudo apt update
sudo apt install -y clang
- run: cargo +nightly-2024-12-17 miri test