forked from ZDoom/gzdoom
-
-
Notifications
You must be signed in to change notification settings - Fork 18
137 lines (128 loc) · 4.86 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
name: Continuous Integration
on: [push, pull_request]
jobs:
build:
name: ${{ matrix.config.name }} | ${{ matrix.config.build_type }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "Visual Studio 64-bit",
os: windows-latest,
extra_options: "-A x64",
build_type: "Release"
}
- {
name: "Visual Studio 64-bit",
os: windows-latest,
extra_options: "-A x64",
build_type: "Debug"
}
- {
name: "Visual Studio 32-bit",
os: windows-latest,
extra_options: "-A Win32",
build_type: "Release"
}
- {
name: "macOS",
os: macos-latest,
extra_options: "-DDYN_FLUIDSYNTH=OFF -DDYN_OPENAL=OFF -DDYN_SNDFILE=OFF -DDYN_MPG123=OFF",
deps_cmdline: "brew install fluidsynth mpg123 libsndfile",
build_type: "Release"
}
- {
name: "macOS",
os: macos-latest,
build_type: "Debug"
}
- {
name: "Linux GCC 5",
os: ubuntu-latest,
extra_options: "-DCMAKE_C_COMPILER=/usr/bin/gcc-5 -DCMAKE_CXX_COMPILER=/usr/bin/g++-5 \
-DDYN_FLUIDSYNTH=OFF -DDYN_OPENAL=OFF -DDYN_SNDFILE=OFF -DDYN_MPG123=OFF",
deps_cmdline: "sudo apt update && sudo apt install g++-5 libsdl2-dev libopenal-dev libfluidsynth-dev libmpg123-dev libsndfile1-dev",
build_type: "MinSizeRel"
}
- {
name: "Linux GCC 7",
os: ubuntu-latest,
extra_options: "-DCMAKE_C_COMPILER=/usr/bin/gcc-7 -DCMAKE_CXX_COMPILER=/usr/bin/g++-7",
deps_cmdline: "sudo apt update && sudo apt install libsdl2-dev libgtk2.0-dev",
build_type: "RelWithDebInfo"
}
- {
name: "Linux GCC 9",
os: ubuntu-latest,
extra_options: "-DCMAKE_C_COMPILER=/usr/bin/gcc-9 -DCMAKE_CXX_COMPILER=/usr/bin/g++-9",
deps_cmdline: "sudo apt update && sudo apt install libsdl2-dev libgtk-3-dev",
build_type: "Debug"
}
- {
name: "Linux Clang 6",
os: ubuntu-latest,
extra_options: "-DCMAKE_C_COMPILER=/usr/bin/clang-6.0 -DCMAKE_CXX_COMPILER=/usr/bin/clang++-6.0",
deps_cmdline: "sudo apt update && sudo apt install libsdl2-dev",
build_type: "Debug"
}
- {
name: "Linux Clang 9",
os: ubuntu-latest,
extra_options: "-DCMAKE_C_COMPILER=/usr/bin/clang-9 -DCMAKE_CXX_COMPILER=/usr/bin/clang++-9 \
-DDYN_FLUIDSYNTH=OFF -DDYN_OPENAL=OFF -DDYN_SNDFILE=OFF -DDYN_MPG123=OFF",
deps_cmdline: "sudo apt update && sudo apt install libsdl2-dev libopenal-dev libfluidsynth-dev libmpg123-dev libsndfile1-dev",
build_type: "Release"
}
steps:
- uses: actions/checkout@v1
- name: Install Dependencies
shell: bash
run: |
if [[ ! -z "${{ matrix.config.deps_cmdline }}" ]]; then
eval ${{ matrix.config.deps_cmdline }}
fi
# Build and install ZMusic
mkdir build
cd build
git clone https://github.com/coelckers/ZMusic.git
cd ZMusic
git checkout 1.1.0
cd ..
cmake -B zmusic_build -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} -DCMAKE_INSTALL_PREFIX=`pwd`/zmusic_install ${{ matrix.config.extra_options }} ZMusic
cmake --build zmusic_build --target install --parallel 3
- name: Configure
shell: bash
run: |
cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} -DCMAKE_PREFIX_PATH=`pwd`/build/zmusic_install ${{ matrix.config.extra_options }} .
- name: Build
shell: bash
run: |
export MAKEFLAGS=--keep-going
cmake --build build --config ${{ matrix.config.build_type }} --parallel 3
- name: Create Package
if: runner.os == 'Windows' # Remove to make packages of all targets
shell: bash
run: |
cd build
mkdir package
if [[ "${{ runner.os }}" == 'Windows' ]]; then
cp ${{ matrix.config.build_type }}/gzdoom.exe ${{ matrix.config.build_type }}/*.pk3 package
elif [[ "${{ runner.os }}" == 'macOS' ]]; then
cp -r gzdoom.app package
elif [[ "${{ runner.os }}" == 'Linux' ]]; then
cp gzdoom *.pk3 package
fi
- name: Upload Package
if: runner.os == 'Windows' # Remove to store packages of all targets
uses: actions/upload-artifact@v1
with:
path: build/package
name: ${{ matrix.config.name }} ${{ matrix.config.build_type }}
- name: List Build Directory
if: always()
shell: bash
run: |
git status
ls -lR build