- replaced Travis and AppVeyor with GitHub actions

This commit is contained in:
alexey.lysiuk 2020-04-11 20:37:12 +03:00
parent 0d420a75b7
commit e88c19ec67
3 changed files with 120 additions and 201 deletions

View File

@ -1,38 +0,0 @@
version: "{build}"
branches:
except:
- /^travis.*$/
clone_depth: 10
image:
- Visual Studio 2019
environment:
matrix:
- ARCH: x64
CONFIG: Release
- ARCH: Win32
CONFIG: Release
- ARCH: x64
CONFIG: Debug
build_script:
- md build
- cd build
- cmake -A %ARCH% -DPK3_QUIET_ZIPDIR=YES ..
- cmake --build . --config %CONFIG% -- -maxcpucount -verbosity:minimal
after_build:
- set OUTPUT_DIR=%APPVEYOR_BUILD_FOLDER%\build\%CONFIG%\
- 7z a ..\gzdoom.zip "%OUTPUT_DIR%gzdoom.exe" "%OUTPUT_DIR%*.pk3"
artifacts:
- path: gzdoom.zip
notifications:
- provider: Email
on_build_success: false
on_build_failure: false
on_build_status_changed: false

View File

@ -0,0 +1,120 @@
name: Continuous Integration
on: [push, pull_request]
jobs:
build:
name: ${{ matrix.config.name }}
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 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 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: "RelWithDebInfo"
}
- {
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: |
cmake --build build --config ${{ matrix.config.build_type }} --parallel 3
- name: Create Package
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
uses: actions/upload-artifact@v1
with:
path: build/package
name: ${{ matrix.config.name }}
- name: List Build Directory
if: always()
shell: bash
run: |
git status
ls -lR build

View File

@ -1,163 +0,0 @@
language: cpp
dist: xenial
os: linux
branches:
except:
- /^appveyor.*$/
git:
depth: 10
jobs:
include:
- name: "Xcode 8"
os: osx
osx_image: xcode8
env:
- CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=Debug -DCMAKE_OSX_SYSROOT=macosx10.12"
- name: "Xcode 11.3"
os: osx
osx_image: xcode11.3
env:
- CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=Release"
- name: "Visual Studio 2017 32-bit"
os: windows
env:
- CMAKE_OPTIONS="-A Win32"
- name: "Visual Studio 2017 64-bit"
os: windows
env:
- CMAKE_OPTIONS="-A x64"
- name: "GCC 4.9"
compiler: gcc
env:
- GCC_VERSION=4.9
- CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=-Wno-maybe-uninitialized"
addons:
apt:
packages:
- g++-4.9
- libsdl2-dev
- libgtk2.0-dev
- name: "GCC 6"
compiler: gcc
env:
- GCC_VERSION=6
- CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_FLAGS=-Wno-maybe-uninitialized"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
- libsdl2-dev
- libgtk2.0-dev
- name: "GCC 8"
compiler: gcc
env:
- GCC_VERSION=8
- CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_CXX_FLAGS=-Wno-implicit-fallthrough"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-8
- libsdl2-dev
- libgtk-3-dev
- name: "GCC 9"
compiler: gcc
env:
- GCC_VERSION=9
- CMAKE_OPTIONS="-DCMAKE_CXX_FLAGS=-Wno-implicit-fallthrough"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-9
- libsdl2-dev
- name: "Clang 3.6"
compiler: clang
env:
- CLANG_VERSION=3.6
- CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=RelWithDebInfo"
addons:
apt:
packages:
- clang-3.6
- libsdl2-dev
- libgtk2.0-dev
- name: "Clang 9"
os: linux
compiler: clang
env:
- CLANG_VERSION=9
- CMAKE_OPTIONS="-DDYN_OPENAL=NO -DDYN_SNDFILE=NO -DDYN_MPG123=NO -DDYN_FLUIDSYNTH=NO"
addons:
apt:
sources:
- sourceline: "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main"
key_url: "https://apt.llvm.org/llvm-snapshot.gpg.key"
packages:
- clang-9
- libsdl2-dev
- libgme-dev
- libopenal-dev
- libmpg123-dev
- libsndfile-dev
- libfluidsynth-dev
- libgtk-3-dev
before_install:
- if [ -n "$GCC_VERSION" ]; then export CC="gcc-${GCC_VERSION}" CXX="g++-${GCC_VERSION}"; fi
- if [ -n "$CLANG_VERSION" ]; then export CC="clang-${CLANG_VERSION}" CXX="clang++-${CLANG_VERSION}"; fi
- $CC --version
- $CXX --version
before_script:
- mkdir build
- cd build
- git clone https://github.com/coelckers/ZMusic.git
- cd ZMusic
- git checkout 1.0.0
- cd ..
- mkdir zmusic_build
- cd zmusic_build
- cmake ${CMAKE_OPTIONS} -DCMAKE_INSTALL_PREFIX=`pwd`/../zmusic_install ../ZMusic
- |
if [[ $TRAVIS_OS_NAME == 'windows' ]]; then
cmake --build . --target install --config Release -- -maxcpucount -verbosity:minimal
else
cmake --build . --target install -- --jobs=2 --keep-going
fi
- cd ..
script:
- |
cmake ${CMAKE_OPTIONS} \
-DCMAKE_PREFIX_PATH=`pwd`/zmusic_install \
-DFORCE_INTERNAL_ZLIB=YES \
-DFORCE_INTERNAL_JPEG=YES \
-DFORCE_INTERNAL_BZIP2=YES \
-DPK3_QUIET_ZIPDIR=YES \
..
- |
if [[ $TRAVIS_OS_NAME == 'windows' ]]; then
cmake --build . --config Release -- -maxcpucount -verbosity:minimal
else
cmake --build . -- --jobs=2 --keep-going
fi
notifications:
email: false