-
Notifications
You must be signed in to change notification settings - Fork 3
107 lines (101 loc) · 3.23 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
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
name: Build
on:
push:
paths-ignore:
- '.github/*'
- '.github/*_TEMPLATE/**'
- '*.md'
pull_request:
paths-ignore:
- '.github/*'
- '.github/*_TEMPLATE/**'
- '*.md'
jobs:
ubuntu:
name: Ubuntu
runs-on: self-linux
steps:
- name: Clone Tree
uses: actions/checkout@v2
with:
submodules: recursive
- name: Build
run: |
mkdir build
cd build
cmake .. -DENABLE_TESTS=1 \
-DBUILD_STATIC=1 \
-DAUTO_FORMAT=0 \
-DPCAP_ROOT_DIR="$HOME/libpcap" \
-DBOOST_ROOT="$HOME/boost" \
-DNCURSES_ROOT_DIR="$HOME/ncurses" \
-DLibNL_ROOT_DIR="$HOME/libnl" \
-DGTEST_ROOT="$HOME/googletest" \
-DGMOCK_ROOT="$HOME/googletest"
cmake --build . -- -j`nproc`
- name: Unit Tests
run: |
cd build
./xlinkhandheldassistant_tests
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: XLHA-Debian
path: build/xlinkhandheldassistant
if-no-files-found: error
windows:
name: Windows
runs-on: self-windows
defaults:
run:
shell: msys2 {0}
steps:
- name: Setup MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: mingw32
release: false
update: true
- name: Clone Tree
uses: actions/checkout@v2
- name: Build
run: |
mkdir build
cd build
cmake .. -G "MinGW Makefiles" -DAUTO_FORMAT=0 \
-DBUILD_X32=1 \
-DBOOST_ROOT="c:/build_tools/boost" \
-DPDCURSES_ROOT_DIR="c:/build_tools/pdcurses" \
-DPCAP_ROOT_DIR="c:/build_tools/npcapsdk" \
-DNPCAP_DLL_PATH="c:/build_tools/npcapsdk"
mingw32-make -j`nproc`
- uses: actions/upload-artifact@v2
with:
name: XLHA-WindowsX32
path: build/xlinkhandheldassistant.exe
if-no-files-found: error
macos:
name: MacOS10_15
runs-on: self-macOS
steps:
- name: Clone Tree
uses: actions/checkout@v2
with:
submodules: recursive
- name: Build
run: |
mkdir build
cd build
cmake .. -G "Xcode" -DCMAKE_OSX_DEPLOYMENT_TARGET=10.11 \
-DCMAKE_OSX_SYSROOT="$HOME/source/MacOSX10.11.sdk" \
-DAUTO_FORMAT=0 \
-DBUILD_STATIC=1 \
-DPCAP_ROOT_DIR="$HOME/source/libpcap" \
-DBOOST_ROOT="$HOME/source/boost" \
-DNCURSES_ROOT_DIR="$HOME/source/ncurses"
xcodebuild -configuration Release
- uses: actions/upload-artifact@v2
with:
name: XLHA-MacOS10.11
path: build/Release/xlinkhandheldassistant
if-no-files-found: error