-
-
Notifications
You must be signed in to change notification settings - Fork 1k
160 lines (129 loc) · 4.78 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
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
148
149
150
151
152
153
154
155
156
157
158
159
160
name: MacOS
on:
push:
branches: [ RC_1_2 RC_2_0 master ]
paths-ignore:
- bindings/python/**
pull_request:
paths-ignore:
- bindings/python/**
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}
cancel-in-progress: true
jobs:
test:
name: Tests
runs-on: macos-latest
continue-on-error: true
strategy:
matrix:
config: [ crypto=built-in, webtorrent=on deprecated-functions=off ]
steps:
- name: checkout
uses: actions/checkout@v3
with:
submodules: recursive
- uses: Chocobo1/setup-ccache-action@v1
with:
override_cache_key: ccache-macos-test-${{ matrix.config }}-${{ github.base_ref }}
ccache_options: |
max_size=1G
- name: install boost
run: |
brew install boost-build boost openssl@1.1
pip3 install websockets
echo "using darwin ;" >>~/user-config.jam
- name: build and run tests
run: (cd test; b2 ${{ matrix.config }} -l400 warnings-as-errors=on debug-iterators=on invariant-checks=full asserts=on deterministic-tests)
- name: run tests (flaky)
uses: nick-fields/retry@v2
with:
timeout_minutes: 30
retry_wait_seconds: 1
max_attempts: 3
command: (cd test; b2 ${{ matrix.config }} -l400 warnings-as-errors=on debug-iterators=on invariant-checks=full asserts=on)
sim:
name: Simulations
runs-on: macos-latest
steps:
- name: checkout
uses: actions/checkout@v3
with:
submodules: true
- uses: Chocobo1/setup-ccache-action@v1
with:
override_cache_key: ccache-macos-sim-${{ github.base_ref }}
ccache_options: |
max_size=1G
- name: install boost
run: |
brew install boost-build boost openssl@1.1
echo "using darwin ;" >>~/user-config.jam
- name: build and run simulations
run: |
cd simulation
b2 -l400 debug-iterators=on invariant-checks=full asserts=on
build:
name: Build
runs-on: macos-latest
continue-on-error: true
strategy:
matrix:
config: [ crypto=built-in, release ]
steps:
- name: checkout
uses: actions/checkout@v3
with:
submodules: true
- uses: Chocobo1/setup-ccache-action@v1
with:
override_cache_key: ccache-macos-build-${{ matrix.config }}-${{ github.base_ref }}
ccache_options: |
max_size=1G
- name: install boost
run: |
brew install boost-build boost openssl@1.1
echo "using darwin ;" >>~/user-config.jam
- name: build library
run: |
b2 ${{ matrix.config }} -l400 warnings-as-errors=on
ios_build:
name: Build iOS
runs-on: macos-latest
continue-on-error: true
steps:
- name: checkout
uses: actions/checkout@v3
with:
submodules: true
- name: install boost
run: |
git clone --depth=1 --recurse-submodules -j10 --branch=boost-1.78.0 https://github.com/boostorg/boost.git
cd boost
./bootstrap.sh
- name: boost headers
run: |
cd boost
./b2 headers
cp b2 ..
- name: user-config
run: |
echo "using darwin : ios_sim : clang++ : <compileflags>-Wno-deprecated-declarations
<compileflags>\"-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk\"
<compileflags>-mios-simulator-version-min=12
<compileflags>-fobjc-abi-version=2
<linkflags>\"-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk\"
<linkflags>-mios-simulator-version-min=12
<linkflags>-fobjc-abi-version=2 ;" >>~/user-config.jam;
echo "using darwin : ios : clang++ : <compileflags>-Wno-deprecated-declarations
<compileflags>\"-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk\"
<compileflags>-mios-version-min=12
<compileflags>\"-arch arm64\"
<compileflags>-fobjc-abi-version=2
<linkflags>\"-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk\"
<linkflags>-mios-version-min=12
<linkflags>\"-arch arm64\"
<linkflags>-fobjc-abi-version=2 ;" >>~/user-config.jam;
- name: build library
run: |
BOOST_ROOT=boost ./b2 -l400 cxxstd=14 target-os=iphone crypto=built-in darwin-ios darwin-ios_sim address-model=64 link=static