forked from skullernet/q2pro
-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (76 loc) · 2.57 KB
/
nightly.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
name: nightly
on:
push:
branches: [rerelease-game]
workflow_dispatch:
env:
# FIXME: Re-add '--fatal-meson-warnings' when meson fixed 'CMake Toolchain: Failed to determine CMake compilers state' w/ openal
MESON_ARGS: >-
-Danticheat-server=true
-Dpacketdup-hack=true
-Dtests=true
-Dwerror=true
-Davcodec=enabled
-Dffmpeg:werror=false
-Dlibcurl=enabled
-Dlibjpeg=enabled
-Dlibpng=enabled
-Dopenal=enabled
-Dopenal-soft:werror=false
-Dsoftware-sound=enabled
-Dzlib=enabled
MESON_ARGS_WIN: >-
-Dicmp-errors=enabled
-Dwrap_mode=forcefallback
-Dwindows-crash-dumps=enabled
jobs:
msvc:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/cache@v4
with:
path: subprojects/packagecache
key: ${{ hashFiles('subprojects/*.wrap') }}
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- uses: ilammy/setup-nasm@v1
- name: Install dependencies
run: pip3 install --no-input meson ninja
- name: Build - meson setup
run: |
meson setup ${{ env.MESON_ARGS }} ${{ env.MESON_ARGS_WIN }} builddir
- name: Build info - meson configure
run: |
meson configure builddir
- name: Build - meson compile
run: |
meson compile -C builddir
meson install -C builddir --tags runtime --destdir ${{ github.workspace }}/installdir
- name: Setup variables
uses: actions/github-script@v7
with:
script: core.exportVariable('GITHUB_SHA_SHORT', context.sha.substring(0, 7))
- name: Zip
run: |
Compress-Archive -Path "${{ github.workspace }}/installdir/q2pro.exe", "${{ github.workspace }}/builddir/q2pro.pdb", "${{ github.workspace }}/installdir/q2proded.exe", "${{ github.workspace }}/builddir/q2proded.pdb" -CompressionLevel "Optimal" -DestinationPath "q2pro-rerelease-client_win64_x64.zip"
- name: Update release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release edit nightly -t "Nightly" -n "Latest nightly build" --latest
gh release upload nightly q2pro-rerelease-client_win64_x64.zip --clobber
- name: Update tag
uses: actions/github-script@v7
with:
script: |
github.rest.git.updateRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: "tags/nightly",
sha: context.sha,
force: true
})