forked from ioquake/ioq3
-
-
Notifications
You must be signed in to change notification settings - Fork 3
110 lines (109 loc) · 3.56 KB
/
build.yml
File metadata and controls
110 lines (109 loc) · 3.56 KB
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
108
109
110
name: Build
on:
push:
branches:
- master
- develop
- release/*
tags:
- '*'
pull_request:
workflow_dispatch:
schedule:
- cron: '18 0 1 * *'
jobs:
linux:
name: Linux
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install libsdl2-dev libxcb-glx0-dev
- name: Compile
run: |
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
cmake --build build
echo "VERSION=$(cat build/version.txt)" >> $GITHUB_ENV
cpack --config build/CPackConfig.cmake -B build/installer --verbose
mv build/installer/*.deb build/Release
- name: Upload portable
uses: actions/upload-artifact@v4
with:
name: ${{ github.event.repository.name }}-linux-${{ env.VERSION }}-portable
path: |
build/Release/**/*.so
build/Release/**/q3vr
build/Release/**/*.qvm
build/Release/**/*.pk3
build/Release/**/*.txt
- name: Upload installer
uses: actions/upload-artifact@v4
with:
name: ${{ github.event.repository.name }}-linux-${{ env.VERSION }}-installer
path: |
build/Release/**/q3vr-*-installer.deb
windows-msvc:
name: Windows MSVC
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
- name: Compile
run: |
cmake -S . -B build -G "Visual Studio 17 2022"
cmake --build build --config Release
$version = Get-Content build/version.txt -Raw
Add-Content -Path $env:GITHUB_ENV -Value "VERSION=$version"
dir .
dir build
dir build\Release
dir build\Release\baseq3
Get-ChildItem -Path . -Filter *.exe -Recurse -File
cpack --config build/CPackConfig.cmake -B build/installer --verbose
Move-Item -Path "build/installer/*.exe" -Destination "build/Release"
- name: Upload portable
uses: actions/upload-artifact@v4
with:
name: ${{ github.event.repository.name }}-windows-msvc-${{ env.VERSION }}-portable
path: |
build/Release/**/*.dll
build/Release/**/q3vr.exe
build/Release/**/*.qvm
build/Release/**/*.pk3
build/Release/**/*.txt
- name: Upload installer
uses: actions/upload-artifact@v4
with:
name: ${{ github.event.repository.name }}-windows-msvc-${{ env.VERSION }}-installer
path: |
build/Release/**/q3vr-*-installer.exe
windows-mingw:
name: Windows MinGW
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
- name: Compile
run: |
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
cmake --build build
$version = Get-Content build/version.txt -Raw
Add-Content -Path $env:GITHUB_ENV -Value "VERSION=$version"
cpack --config build/CPackConfig.cmake -B build/installer --verbose
Move-Item -Path "build/installer/*.exe" -Destination "build/Release"
- name: Upload
uses: actions/upload-artifact@v4
with:
name: ${{ github.event.repository.name }}-windows-mingw-${{ env.VERSION }}-portable
path: |
build/Release/**/*.dll
build/Release/**/q3vr.exe
build/Release/**/*.qvm
build/Release/**/*.pk3
build/Release/**/*.txt
- name: Upload installer
uses: actions/upload-artifact@v4
with:
name: ${{ github.event.repository.name }}-windows-mingw-${{ env.VERSION }}-installer
path: |
build/Release/**/q3vr-*-installer.exe