-
Notifications
You must be signed in to change notification settings - Fork 548
142 lines (132 loc) · 5.11 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
138
139
140
141
142
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 2022",
os: windows-2022,
extra_options: "-A x64 -DCMAKE_TOOLCHAIN_FILE=build/vcpkg/scripts/buildsystems/vcpkg.cmake",
build_type: "Release"
}
- {
name: "Visual Studio 2019",
os: windows-2019,
extra_options: "-A x64 -DCMAKE_TOOLCHAIN_FILE=build/vcpkg/scripts/buildsystems/vcpkg.cmake",
build_type: "Release"
}
- {
name: "Visual Studio 2019",
os: windows-2019,
extra_options: "-A x64 -DCMAKE_TOOLCHAIN_FILE=build/vcpkg/scripts/buildsystems/vcpkg.cmake",
build_type: "Debug"
}
- {
name: "macOS",
os: macos-12,
deps_cmdline: "brew install libvpx webp",
build_type: "Release"
}
- {
name: "macOS",
os: macos-12,
extra_options: "-G Xcode -DDYN_OPENAL=OFF",
deps_cmdline: "brew install libvpx fluidsynth mpg123 libsndfile webp",
build_type: "Debug"
}
- {
name: "Linux GCC 7",
os: ubuntu-20.04,
extra_options: "-DCMAKE_C_COMPILER=gcc-7 -DCMAKE_CXX_COMPILER=g++-7",
deps_cmdline: "sudo apt update && sudo apt install g++-7 libsdl2-dev libvpx-dev libgtk2.0-dev libwebp-dev",
build_type: "RelWithDebInfo"
}
- {
name: "Linux GCC 11",
os: ubuntu-20.04,
extra_options: "-DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11",
deps_cmdline: "sudo apt update && sudo apt install g++-11 libsdl2-dev libvpx-dev libgtk-3-dev libwebp-dev",
build_type: "MinSizeRel"
}
- {
name: "Linux Clang 10",
os: ubuntu-20.04,
extra_options: "-DCMAKE_C_COMPILER=clang-10 -DCMAKE_CXX_COMPILER=clang++-10 -DDYN_OPENAL=OFF",
deps_cmdline: "sudo apt update && sudo apt install clang-9 libsdl2-dev libvpx-dev libopenal-dev libfluidsynth-dev libmpg123-dev libsndfile1-dev libwebp-dev",
build_type: "Debug"
}
- {
name: "Linux Clang 12",
os: ubuntu-20.04,
extra_options: "-DCMAKE_C_COMPILER=clang-12 -DCMAKE_CXX_COMPILER=clang++-12",
deps_cmdline: "sudo apt update && sudo apt install clang-12 libsdl2-dev libvpx-dev libwebp-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
mkdir build
if [[ "${{ runner.os }}" == 'macOS' ]]; then
export ZMUSIC_PACKAGE=zmusic-1.1.9-macos.tar.xz
elif [[ "${{ runner.os }}" == 'Linux' ]]; then
export ZMUSIC_PACKAGE=zmusic-1.1.9-linux.tar.xz
fi
if [[ ! -z "${ZMUSIC_PACKAGE}" ]]; then
cd build
wget -q "https://github.com/coelckers/gzdoom/releases/download/ci_deps/${ZMUSIC_PACKAGE}"
tar -xf "${ZMUSIC_PACKAGE}"
fi
- name: Setup vcpkg
uses: lukka/run-vcpkg@v11
if: runner.os == 'Windows'
with:
vcpkgDirectory: '${{ github.workspace }}/build/vcpkg'
vcpkgGitCommitId: '65c013b9667ff1f58fb8724209227e5a2e761043'
- name: Configure
shell: bash
run: |
if [[ "${{ runner.os }}" == 'Windows' ]]; then
# Remove Strawberry Perl from PATH environment variable to avoid usage of libraries it provides
export PATH=`echo $PATH | tr ":" "\n" | grep -v "Strawberry" | tr "\n" ":"`
fi
cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} -DCMAKE_PREFIX_PATH=`pwd`/build/zmusic -DPK3_QUIET_ZIPDIR=ON ${{ 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