Repository navigation
90 lines (77 loc) · 2.65 KB
/
Copy pathc-cpp.yml
File metadata and controls
90 lines (77 loc) · 2.65 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
name: lcdgfx CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Runs a single command using the runners shell
- name: Install apt dependencies
run: |
sudo apt update
sudo apt install -y gcc g++ clang clang-format libsdl2-dev lcov
sudo apt install -y cppcheck cpputest doxygen avr-libc gcc-avr graphviz
sudo pip3 install cpp-coveralls
pip3 install --user cpp-coveralls
# Runs a set of commands using the runners shell
- name: Building documentation
run: |
make docs 1> /dev/null
#
- name: Building via gcc and running unit tests
run: |
./.travis/run_unit_tests.sh gcc
make clean
make ARCH=linux EXTRA_CPPFLAGS="--coverage" coverage
- name: Upload coverage statistics
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./lcov.info
- name: Building via clang
run: |
make clean
./.travis/run_unit_tests.sh clang
make cppcheck
- name: Building and testing under C++14
run: |
make clean
make ARCH=linux SDL_EMULATION=y CXXSTD=c++14 check
- name: Building and testing under C++17
run: |
make clean
make ARCH=linux SDL_EMULATION=y CXXSTD=c++17 check
- name: Building for AVR
run: |
make clean
make ARCH=avr SDL_EMULATION=n
- name: Cache ESP32 build system modules
uses: actions/cache@v3
env:
cache-name: cache-esp32-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: |
~/esp
~/.espressif
key: ${{ runner.os }}-lcd_gfx
- name: Install ESP32 SDK
run: |
./.travis/setup_esp_build_env.sh travis
- name: Building ESP32 code
run: |
. ~/esp/esp-idf/export.sh
make -C examples -f Makefile.esp32 PROJECT=demos/ssd1306_demo
- name: Building ESP32 code with SPI DMA enabled
run: |
. ~/esp/esp-idf/export.sh
# Fresh build dir so CMake reconfigures with the injected define
rm -rf bld/esp32
make -C examples -f Makefile.esp32 PROJECT=demos/ssd1306_demo EXTRA_DEFS=CONFIG_ESP32_SPI_DMA_ENABLE