This repository has been archived by the owner on Feb 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
90 lines (76 loc) · 2.1 KB
/
build.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
name: Build
on:
push:
branches:
- main
- stable
pull_request:
branches:
- main
- stable
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
compiler: [gcc, clang]
os: [ubuntu-20.04, macos-latest, windows-latest]
exclude:
- os: macos-latest
compiler: gcc
- os: windows-latest
compiler: clang
env:
CC: ${{ matrix.compiler }}
steps:
- uses: actions/checkout@v3
- name: fix flaky azure mirrors
if: ${{ runner.os == 'Linux' }}
run: |
sudo sed -i 's/azure\./de\./' /etc/apt/sources.list
- name: install packages linux
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt-get update -q -y && sudo apt-get install -q -y libssl-dev valgrind
- name: openssl path macos
if: ${{ runner.os == 'macOS' }}
run: |
echo "OPENSSL_ROOT_DIR=/usr/local/opt/openssl" >> $GITHUB_ENV
- name: install packages
if: ${{ runner.os == 'Windows' }}
run: |
choco install --no-progress openssl
- uses: sreimers/[email protected]
with:
name: re
repo: https://github.com/baresip/re
secret: ${{ secrets.GITHUB_TOKEN }}
- name: make re
shell: bash
run: |
for p in re; do
cmake -S $p -B $p/build
cmake --build $p/build -j
done
for p in re; do
mv $p ../.
done
- name: ldconfig
if: ${{ runner.os == 'Linux' }}
run: sudo ldconfig
- name: retest
if: ${{ runner.os == 'Linux' }}
run: |
cmake -DCMAKE_C_FLAGS="-Werror" . && make
valgrind --leak-check=full --show-reachable=yes --error-exitcode=42 ./retest -v -ri
- name: retest
if: ${{ runner.os == 'macOS' }}
run: |
OPENSSL_ROOT_DIR=/usr/local/opt/openssl cmake -DCMAKE_C_FLAGS="-Werror" . && make
./retest -v -r
- name: retest
if: ${{ runner.os == 'Windows' }}
run: |
cmake -B build -DCMAKE_C_FLAGS="/WX"
cmake --build build
build\Debug\retest.exe -v -r