This repository has been archived by the owner on Jun 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
79 lines (73 loc) · 2.53 KB
/
ccpp.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
name: CI
on: [push, pull_request]
jobs:
build-linux:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-18.04]
build_type: [Debug, Release]
steps:
- uses: actions/checkout@v2
- name: build and test
run: |
mkdir -p build/linux
cd build/linux
cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
-DCMAKE_INSTALL_PREFIX=dist ../..
make
make install
build-macos:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-11, macos-10.15]
build_type: [Debug, Release]
steps:
- uses: actions/checkout@v2
- name: build and test
run: |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
if [[ $(brew list | grep 'autoconf') != *autoconf* ]]; then
brew install autoconf
fi
if [[ $(brew list | grep 'automake') != *automake* ]]; then
brew install automake
fi
if [[ $(brew list | grep 'libtool') != *libtool* ]]; then
brew install libtool
fi
if [[ $(brew list | grep 'pkg-config') != *pkg-config* ]]; then
brew install pkg-config
fi
mkdir -p build/macos
cd build/macos
cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
-DCMAKE_INSTALL_PREFIX=dist ../..
make
make install
build-windows:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-2016]
arch: [amd64]
steps:
- uses: actions/checkout@v2
- name: build and test
shell: cmd
run: |
if exist "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" (
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=${{matrix.arch}}
)
if exist "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsDevCmd.bat" (
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=${{matrix.arch}}
)
mkdir build\windows
cd build\windows
cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=dist -DCMAKE_VS_PLATFORM_TOOLSET=v141 -DCMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION=10.0.17763.0 ..\..
nmake > temp.log
nmake install