-
Notifications
You must be signed in to change notification settings - Fork 60
91 lines (86 loc) · 2.4 KB
/
ci.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: CarlaViz CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
CARLAVIZ_CI_VERSION_OVERRIDE: "0.0.1"
jobs:
clang-format-check:
runs-on: ubuntu-22.04
steps:
# git checkout
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Copy .clang-format file
run: cp ./backend/.clang-format .
# clang format check
- name: Run clang-format style check
uses: jidicula/[email protected]
with:
clang-format-version: '14'
check-path: backend
build-backend:
strategy:
matrix:
os: [ubuntu-22.04, windows-2022]
profile: [gcc11, clang14, msvc17]
build_type: [Debug, Release]
exclude:
- os: windows-2022
profile: gcc11
- os: windows-2022
profile: clang14
- os: ubuntu-22.04
profile: msvc17
runs-on: ${{ matrix.os }}
steps:
# git checkout
- uses: actions/checkout@v4
with:
fetch-depth: 0
# dependencies
- name: Install cmake and compilers
if: matrix.os == 'ubuntu-22.04'
run: sudo apt install -y cmake g++-11 clang-14 libc++-14-dev
- name: Install conan and coverage tool
run: pip install conan==1.55.0 && conan user
- name: Add conan registry
run: conan remote add gitlab https://gitlab.com/api/v4/projects/44861904/packages/conan
- name: Copy conan profiles
shell: bash
run: bash misc/cicd/conan/copy_conan_profiles.sh ${HOME}/
# install packages and build
- name: Install
run: cd backend && conan install . --build=missing -pr ${HOME}/${{ matrix.profile }} -s build_type=${{ matrix.build_type }}
- name: Build
run: cd backend && conan build .
build-frontend:
runs-on: ubuntu-22.04
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install
uses: borales/actions-yarn@v5
with:
cmd: install
dir: "frontend"
- name: Build
uses: borales/actions-yarn@v5
with:
cmd: build
dir: "frontend"
build-docker:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Build Docker image
run: docker build -t carlaviz:test .