forked from coelckers/prboom-plus
-
Notifications
You must be signed in to change notification settings - Fork 1
117 lines (108 loc) · 3.44 KB
/
continuous_integration.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
name: Continuous Integration
on:
push:
branches-ignore:
- build_windows_dependencies
pull_request:
branches-ignore:
- build_windows_dependencies
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "Visual Studio 64-bit",
os: windows-2019,
build_type: "Release",
extra_options: "-A x64",
package_name: "vs_x64"
}
- {
name: "Visual Studio 32-bit",
os: windows-2019,
build_type: "Release",
extra_options: "-A Win32",
package_name: "vs_win32"
}
- {
name: "Linux GCC",
os: ubuntu-20.04,
build_type: "Release",
extra_options: "",
package_name: "linux_gcc"
}
- {
name: "Linux Clang",
os: ubuntu-20.04,
build_type: "Release",
extra_options: "-DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++",
package_name: "linux_clang"
}
- {
name: "macOS Clang",
os: macos-11,
build_type: "Release",
extra_options: "",
package_name: "macos"
}
steps:
- uses: actions/checkout@v1
- name: Install Dependencies
shell: bash
run: |
mkdir build
cd build
if [[ "${{ runner.os }}" == 'Windows' ]]; then
declare -x DEPS_FILENAME=windows_dependencies_v4.zip
curl -LO https://github.com/coelckers/prboom-plus/releases/download/windows_dependencies/${DEPS_FILENAME}
7z x ${DEPS_FILENAME} -o..
elif [[ "${{ runner.os }}" == 'Linux' ]]; then
sudo apt update
sudo apt install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-net-dev \
libpcre3-dev libmad0-dev libfluidsynth-dev libdumb1-dev libvorbis-dev libportmidi-dev \
libasound2-dev
elif [[ "${{ runner.os }}" == 'macOS' ]]; then
brew install sdl2 sdl2_image sdl2_mixer sdl2_net pcre mad fluidsynth dumb portmidi
fi
- name: Configure
shell: bash
run: |
cd build
cmake -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} ${{ matrix.config.extra_options }} ../prboom2
- name: Build
shell: bash
run: |
cd build
if [[ "${{ runner.os }}" == 'Windows' ]]; then
cmake --build . --config ${{ matrix.config.build_type }} -- -maxcpucount -verbosity:minimal
else
cmake --build . -- --jobs=2 --keep-going
fi
- name: Create Package
shell: bash
run: |
cd build
mkdir package
if [[ "${{ runner.os }}" == 'Windows' ]]; then
cp ${{ matrix.config.build_type }}/prboom-plus.exe ${{ matrix.config.build_type }}/prboom-plus-game-server.exe prboom-plus.wad package
elif [[ "${{ runner.os }}" == 'macOS' ]]; then
cp -R Launcher.app package
else
cp prboom-plus prboom-plus-game-server prboom-plus.wad package
fi
cp config.h package
- name: Upload Package
uses: actions/upload-artifact@v4
with:
path: build/package
name: ${{ matrix.config.package_name }}
- name: List Build Directory
if: always()
shell: bash
run: |
git status
ls -lR build