-
Notifications
You must be signed in to change notification settings - Fork 516
147 lines (127 loc) · 4.75 KB
/
Copy pathmeson.yml
File metadata and controls
147 lines (127 loc) · 4.75 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
name: Meson CI
on:
push:
branches: [ 2_x_dev ]
pull_request:
branches: [ 2_x_dev ]
schedule:
- cron: '20 4 * * 1'
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
crypto: [internal, openssl, openssl3, nss, mbedtls, mbedtls4]
exclude:
- os: windows-latest
crypto: openssl
- os: windows-latest
crypto: openssl3
- os: windows-latest
crypto: nss
- os: windows-latest
crypto: mbedtls
- os: windows-latest
crypto: mbedtls4
- os: ubuntu-latest
crypto: openssl3
include:
- crypto: internal
meson-crypto-enable: ""
- crypto: openssl
meson-crypto-enable: "-Dcrypto-library=openssl"
- crypto: openssl3
meson-crypto-enable: "-Dcrypto-library=openssl"
- crypto: nss
meson-crypto-enable: "-Dcrypto-library=nss"
- crypto: mbedtls
meson-crypto-enable: "-Dcrypto-library=mbedtls"
- crypto: mbedtls4
meson-crypto-enable: "-Dcrypto-library=mbedtls"
runs-on: ${{ matrix.os }}
env:
CTEST_OUTPUT_ON_FAILURE: 1
steps:
- name: Setup Ubuntu Meson
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install meson
- name: Setup macOS Meson
if: matrix.os == 'macos-latest'
run: |
brew install meson
- name: Setup Windows Meson & Ninja
if: matrix.os == 'windows-latest'
run: |
choco install ninja
pip3 install meson
- name: Setup Ubuntu NSS
if: matrix.os == 'ubuntu-latest' && matrix.crypto == 'nss'
run: |
sudo apt-get update
sudo apt-get install libnss3-dev
- name: Setup Ubuntu MbedTLS
if: matrix.os == 'ubuntu-latest' && matrix.crypto == 'mbedtls'
run: sudo apt-get install libmbedtls-dev
- name: Setup Ubuntu MbedTLS 4
if: matrix.os == 'ubuntu-latest' && matrix.crypto == 'mbedtls4'
run: |
python3 -m pip install --break-system-packages --upgrade jsonschema jinja2
git clone https://github.com/Mbed-TLS/mbedtls.git /tmp/mbedtls4-src
cd /tmp/mbedtls4-src
git checkout mbedtls-4.0.0
git submodule update --init --recursive
# PIC: static libtfpsacrypto must be linkable into libsrtp2.so.
cmake -S . -B build -DENABLE_TESTING=OFF -DENABLE_PROGRAMS=OFF \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
cmake --build build -j
sudo cmake --install build
- name: Setup macOS OpenSSL
if: matrix.os == 'macos-latest' && matrix.crypto == 'openssl'
run: echo "PKG_CONFIG_PATH=$(brew --prefix openssl@1.1)/lib/pkgconfig" >> $GITHUB_ENV
- name: Setup macOS OpenSSL3
if: matrix.os == 'macos-latest' && matrix.crypto == 'openssl3'
run: |
brew install openssl@3
echo "PKG_CONFIG_PATH=$(brew --prefix openssl@3)/lib/pkgconfig" >> $GITHUB_ENV
- name: Setup macOS NSS
if: matrix.os == 'macos-latest' && matrix.crypto == 'nss'
run: brew install nss
- name: Setup macOS MbedTLS
if: matrix.os == 'macos-latest' && matrix.crypto == 'mbedtls'
run: |
brew install mbedtls@3
echo "PKG_CONFIG_PATH=$(brew --prefix mbedtls@3)/lib/pkgconfig" >> $GITHUB_ENV
- name: Setup macOS MbedTLS 4
if: matrix.os == 'macos-latest' && matrix.crypto == 'mbedtls4'
run: |
# Install outside $GITHUB_WORKSPACE so the install survives the
# actions/checkout@v2 step that wipes the workspace later in the job.
python3 -m pip install --break-system-packages --upgrade jsonschema jinja2
git clone https://github.com/Mbed-TLS/mbedtls.git /tmp/mbedtls4-src
cd /tmp/mbedtls4-src
git checkout mbedtls-4.0.0
git submodule update --init --recursive
cmake -S . -B build -DENABLE_TESTING=OFF -DENABLE_PROGRAMS=OFF \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DCMAKE_INSTALL_PREFIX=/tmp/mbedtls4-prefix
cmake --build build -j
cmake --install build
echo "PKG_CONFIG_PATH=/tmp/mbedtls4-prefix/lib/pkgconfig" >> $GITHUB_ENV
- uses: actions/checkout@v2
- name: Create Build Environment
run: meson setup ${{github.workspace}}/build
- name: Configure Meson
working-directory: ${{github.workspace}}/build
shell: bash
run: ${{ env.pkgconfig-crypto-dir }} meson configure ${{ matrix.meson-crypto-enable }}
- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
run: ninja
- name: Test
working-directory: ${{github.workspace}}/build
shell: bash
run: meson test