2020-02-04 10:33:59 +00:00
|
|
|
name: Continuous Integration
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2020-11-12 13:22:36 +00:00
|
|
|
name: ${{ matrix.config.name }} | ${{ matrix.config.build_type }}
|
2020-02-04 10:33:59 +00:00
|
|
|
runs-on: ${{ matrix.config.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
config:
|
|
|
|
- {
|
|
|
|
name: "Visual Studio 64-bit",
|
2021-02-03 08:05:19 +00:00
|
|
|
os: windows-2019,
|
2020-11-12 13:22:36 +00:00
|
|
|
extra_options: "-A x64",
|
|
|
|
build_type: "Release"
|
|
|
|
}
|
|
|
|
- {
|
|
|
|
name: "Visual Studio 64-bit",
|
2021-02-03 08:05:19 +00:00
|
|
|
os: windows-2019,
|
2020-11-12 13:22:36 +00:00
|
|
|
extra_options: "-A x64",
|
|
|
|
build_type: "Debug"
|
2020-02-04 10:33:59 +00:00
|
|
|
}
|
|
|
|
- {
|
|
|
|
name: "macOS",
|
2021-02-03 08:05:19 +00:00
|
|
|
os: macos-10.15,
|
2020-11-12 13:22:36 +00:00
|
|
|
deps_cmdline: "brew install libvpx",
|
|
|
|
build_type: "Release"
|
2020-02-04 10:33:59 +00:00
|
|
|
}
|
|
|
|
- {
|
2020-11-12 13:22:36 +00:00
|
|
|
name: "macOS",
|
2021-02-03 08:05:19 +00:00
|
|
|
os: macos-10.15,
|
2021-04-01 09:01:45 +00:00
|
|
|
extra_options: "-DDYN_FLUIDSYNTH=OFF -DDYN_OPENAL=OFF -DDYN_SNDFILE=OFF -DDYN_MPG123=OFF",
|
2020-11-12 13:22:36 +00:00
|
|
|
deps_cmdline: "brew install libvpx fluidsynth mpg123 libsndfile",
|
|
|
|
build_type: "Debug"
|
|
|
|
}
|
|
|
|
- {
|
|
|
|
name: "Linux GCC 7",
|
2021-02-03 08:05:19 +00:00
|
|
|
os: ubuntu-20.04,
|
2021-04-01 07:37:18 +00:00
|
|
|
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",
|
2020-11-12 13:22:36 +00:00
|
|
|
build_type: "RelWithDebInfo"
|
|
|
|
}
|
|
|
|
- {
|
2021-02-03 08:05:19 +00:00
|
|
|
name: "Linux GCC 10",
|
|
|
|
os: ubuntu-20.04,
|
2021-04-01 07:37:18 +00:00
|
|
|
extra_options: "-DCMAKE_C_COMPILER=gcc-10 -DCMAKE_CXX_COMPILER=g++-10",
|
|
|
|
deps_cmdline: "sudo apt update && sudo apt install g++-10 libsdl2-dev libvpx-dev libgtk-3-dev",
|
2020-11-12 13:22:36 +00:00
|
|
|
build_type: "MinSizeRel"
|
2020-02-04 10:33:59 +00:00
|
|
|
}
|
|
|
|
- {
|
2020-11-12 13:22:36 +00:00
|
|
|
name: "Linux Clang 6",
|
2021-02-03 08:05:19 +00:00
|
|
|
os: ubuntu-20.04,
|
2021-04-01 07:37:18 +00:00
|
|
|
extra_options: "-DCMAKE_C_COMPILER=clang-6.0 -DCMAKE_CXX_COMPILER=clang++-6.0 \
|
2020-02-04 10:33:59 +00:00
|
|
|
-DDYN_FLUIDSYNTH=OFF -DDYN_OPENAL=OFF -DDYN_SNDFILE=OFF -DDYN_MPG123=OFF",
|
2021-02-03 08:05:19 +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",
|
2020-11-12 13:22:36 +00:00
|
|
|
build_type: "Debug"
|
|
|
|
}
|
|
|
|
- {
|
2021-04-01 07:37:18 +00:00
|
|
|
name: "Linux Clang 11",
|
2021-02-03 08:05:19 +00:00
|
|
|
os: ubuntu-20.04,
|
2021-04-01 07:37:18 +00:00
|
|
|
extra_options: "-DCMAKE_C_COMPILER=clang-11 -DCMAKE_CXX_COMPILER=clang++-11",
|
|
|
|
deps_cmdline: "sudo apt update && sudo apt install clang-11 libsdl2-dev libvpx-dev",
|
2020-11-12 13:22:36 +00:00
|
|
|
build_type: "Release"
|
2020-02-04 10:33:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
|
|
|
|
- name: Install Dependencies
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
if [[ ! -z "${{ matrix.config.deps_cmdline }}" ]]; then
|
|
|
|
eval ${{ matrix.config.deps_cmdline }}
|
|
|
|
fi
|
2020-02-09 14:49:28 +00:00
|
|
|
# Build and install ZMusic
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
git clone https://github.com/coelckers/ZMusic.git
|
|
|
|
cd ZMusic
|
2021-04-01 07:37:18 +00:00
|
|
|
git checkout 1.1.6
|
2020-02-09 14:49:28 +00:00
|
|
|
cd ..
|
2020-11-12 13:22:36 +00:00
|
|
|
cmake -B zmusic_build -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} -DCMAKE_INSTALL_PREFIX=`pwd`/zmusic_install ${{ matrix.config.extra_options }} ZMusic
|
2020-02-09 14:49:28 +00:00
|
|
|
cmake --build zmusic_build --target install --parallel 3
|
2020-02-04 10:33:59 +00:00
|
|
|
|
|
|
|
- name: Configure
|
|
|
|
shell: bash
|
|
|
|
run: |
|
2020-11-12 13:22:36 +00:00
|
|
|
cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} -DCMAKE_PREFIX_PATH=`pwd`/build/zmusic_install ${{ matrix.config.extra_options }} .
|
2020-02-04 10:33:59 +00:00
|
|
|
|
|
|
|
- name: Build
|
|
|
|
shell: bash
|
|
|
|
run: |
|
2020-05-05 06:53:56 +00:00
|
|
|
export MAKEFLAGS=--keep-going
|
2020-11-12 13:22:36 +00:00
|
|
|
cmake --build build --config ${{ matrix.config.build_type }} --parallel 3
|
2020-02-04 10:33:59 +00:00
|
|
|
|
|
|
|
- name: Create Package
|
2020-11-12 13:22:36 +00:00
|
|
|
if: runner.os == 'Windows' # Remove to make packages of all targets
|
2020-02-04 10:33:59 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
cd build
|
|
|
|
mkdir package
|
|
|
|
if [[ "${{ runner.os }}" == 'Windows' ]]; then
|
2020-11-12 13:22:36 +00:00
|
|
|
cp ${{ matrix.config.build_type }}/raze.exe ${{ matrix.config.build_type }}/*.pk3 package
|
2020-02-04 10:33:59 +00:00
|
|
|
elif [[ "${{ runner.os }}" == 'macOS' ]]; then
|
|
|
|
cp -r raze.app package
|
|
|
|
elif [[ "${{ runner.os }}" == 'Linux' ]]; then
|
2020-11-12 13:22:36 +00:00
|
|
|
cp raze *.pk3 package
|
2020-02-04 10:33:59 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
- name: Upload Package
|
2020-11-12 13:22:36 +00:00
|
|
|
if: runner.os == 'Windows' # Remove to store packages of all targets
|
2020-02-04 10:33:59 +00:00
|
|
|
uses: actions/upload-artifact@v1
|
|
|
|
with:
|
|
|
|
path: build/package
|
2020-11-12 13:22:36 +00:00
|
|
|
name: ${{ matrix.config.name }} ${{ matrix.config.build_type }}
|
2020-02-04 10:33:59 +00:00
|
|
|
|
|
|
|
- name: List Build Directory
|
|
|
|
if: always()
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
git status
|
|
|
|
ls -lR build
|