-
Notifications
You must be signed in to change notification settings - Fork 3
76 lines (60 loc) · 2.27 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
name: ci
on:
pull_request:
push:
branches:
- main
- master
jobs:
build:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: "clang17"
pkg: "clang-17 clang-tidy-17 g++-13 libc++-17-dev libc++1-17 libc++abi-17-dev libc++abi1-17 libunwind-17-dev"
toolchain: clang-17
os: ubuntu-22.04
- name: "gcc13"
pkg: "gcc-13 g++-13"
toolchain: gcc-13
os: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Configure APT (llvm)
continue-on-error: true
if: contains(matrix.pkg, 'clang')
run: |
sudo apt-add-repository --no-update --yes "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main"
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
- name: Configure APT
continue-on-error: true
run: |
echo 'APT::Acquire::Retries "5";' | sudo tee -a /etc/apt/apt.conf.d/80-retries > /dev/null
sudo add-apt-repository --no-update --yes ppa:ubuntu-toolchain-r/ppa
sudo add-apt-repository --no-update --yes ppa:ubuntu-toolchain-r/test
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ jammy main' | sudo tee /etc/apt/sources.list.d/kitware.list
sudo apt-get update
- name: Install CMake
run: sudo apt-get install --yes cmake
- name: Install Ninja
run: sudo apt-get install --yes ninja-build
- name: Install compiler/tool ${{ matrix.pkg }}
run: sudo apt-get install --yes ${{ matrix.pkg }}
- name: Build
run: |
./bld compile TOOLCHAIN=${{ matrix.toolchain }}
- name: Test
run: |
./bld test TOOLCHAIN=${{ matrix.toolchain }}
- name: Test-ASAN
run: |
./bld test TOOLCHAIN=${{ matrix.toolchain }} CONFIG=Asan
- name: Test-TSAN
run: |
./bld test TOOLCHAIN=${{ matrix.toolchain }} CONFIG=Tsan