-
Notifications
You must be signed in to change notification settings - Fork 169
84 lines (71 loc) · 2.14 KB
/
multi-compiler.yml
File metadata and controls
84 lines (71 loc) · 2.14 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
name: Multi-Compiler Tests
on:
push:
branches: [ 'master', 'main', 'release/**' ]
pull_request:
branches: [ '*' ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
compiler_test:
name: ${{ matrix.cc }}
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
include:
- cc: gcc-11
- cc: gcc-12
- cc: gcc-13
- cc: clang-14
- cc: clang-15
- cc: clang-17
steps:
- uses: actions/checkout@v4
- name: Install compiler and tools
run: |
sudo apt-get update
sudo apt-get install -y ${{ matrix.cc }} autoconf automake libtool
- name: Cache wolfSSL
id: cache-wolfssl
uses: actions/cache@v4
with:
path: ~/wolfssl-install
key: wolfssl-ubuntu-latest-v2
- name: Build wolfSSL
if: steps.cache-wolfssl.outputs.cache-hit != 'true'
run: |
cd ~
git clone --depth 1 https://github.com/wolfssl/wolfssl.git
cd wolfssl
./autogen.sh
./configure --enable-enckeys --prefix=$HOME/wolfssl-install
make -j$(nproc)
make install
- name: Install wolfSSL
run: |
echo "$HOME/wolfssl-install/lib" | sudo tee /etc/ld.so.conf.d/wolfssl.conf
sudo ldconfig
- name: autogen
run: ./autogen.sh
- name: configure
run: |
# Add -Wno-gnu-zero-variadic-macro-arguments for clang (##__VA_ARGS__ is widely supported)
EXTRA_CFLAGS=""
if [[ "${{ matrix.cc }}" == clang* ]]; then
EXTRA_CFLAGS="-Wno-gnu-zero-variadic-macro-arguments"
fi
CC=${{ matrix.cc }} ./configure \
CFLAGS="-Wall -Wextra -Wpedantic $EXTRA_CFLAGS" \
LDFLAGS="-L$HOME/wolfssl-install/lib" \
CPPFLAGS="-I$HOME/wolfssl-install/include"
- name: make
run: make -j$(nproc)
- name: make dist
run: make dist
- name: Show logs on failure
if: failure()
run: |
cat config.log || true