- extended continuous integration targets

This commit is contained in:
alexey.lysiuk 2020-11-12 15:22:36 +02:00
parent 735d89bfb6
commit 50beb113ff

View file

@ -2,12 +2,9 @@ name: Continuous Integration
on: [push, pull_request] on: [push, pull_request]
env:
BUILD_TYPE: Release
jobs: jobs:
build: build:
name: ${{ matrix.config.name }} name: ${{ matrix.config.name }} | ${{ matrix.config.build_type }}
runs-on: ${{ matrix.config.os }} runs-on: ${{ matrix.config.os }}
strategy: strategy:
fail-fast: false fail-fast: false
@ -16,25 +13,56 @@ jobs:
- { - {
name: "Visual Studio 64-bit", name: "Visual Studio 64-bit",
os: windows-latest, os: windows-latest,
extra_options: "-A x64" extra_options: "-A x64",
build_type: "Release"
}
- {
name: "Visual Studio 64-bit",
os: windows-latest,
extra_options: "-A x64",
build_type: "Debug"
} }
- { - {
name: "macOS", name: "macOS",
os: macos-latest, os: macos-latest,
extra_options: "-DDYN_FLUIDSYNTH=OFF -DDYN_OPENAL=OFF -DDYN_SNDFILE=OFF -DDYN_MPG123=OFF", extra_options: "-DDYN_FLUIDSYNTH=OFF -DDYN_OPENAL=OFF -DDYN_SNDFILE=OFF -DDYN_MPG123=OFF",
deps_cmdline: "brew install libvpx fluidsynth mpg123 libsndfile" deps_cmdline: "brew install libvpx",
build_type: "Release"
} }
- { - {
name: "Linux GCC", name: "macOS",
os: ubuntu-latest, os: macos-latest,
deps_cmdline: "sudo apt update && sudo apt install libsdl2-dev libgtk2.0-dev libvpx-dev" deps_cmdline: "brew install libvpx fluidsynth mpg123 libsndfile",
build_type: "Debug"
} }
- { - {
name: "Linux Clang", name: "Linux GCC 7",
os: ubuntu-latest, os: ubuntu-latest,
extra_options: "-DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ \ 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 libvpx-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 libvpx-dev libgtk-3-dev",
build_type: "MinSizeRel"
}
- {
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 \
-DDYN_FLUIDSYNTH=OFF -DDYN_OPENAL=OFF -DDYN_SNDFILE=OFF -DDYN_MPG123=OFF", -DDYN_FLUIDSYNTH=OFF -DDYN_OPENAL=OFF -DDYN_SNDFILE=OFF -DDYN_MPG123=OFF",
deps_cmdline: "sudo apt update && sudo apt install libsdl2-dev libvpx-dev libopenal-dev libfluidsynth-dev libmpg123-dev libsndfile1-dev libgtk-3-dev" deps_cmdline: "sudo apt update && sudo apt install libsdl2-dev libvpx-dev libopenal-dev libfluidsynth-dev libmpg123-dev libsndfile1-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",
deps_cmdline: "sudo apt update && sudo apt install libsdl2-dev libvpx-dev",
build_type: "Release"
} }
steps: steps:
@ -51,40 +79,42 @@ jobs:
cd build cd build
git clone https://github.com/coelckers/ZMusic.git git clone https://github.com/coelckers/ZMusic.git
cd ZMusic cd ZMusic
git checkout 1.1.0 git checkout 1.1.4
cd .. cd ..
cmake -B zmusic_build -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=`pwd`/zmusic_install ${{ matrix.config.extra_options }} ZMusic 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 cmake --build zmusic_build --target install --parallel 3
- name: Configure - name: Configure
shell: bash shell: bash
run: | run: |
cmake -B build -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_PREFIX_PATH=`pwd`/build/zmusic_install ${{ matrix.config.extra_options }} . cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} -DCMAKE_PREFIX_PATH=`pwd`/build/zmusic_install ${{ matrix.config.extra_options }} .
- name: Build - name: Build
shell: bash shell: bash
run: | run: |
export MAKEFLAGS=--keep-going export MAKEFLAGS=--keep-going
cmake --build build --config ${BUILD_TYPE} --parallel 3 cmake --build build --config ${{ matrix.config.build_type }} --parallel 3
- name: Create Package - name: Create Package
if: runner.os == 'Windows' # Remove to make packages of all targets
shell: bash shell: bash
run: | run: |
cd build cd build
mkdir package mkdir package
if [[ "${{ runner.os }}" == 'Windows' ]]; then if [[ "${{ runner.os }}" == 'Windows' ]]; then
cp ${BUILD_TYPE}/raze.exe ${BUILD_TYPE}/raze.pk3 package cp ${{ matrix.config.build_type }}/raze.exe ${{ matrix.config.build_type }}/*.pk3 package
elif [[ "${{ runner.os }}" == 'macOS' ]]; then elif [[ "${{ runner.os }}" == 'macOS' ]]; then
cp -r raze.app package cp -r raze.app package
elif [[ "${{ runner.os }}" == 'Linux' ]]; then elif [[ "${{ runner.os }}" == 'Linux' ]]; then
cp raze raze.pk3 package cp raze *.pk3 package
fi fi
- name: Upload Package - name: Upload Package
if: runner.os == 'Windows' # Remove to store packages of all targets
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
path: build/package path: build/package
name: ${{ matrix.config.name }} name: ${{ matrix.config.name }} ${{ matrix.config.build_type }}
- name: List Build Directory - name: List Build Directory
if: always() if: always()