forked from wootguy/bspguy
-
Notifications
You must be signed in to change notification settings - Fork 14
106 lines (84 loc) · 3.29 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
name: C/C++ CI
on: [push, pull_request]
jobs:
get_time_build:
name: "TAG NAME"
runs-on: ubuntu-latest
outputs:
release_tag: ${{ steps.tag.outputs.release_tag }}
steps:
- name: Generate nightly release tag
id: tag
run: |
echo "release_tag=NightBuild_$(date +"%Y.%m.%d_%H-%M")" >> $GITHUB_OUTPUT
linux_build:
name: "Linux"
needs: get_time_build
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
outputs:
release_tag: ${{ steps.tag.outputs.release_tag }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v1
with:
cmake-version: "latest"
- name: Download and install dependencies
run: |
sudo apt update
sudo apt install libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libglfw3-dev libglew-dev libxxf86vm-dev libfmt-dev --allow-unauthenticated --fix-missing
- name: Build release
run: |
mkdir build; cd build
cmake .. -DCMAKE_BUILD_TYPE=RELEASE
make
- name: Publish nightly binaries for linux
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ needs.get_time_build.outputs.release_tag }}
files: |
build/bspguy
cfg/bspguy.cfg
cfg/language.ini
window_build:
name: 'Windows'
needs: get_time_build
runs-on: windows-latest
env:
solution: 'vs-project/bspguy.sln'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: true
- name: Add msbuild to PATH
uses: microsoft/[email protected]
with:
vs-prerelease: true
- name: Build app for release
run: |
msbuild ${{ env.solution }} -m -t:rebuild -verbosity:diag -property:Configuration=Release
- name: Publish nightly binaries for windows
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ needs.get_time_build.outputs.release_tag }}
files: |
vs-project/Release/bspguy.exe
cfg/bspguy.cfg
cfg/language.ini
- name: Build app for debug
run: |
msbuild ${{ env.solution }} -m -t:rebuild -verbosity:diag -property:Configuration=DebugGithub
- name: Publish nightly debug binaries for windows
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ needs.get_time_build.outputs.release_tag }}
files: |
vs-project/Release/bspguy_debug.exe
cfg/bspguy.cfg
cfg/language.ini