-
Notifications
You must be signed in to change notification settings - Fork 46
109 lines (98 loc) · 3.79 KB
/
ccpp.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
name: C/C++ CI
on:
push:
branches: [ master, release/v8.* ]
pull_request:
branches: [ master, release/v8.* ]
jobs:
build:
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
runs-on: ubuntu-latest
strategy:
matrix:
# A valid option parameter to the cmake file.
# See BUILD_OPTIONS in tests/CMakeLists.txt.
build_option: ['OPTIONS_MINIMAL_MONOCHROME',
'OPTIONS_NORMAL_8BIT',
'OPTIONS_16BIT',
'OPTIONS_16BIT_SWAP',
'OPTIONS_FULL_32BIT']
name: Build ${{ matrix.build_option }}
steps:
- uses: actions/checkout@v2
- uses: ammaraskar/gcc-problem-matcher@master
- name: Install prerequisites
run: scripts/install-prerequisites.sh
- name: Building ${{ matrix.build_option }}
run: python tests/main.py --build-option=${{ matrix.build_option }} build
test-native:
runs-on: ubuntu-latest
name: amd64 Executable Tests
steps:
- uses: actions/checkout@v2
- uses: ammaraskar/gcc-problem-matcher@master
- name: Install prerequisites
run: scripts/install-prerequisites.sh
- name: Fix kernel mmap rnd bits
# Asan in llvm 14 provided in ubuntu 22.04 is incompatible with
# high-entropy ASLR in much newer kernels that GitHub runners are
# using leading to random crashes: https://reviews.llvm.org/D148280
run: sudo sysctl vm.mmap_rnd_bits=28
- name: Run tests
run: python tests/main.py --report test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
if: github.event_name == 'push'
with:
fail_ci_if_error: true
verbose: true
test-cross:
# The host should always be linux
runs-on: ubuntu-latest
name: ${{ matrix.arch }} Executable Tests
# Run steps on a matrix of 3 arch/distro combinations
strategy:
matrix:
arch: [ 'aarch64', 'armv6', 'armv7' ]
steps:
- uses: actions/[email protected]
- uses: ammaraskar/gcc-problem-matcher@master
- name: Setup cache
uses: actions/cache@v2
with:
path: |
~/.ccache
key: lvgl_ci_cross_test_ccache_${{ matrix.arch }}_${{ github.sha }}
restore-keys: |
lvgl_ci_cross_test_ccache_${{ matrix.arch }}
- uses: uraimo/[email protected]
name: Run tests
id: build
with:
arch: ${{ matrix.arch }}
distro: bullseye
# Not required, but speeds up builds
githubToken: ${{ github.token }}
# The shell to run commands with in the container
shell: /bin/bash
# Create cached/volume directories on host
setup: |
mkdir -p ~/.ccache
# Mount cached directories in the container for faster builds
dockerRunArgs: |
--volume "${HOME}/.ccache:/root/.ccache"
install: |
apt-get update -y
apt-get install build-essential ccache python3 libpng-dev ruby-full gcovr cmake -q -y
/usr/sbin/update-ccache-symlinks
echo 'export PATH="/usr/lib/ccache:$PATH"' | tee -a ~/.bashrc
run: |
if [[ "${{ matrix.distro }}" == "ubuntu22.04" ]]; then
# ASan in llvm 14 provided in ubuntu-22.04 is incompatible with
# high-entropy ASLR configured in much newer kernels that GitHub
# runners are using leading to random crashes:
# https://github.com/actions/runner-images/issues/9491
# can remove this once the issue is fixed.
sysctl -w vm.mmap_rnd_bits=28
fi
env PATH="/usr/lib/ccache:$PATH" ASAN_OPTIONS=detect_leaks=0 python3 tests/main.py test