-
Notifications
You must be signed in to change notification settings - Fork 3
56 lines (49 loc) · 1.5 KB
/
build.yaml
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
name: Build
on:
push:
branches-ignore:
- staging.tmp
- trying.tmp
- staging-squash-merge.tmp
pull_request:
jobs:
build-cmake:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
include:
- os: ubuntu-latest
cmake-args: -G "Unix Makefiles"
build-args: --parallel
package-file: fng-*-linux_x86_64.tar.xz
- os: windows-latest
cmake-args: -G "Visual Studio 16 2019" -A x64
package-file: fng-*-win64.zip
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Prepare Linux
if: contains(matrix.os, 'ubuntu')
run: |
sudo apt-get update -y
sudo apt-get install pkg-config cmake -y
- name: Build in release mode
run: |
mkdir release
cd release
${{ matrix.cmake-path }}cmake ${{ matrix.cmake-args }} -DCMAKE_BUILD_TYPE=Release -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE=. ..
${{ matrix.cmake-path }}cmake --build . --config Release ${{ matrix.build-args }} --target fng2_srv
- name: Package
run: |
cd release
${{ matrix.cmake-path }}cmake --build . --config Release ${{ matrix.build-args }} --target package_default
mkdir artifacts
mv ${{ matrix.package-file }} artifacts
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: fng-${{ matrix.os }}
path: release/artifacts