forked from nanopb/nanopb
-
Notifications
You must be signed in to change notification settings - Fork 7
62 lines (53 loc) · 1.93 KB
/
compiler_tests.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
name: Run tests with various compilers
on:
workflow_dispatch:
workflow_call:
jobs:
test_linux:
name: Test with gcc & clang on Ubuntu
runs-on: ubuntu-20.04
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2
with:
path: nanopb
fetch-depth: "0"
- name: Install dependencies
run: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install python3-protobuf protobuf-compiler scons
sudo apt-get install clang valgrind splint cmake
sudo apt-get install libstdc++6:i386 libgcc-s1:i386 lib32gcc-9-dev lib32stdc++-9-dev libncurses5:i386 libc6-dbg:i386 libc6-dev:i386 binutils-multiarch
- name: Test with 64-bit GCC
run: |
cd nanopb/tests
rm -rf build
scons CC=gcc CXX=g++ CCFLAGS="-O3"
rm -rf build
scons CC=gcc CXX=g++ CCFLAGS="-Os -flto"
rm -rf build
scons CC=gcc CXX=g++ CCFLAGS="-O1 -DPB_FIELD_32BIT=1"
- name: Test with 32-bit GCC
run: |
cd nanopb/tests
rm -rf build
scons CC=gcc CXX=g++ CCFLAGS="-O3 -m32" LINKFLAGS="-m32"
rm -rf build
scons CC=gcc CXX=g++ CCFLAGS="-Os -flto -m32" LINKFLAGS="-m32"
rm -rf build
scons CC=gcc CXX=g++ CCFLAGS="-O1 -DPB_FIELD_32BIT=1 -m32" LINKFLAGS="-m32"
- name: Test with 64-bit clang
run: |
cd nanopb/tests
rm -rf build
scons CC=clang CXX=clang++ CCFLAGS="-O3"
rm -rf build
scons CC=clang CXX=clang++ CCFLAGS="-Os -DPB_FIELD_32BIT=1"
- name: Test with 32-bit clang
run: |
cd nanopb/tests
rm -rf build
scons CC=clang CXX=clang++ CCFLAGS="-O3 -m32" LINKFLAGS="-m32"
rm -rf build
scons CC=clang CXX=clang++ CCFLAGS="-Os -DPB_FIELD_32BIT=1 -m32" LINKFLAGS="-m32"