Skip to content

Commit 15aa3e8

Browse files
authored
[+] Github Action: build on macOS (#228)
1 parent 7ff50b3 commit 15aa3e8

File tree

1 file changed

+50
-2
lines changed

1 file changed

+50
-2
lines changed

.github/workflows/build.yml

+50-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,15 @@ on:
88

99
jobs:
1010

11-
ubuntu-latest:
11+
build-ubuntu:
1212

13-
runs-on: ubuntu-latest
13+
name: Build on Ubuntu
14+
15+
runs-on: ${{ matrix.runs-on }}
16+
17+
strategy:
18+
matrix:
19+
runs-on: [ubuntu-18.04, ubuntu-20.04, ubuntu-latest]
1420

1521
steps:
1622
- name: Checkout repository
@@ -100,3 +106,45 @@ jobs:
100106
echo "No CODACY_PROJECT_TOKEN provided for Codacy report"
101107
fi
102108
109+
build-macos:
110+
111+
name: Build on macOS
112+
113+
runs-on: ${{ matrix.runs-on }}
114+
115+
strategy:
116+
matrix:
117+
runs-on: [macos-11, macos-latest]
118+
119+
steps:
120+
- name: Checkout repository
121+
uses: actions/checkout@v2
122+
with:
123+
fetch-depth: 2
124+
submodules: 'recursive'
125+
126+
- name: Update Submodule
127+
run: |
128+
git submodule update --init --recursive
129+
130+
- name: Build BoringSSL
131+
run: |
132+
git clone https://github.com/google/boringssl.git ./third_party/boringssl
133+
cd ./third_party/boringssl
134+
mkdir -p build
135+
cd build
136+
cmake -DBUILD_SHARED_LIBS=0 -DCMAKE_C_FLAGS="-fPIC" -DCMAKE_CXX_FLAGS="-fPIC" ..
137+
make ssl crypto
138+
139+
- name: Build XQUIC
140+
run: |
141+
SSL_TYPE_STR="boringssl"
142+
SSL_PATH_STR="${PWD}/third_party/boringssl"
143+
SSL_INC_PATH_STR="${PWD}/third_party/boringssl/include"
144+
SSL_LIB_PATH_STR="${PWD}/third_party/boringssl/build/ssl/libssl.a;${PWD}/third_party/boringssl/build/crypto/libcrypto.a"
145+
mkdir -p build
146+
cd build
147+
cmake -DPLATFORM=mac -DSSL_TYPE=${SSL_TYPE_STR} -DSSL_PATH=${SSL_PATH_STR} -DSSL_INC_PATH=${SSL_INC_PATH_STR} -DSSL_LIB_PATH=${SSL_LIB_PATH_STR} ..
148+
make -j
149+
150+

0 commit comments

Comments
 (0)