-
Notifications
You must be signed in to change notification settings - Fork 22
55 lines (47 loc) · 1.85 KB
/
cppkiteconnect-test.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
name: CPPKiteConnect-test
# Get triggered on
on:
push:
branches: [main, v2]
pull_request:
branches: [main, v2]
release:
jobs:
# This job builds and runs unit tests
build-and-test:
# Define a strategy
strategy:
# Matrix of configs to test
matrix:
config:
- { name: ubuntu, os: ubuntu-latest }
- { name: macOS, os: macos-latest }
#TODO - { name: windows, os: windows-latest }
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
steps:
# Check out repo with submodules
- uses: actions/checkout@v2
with:
submodules: true
# Build & test on Linux
- name: Build and test on (Ubuntu) Linux
if: startsWith(matrix.config.name, 'ubuntu')
run: |
sudo apt update && sudo apt -y install libssl-dev zlib1g-dev git g++ build-essential cmake googletest google-mock libgtest-dev libgmock-dev doxygen
git clone https://github.com/hoytech/uWebSockets.git
cd uWebSockets && make && sudo make install && cd ..
mkdir build && cd build
cmake .. -DBUILD_EXAMPLES=ON -DBUILD_TESTS=ON && make && make test ARGS="-V"
# Build & test on macOS
- name: Build and test on macOS
if: startsWith(matrix.config.name, 'macOS')
run: |
brew extract --version=1.10.0 googletest homebrew/cask-versions && brew install [email protected] libuv
export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig"
curl -L https://github.com/hoytech/uWebSockets/archive/refs/tags/v0.14.8.tar.gz > uWebSocketsv-0.14.8.tar.gz
tar -xvf uWebSocketsv-0.14.8.tar.gz
cd uWebSockets-0.14.8
make && make installDarwin && cd ..
mkdir build && cd build
cmake .. -DBUILD_EXAMPLES=ON -DBUILD_TESTS=ON && make && make test ARGS="-V"