-
-
Notifications
You must be signed in to change notification settings - Fork 15
69 lines (64 loc) · 1.84 KB
/
macos.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
name: macOS
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
name: Build
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Install build dependencies
run: |
brew install cmake
brew install gcc
brew install openssl
brew install autoconf
brew install automake
brew install libtool
brew install nasm
- name: Configure
run: |
cmake -G "Unix Makefiles" -S . -B cmake-build-debug \
-DCMAKE_CXX_COMPILER=g++-11 \
-DCMAKE_C_COMPILER=gcc-11 \
-DOPENSSL_ROOT_DIR=/usr/local/Cellar/openssl@1.1/1.1.1l \
-DCMAKE_BUILD_TYPE=Debug \
-DTORRENTTOOLS_BUILD_TESTS=ON \
-DTORRENTTOOLS_TBB=OFF \
-DDOTTORRENT_MB_CRYPTO_LIB=isal \
-DDOTTORRENT_CRYPTO_LIB=openssl
- name: Build
run: cmake --build cmake-build-debug
- name: Save build artifacts
uses: actions/upload-artifact@v2
with:
name: torrenttools-binaries-macos
path: |
cmake-build-debug
!cmake-build-debug/_deps
retention-days: 1
test:
name: Test
needs: Build
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Install runtime dependencies
run: |
brew install cmake
brew install gcc
brew install openssl
- name: Download build artifacts
uses: actions/download-artifact@v2
with:
name: torrenttools-binaries-macos
path: cmake-build-debug
- name: Display structure of downloaded files
run: ls -R
- name: Test
run: |
chmod +x cmake-build-debug/tests/torrenttools-tests
cd cmake-build-debug && ctest