-
Notifications
You must be signed in to change notification settings - Fork 43
72 lines (63 loc) · 2.13 KB
/
build_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
71
72
name: Test
on:
push:
branches: master
pull_request:
branches: master
env:
GTEST_OUTPUT: "xml:test_results"
BUILDCMD: "colcon build --event-handlers console_direct+ --executor sequential --cmake-args -DBUILD_HARDENING=ON -DBUILD_TESTING=ON -DBUILD_PYTHON_BINDING=ON -DPYTHON_BINDING_VERSION=${PYTHON_BINDING_VERSION} && colcon test --event-handlers console_direct+ --packages-select ad_map_access ad_physics && colcon test-result"
permissions:
contents: read
jobs:
build-test:
strategy:
matrix:
include:
- os: ubuntu-20.04
compiler: gcc9
EXTRA_PACKAGES: ""
CC: ""
CXX: ""
PYTHON_BINDING_VERSION: "3.8"
- os: ubuntu-20.04
compiler: clang10
EXTRA_PACKAGES: clang-10
CC: /usr/bin/clang-10
CXX: /usr/bin/clang++-10
PYTHON_BINDING_VERSION: "3.10"
- os: ubuntu-22.04
compiler: gcc11
EXTRA_PACKAGES: ""
CC: ""
CXX: ""
PYTHON_BINDING_VERSION: "3.10"
- os: ubuntu-22.04
compiler: clang14
EXTRA_PACKAGES: clang-14
CC: /usr/bin/clang-14
CXX: /usr/bin/clang++-14
PYTHON_BINDING_VERSION: "3.10"
name: ${{ matrix.os }}, ${{ matrix.compiler }}, python-${{ matrix.PYTHON_BINDING_VERSION }}
runs-on: ${{ matrix.os }}
env:
PYTHON_BINDING_VERSION: ${{ matrix.PYTHON_BINDING_VERSION }}
EXTRA_PACKAGES: ${{ matrix.EXTRA_PACKAGES }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1
with:
egress-policy: audit
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
with:
submodules: recursive
- name: Install Dependencies
run: bash .github/workflows/install_dependencies.sh
- name: Build and Test
env:
CC: ${{ matrix.CC }}
CXX: ${{ matrix.CXX }}
run: |
sudo apt-get install ${EXTRA_PACKAGES}
rm -rf log build install
eval CC=${CC} CXX=${CXX} ${BUILDCMD}