- updated continuous integration workflow

* bump GCC targets to 9 and 12
* bump Clang targets to 11 and 15
* use Ubuntu 22.04 images
* use actual versions of checkout and upload-artifact actions
* remove lots of needless formatting, double quotes in particular
* remove unused dependencies
* remove obsolete Strawberry Perl workaround
This commit is contained in:
alexey.lysiuk 2023-09-20 10:26:06 +03:00
parent 0b3e9b1025
commit e3e5071475

View file

@ -10,73 +10,63 @@ jobs:
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"
}
- name: Visual Studio 2022
os: windows-2022
extra_options: -DCMAKE_TOOLCHAIN_FILE=build/vcpkg/scripts/buildsystems/vcpkg.cmake
build_type: Release
- name: Visual Studio 2022
os: windows-2022
extra_options: -DCMAKE_TOOLCHAIN_FILE=build/vcpkg/scripts/buildsystems/vcpkg.cmake
build_type: Debug
- name: Visual Studio 2019
os: windows-2019
extra_options: -DCMAKE_TOOLCHAIN_FILE=build/vcpkg/scripts/buildsystems/vcpkg.cmake
build_type: Release
- 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 webp
build_type: Debug
- name: Linux GCC 9
os: ubuntu-22.04
extra_options: -DCMAKE_C_COMPILER=gcc-9 -DCMAKE_CXX_COMPILER=g++-9
deps_cmdline: sudo apt update && sudo apt install libsdl2-dev libvpx-dev libgtk2.0-dev libwebp-dev
build_type: RelWithDebInfo
- name: Linux GCC 12
os: ubuntu-22.04
extra_options: -DCMAKE_C_COMPILER=gcc-12 -DCMAKE_CXX_COMPILER=g++-12
deps_cmdline: sudo apt update && sudo apt install libsdl2-dev libvpx-dev libgtk-3-dev libwebp-dev
build_type: MinSizeRel
- name: Linux Clang 11
os: ubuntu-22.04
extra_options: -DCMAKE_C_COMPILER=clang-11 -DCMAKE_CXX_COMPILER=clang++-11 -DDYN_OPENAL=OFF
deps_cmdline: sudo apt update && sudo apt install clang-11 libsdl2-dev libvpx-dev libopenal-dev libwebp-dev
build_type: Debug
- name: Linux Clang 15
os: ubuntu-22.04
extra_options: -DCMAKE_C_COMPILER=clang-15 -DCMAKE_CXX_COMPILER=clang++-15
deps_cmdline: sudo apt update && sudo apt install clang-15 libsdl2-dev libvpx-dev libwebp-dev
build_type: Release
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: Install Dependencies
shell: bash
run: |
if [[ ! -z "${{ matrix.config.deps_cmdline }}" ]]; then
if [[ -n "${{ matrix.config.deps_cmdline }}" ]]; then
eval ${{ matrix.config.deps_cmdline }}
fi
mkdir build
@ -85,7 +75,7 @@ jobs:
elif [[ "${{ runner.os }}" == 'Linux' ]]; then
export ZMUSIC_PACKAGE=zmusic-1.1.9-linux.tar.xz
fi
if [[ ! -z "${ZMUSIC_PACKAGE}" ]]; then
if [[ -n "${ZMUSIC_PACKAGE}" ]]; then
cd build
wget -q "https://github.com/coelckers/gzdoom/releases/download/ci_deps/${ZMUSIC_PACKAGE}"
tar -xf "${ZMUSIC_PACKAGE}"
@ -101,10 +91,6 @@ jobs:
- 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
@ -129,7 +115,7 @@ jobs:
- name: Upload Package
if: runner.os == 'Windows' # Remove to store packages of all targets
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v3
with:
path: build/package
name: ${{ matrix.config.name }} ${{ matrix.config.build_type }}