-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (51 loc) · 1.83 KB
/
build.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
name: Build DatBot
on: [push]
jobs:
build:
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macOS-latest]
steps:
- uses: actions/checkout@v2
- name: Set up Windows
if: runner.os == 'Windows'
shell: bash
run: |
vcpkg install rxcpp rxcpp:x64-windows yaml-cpp yaml-cpp:x64-windows
echo ::set-env name=CMAKE_FLAGS::"-DCMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake"
- name: Set up Linux
if: runner.os == 'Linux'
run: |
sudo apt install libboost-dev libboost-program-options-dev
sudo vcpkg install rxcpp yaml-cpp
echo ::set-env name=CMAKE_FLAGS::"-DCMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake"
- name: Set up macOS
if: runner.os == 'macOS'
run: |
brew install boost yaml-cpp
git clone --depth=1 "https://github.com/ReactiveX/RxCpp.git"
cmake -E make_directory RxCppBuild
cd RxCppBuild
cmake ../RxCpp
sudo make install
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake ../DatBot -DCMAKE_BUILD_TYPE=Release $CMAKE_FLAGS -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
#- name: Lint
# working-directory: ${{runner.workspace}}/build
# run: clang-tidy -p . ../*.cpp
- name: Make
working-directory: ${{runner.workspace}}/build
run: cmake --build . -v --config Release
#- name: Pack
# working-directory: ${{runner.workspace}}/build
# run: cpack -G TGZ
- uses: actions/upload-artifact@v1
with:
name: DatBot-${{runner.os}}
path: ${{runner.workspace}}/build/DatBot