forked from TeeworldsCN/ddnet-pvp
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (43 loc) · 1.22 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
name: Build
on: [push]
jobs:
build-cmake:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, windows-2019]
include:
- os: ubuntu-latest
executable-file: DDNet-Server
- os: windows-latest
executable-file: DDNet-Server.exe
- os: windows-2019
executable-file: DDNet-Server.exe
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Prepare Linux
if: contains(matrix.os, 'ubuntu')
run: |
sudo apt-get update -y
sudo apt-get install cmake libsqlite3-dev -y
- name: Build in release mode
run: |
cmake . -DCMAKE_BUILD_TYPE=Release
cmake --build ./ --config Release
- name: Move release
if: contains(matrix.os, 'windows')
run: mv ./release/${{ matrix.executable-file }} ./
- name: Test release
run: ./${{ matrix.executable-file }} shutdown
- name: Package
run: |
mkdir artifacts
mv ${{ matrix.executable-file }} artifacts
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: huntern-${{ matrix.os }}
path: artifacts