-
Notifications
You must be signed in to change notification settings - Fork 79
130 lines (119 loc) · 3.69 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: Build
on:
push:
branches: [master]
pull_request: {}
merge_group: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- name: Windows MSYS2 x86_64 GCC
os: windows-latest
shell: 'msys2 {0}'
sys: mingw64
env: x86_64
make: make
opt: SDLCONFIG=
publish-as: win64
- name: Windows MSYS2 i686 GCC
os: windows-latest
shell: 'msys2 {0}'
sys: mingw32
env: i686
make: make
opt: SDLCONFIG=
pkg: nasm
publish-as: win32
- name: Windows MSYS2 x86_64 GCC without SDL
os: windows-latest
shell: 'msys2 {0}'
sys: mingw64
env: x86_64
make: make
opt: RENDERTYPE=WIN
- name: Linux GCC
os: ubuntu-latest
shell: bash
pkg: libsdl2-dev
make: make
- name: Linux GCC SDL 1.2
os: ubuntu-latest
shell: bash
pkg: libsdl1.2-dev
opt: SDL_TARGET=1
make: make
- name: Linux Clang
os: ubuntu-latest
shell: bash
pkg: libsdl2-dev clang
opt: CLANG=1
make: make
- name: Linux Clang without GL
os: ubuntu-latest
shell: bash
pkg: libsdl2-dev clang
opt: CLANG=1 USE_OPENGL=0
make: make
- name: Linux Clang without Polymer
os: ubuntu-latest
shell: bash
pkg: libsdl2-dev clang
opt: CLANG=1 POLYMER=0
make: make
- name: macOS Clang
os: macos-latest
shell: sh
make: gmake
name: ${{matrix.name}}
runs-on: ${{matrix.os}}
defaults:
run:
shell: ${{matrix.shell}}
steps:
- uses: actions/checkout@v3
- name: install-prerequisites-windows-msys2
if: matrix.shell == 'msys2 {0}'
uses: msys2/setup-msys2@v2
with:
msystem: ${{matrix.sys}}
update: true
cache: true
install: git mingw-w64-${{matrix.env}}-toolchain make ${{matrix.pkg}}
- name: install-prerequisites-linux
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get -y install libflac-dev libvpx-dev libgtk2.0-dev ${{matrix.pkg}}
- name: install-prerequisites-macos
if: runner.os == 'macOS'
run: |
brew install sdl2 flac libvpx make ${{matrix.pkg}}
brew unlink lz4
- name: fetch full history
if: github.ref == 'refs/heads/master' && matrix.publish-as != ''
run: git fetch --unshallow
- name: build
run: |
${{matrix.make}} -j2 blood rr exhumed ${{matrix.opt}}
${{matrix.make}} -j2 duke3d sw kenbuild tools ${{matrix.opt}}
- name: prepare artifacts
if: github.ref == 'refs/heads/master' && matrix.publish-as != ''
run: |
mkdir -p upload/nblood/
mkdir -p upload/rednukem/
mkdir -p upload/pcexhumed/
cp nblood.exe upload/nblood/
cp rednukem.exe upload/rednukem/
cp pcexhumed.exe upload/pcexhumed/
- uses: actions/upload-artifact@v2
if: github.ref == 'refs/heads/master' && matrix.publish-as != ''
with:
name: ${{matrix.publish-as}}
path: upload/
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`