2020-04-11 17:37:12 +00:00
|
|
|
name: Continuous Integration
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2020-04-12 08:51:23 +00:00
|
|
|
name: ${{ matrix.config.name }} | ${{ matrix.config.build_type }}
|
2020-04-11 17:37:12 +00:00
|
|
|
runs-on: ${{ matrix.config.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
config:
|
|
|
|
- {
|
2022-01-15 15:01:19 +00:00
|
|
|
name: "Visual Studio 2022",
|
|
|
|
os: windows-2022,
|
|
|
|
extra_options: "-A x64",
|
|
|
|
build_type: "Release"
|
|
|
|
}
|
|
|
|
- {
|
|
|
|
name: "Visual Studio 2019",
|
2021-02-02 11:05:23 +00:00
|
|
|
os: windows-2019,
|
2020-04-11 17:37:12 +00:00
|
|
|
extra_options: "-A x64",
|
|
|
|
build_type: "Release"
|
|
|
|
}
|
2020-04-12 08:51:23 +00:00
|
|
|
- {
|
2022-01-15 15:01:19 +00:00
|
|
|
name: "Visual Studio 2019",
|
2021-02-02 11:05:23 +00:00
|
|
|
os: windows-2019,
|
2020-04-12 08:51:23 +00:00
|
|
|
extra_options: "-A x64",
|
|
|
|
build_type: "Debug"
|
|
|
|
}
|
2020-04-11 17:37:12 +00:00
|
|
|
- {
|
|
|
|
name: "macOS",
|
2021-08-25 07:04:44 +00:00
|
|
|
os: macos-11,
|
2021-05-22 14:09:59 +00:00
|
|
|
deps_cmdline: "brew install libvpx",
|
2020-04-11 17:37:12 +00:00
|
|
|
build_type: "Release"
|
|
|
|
}
|
|
|
|
- {
|
|
|
|
name: "macOS",
|
2021-08-25 07:04:44 +00:00
|
|
|
os: macos-11,
|
2021-04-01 08:44:55 +00:00
|
|
|
extra_options: "-DDYN_FLUIDSYNTH=OFF -DDYN_OPENAL=OFF -DDYN_SNDFILE=OFF -DDYN_MPG123=OFF",
|
2021-05-22 14:09:59 +00:00
|
|
|
deps_cmdline: "brew install libvpx fluidsynth mpg123 libsndfile",
|
2020-04-11 17:37:12 +00:00
|
|
|
build_type: "Debug"
|
|
|
|
}
|
|
|
|
- {
|
|
|
|
name: "Linux GCC 7",
|
2021-02-02 11:05:23 +00:00
|
|
|
os: ubuntu-20.04,
|
2021-04-01 08:44:55 +00:00
|
|
|
extra_options: "-DCMAKE_C_COMPILER=gcc-7 -DCMAKE_CXX_COMPILER=g++-7",
|
2021-05-22 14:09:59 +00:00
|
|
|
deps_cmdline: "sudo apt update && sudo apt install g++-7 libsdl2-dev libvpx-dev libgtk2.0-dev",
|
2020-04-11 17:37:12 +00:00
|
|
|
build_type: "RelWithDebInfo"
|
|
|
|
}
|
|
|
|
- {
|
2021-05-15 07:54:11 +00:00
|
|
|
name: "Linux GCC 11",
|
2021-02-02 11:05:23 +00:00
|
|
|
os: ubuntu-20.04,
|
2021-05-15 07:54:11 +00:00
|
|
|
extra_options: "-DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11",
|
2021-05-22 14:09:59 +00:00
|
|
|
deps_cmdline: "sudo apt update && sudo apt install g++-11 libsdl2-dev libvpx-dev libgtk-3-dev",
|
2021-04-01 08:44:55 +00:00
|
|
|
build_type: "MinSizeRel"
|
2020-04-11 17:37:12 +00:00
|
|
|
}
|
2021-05-15 07:54:11 +00:00
|
|
|
- {
|
|
|
|
name: "Linux Clang 6",
|
|
|
|
os: ubuntu-20.04,
|
|
|
|
extra_options: "-DCMAKE_C_COMPILER=clang-6.0 -DCMAKE_CXX_COMPILER=clang++-6.0 \
|
|
|
|
-DDYN_FLUIDSYNTH=OFF -DDYN_OPENAL=OFF -DDYN_SNDFILE=OFF -DDYN_MPG123=OFF",
|
2021-05-22 14:09:59 +00:00
|
|
|
deps_cmdline: "sudo apt update && sudo apt install clang-6.0 libsdl2-dev libvpx-dev libopenal-dev libfluidsynth-dev libmpg123-dev libsndfile1-dev",
|
2021-05-15 07:54:11 +00:00
|
|
|
build_type: "Debug"
|
|
|
|
}
|
2020-04-11 17:37:12 +00:00
|
|
|
- {
|
2021-08-25 07:04:44 +00:00
|
|
|
name: "Linux Clang 12",
|
2021-02-02 11:05:23 +00:00
|
|
|
os: ubuntu-20.04,
|
2021-08-25 07:04:44 +00:00
|
|
|
extra_options: "-DCMAKE_C_COMPILER=clang-12 -DCMAKE_CXX_COMPILER=clang++-12",
|
2022-04-26 16:06:03 +00:00
|
|
|
deps_cmdline: "sudo apt update && sudo apt install clang-12 libsdl2-dev libvpx-dev",
|
2020-04-11 17:37:12 +00:00
|
|
|
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
|
2021-05-22 10:08:55 +00:00
|
|
|
if [[ "${{ runner.os }}" == 'macOS' ]]; then
|
|
|
|
export ZMUSIC_PACKAGE=zmusic-1.1.7-macos.tar.bz2
|
|
|
|
elif [[ "${{ runner.os }}" == 'Linux' ]]; then
|
|
|
|
export ZMUSIC_PACKAGE=zmusic-1.1.7-linux.tar.bz2
|
|
|
|
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
|
2020-04-11 17:37:12 +00:00
|
|
|
|
|
|
|
- name: Configure
|
|
|
|
shell: bash
|
|
|
|
run: |
|
2021-05-22 10:10:41 +00:00
|
|
|
cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} -DCMAKE_PREFIX_PATH=`pwd`/build/zmusic -DPK3_QUIET_ZIPDIR=ON ${{ matrix.config.extra_options }} .
|
2020-04-11 17:37:12 +00:00
|
|
|
|
|
|
|
- name: Build
|
|
|
|
shell: bash
|
|
|
|
run: |
|
2020-04-12 08:51:23 +00:00
|
|
|
export MAKEFLAGS=--keep-going
|
2020-04-11 17:37:12 +00:00
|
|
|
cmake --build build --config ${{ matrix.config.build_type }} --parallel 3
|
|
|
|
|
|
|
|
- name: Create Package
|
2020-04-12 08:51:23 +00:00
|
|
|
if: runner.os == 'Windows' # Remove to make packages of all targets
|
2020-04-11 17:37:12 +00:00
|
|
|
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
|
2020-04-12 08:51:23 +00:00
|
|
|
if: runner.os == 'Windows' # Remove to store packages of all targets
|
2020-04-11 17:37:12 +00:00
|
|
|
uses: actions/upload-artifact@v1
|
|
|
|
with:
|
|
|
|
path: build/package
|
2020-04-12 08:51:23 +00:00
|
|
|
name: ${{ matrix.config.name }} ${{ matrix.config.build_type }}
|
2020-04-11 17:37:12 +00:00
|
|
|
|
|
|
|
- name: List Build Directory
|
|
|
|
if: always()
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
git status
|
|
|
|
ls -lR build
|