MegaGlest/.github/workflows/cmake.yml

172 lines
5.6 KiB
YAML
Raw Normal View History

name: CMake
concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]
jobs:
2021-06-20 03:03:46 +02:00
build-linux:
strategy:
fail-fast: false
2021-06-20 03:03:46 +02:00
matrix:
2021-06-20 17:22:43 +02:00
arch: [x64]
workflows/cmake.yml:add tests for recent gcc versions;migrate to checkoutv3 (#250) * workflows/cmake.yml:test on Ubuntu Jammy (22.04);migrate to checkoutv3 This should also fix #247 * maybe fix ssh link error on Ubuntu Jammy gcc and clang build is failing on Jammy with the message: 'cannot find -lssh: No such file or directory' Basically I added libcurl-openssl-dev to the deps * remove libcurl4-gnutls-dev Trying to correct: The following packages have unmet dependencies: libcurl4-gnutls-dev : Conflicts: libcurl4-openssl-dev but 7.81.0-1ubuntu1.3 is to be installed libcurl4-openssl-dev : Conflicts: libcurl4-gnutls-dev but 7.81.0-1ubuntu1.3 is to be installed E: Unable to correct problems, you have held broken packages. An error occurred while installing build dependencies. * use cmake FindCURL module * for OpenSSL, use include instead of find_package * remove jammy, add gcc-10 and 11 test * revert now-unrelated changes * clean-up * add VERBOSE flag to make * Update .github/workflows/cmake.yml * Update .github/workflows/cmake.yml * use '-f' option from build script to force clang * force dynamic libs with '-d' fixes #251 * mk/linux/setupBuildDeps.sh:fix script so 22.04 is detected *remove vlc deps (not required for the CI) *remove ubuntu-18.04 from the build matrix, see https://github.blog/changelog/2022-08-09-github-actions-the-ubuntu-18-04-actions-runner-image-is-being-deprecated-and-will-be-removed-by-12-1-22/ * revert removal of commented macos jobs * run apt-get update and upgrade * cleanup Prep snapshot section
2022-08-21 00:29:38 +02:00
os: [ubuntu-20.04, ubuntu-22.04]
2021-06-20 03:03:46 +02:00
compiler: [gcc, clang]
runs-on: ${{ matrix.os }}
workflows/cmake.yml:add tests for recent gcc versions;migrate to checkoutv3 (#250) * workflows/cmake.yml:test on Ubuntu Jammy (22.04);migrate to checkoutv3 This should also fix #247 * maybe fix ssh link error on Ubuntu Jammy gcc and clang build is failing on Jammy with the message: 'cannot find -lssh: No such file or directory' Basically I added libcurl-openssl-dev to the deps * remove libcurl4-gnutls-dev Trying to correct: The following packages have unmet dependencies: libcurl4-gnutls-dev : Conflicts: libcurl4-openssl-dev but 7.81.0-1ubuntu1.3 is to be installed libcurl4-openssl-dev : Conflicts: libcurl4-gnutls-dev but 7.81.0-1ubuntu1.3 is to be installed E: Unable to correct problems, you have held broken packages. An error occurred while installing build dependencies. * use cmake FindCURL module * for OpenSSL, use include instead of find_package * remove jammy, add gcc-10 and 11 test * revert now-unrelated changes * clean-up * add VERBOSE flag to make * Update .github/workflows/cmake.yml * Update .github/workflows/cmake.yml * use '-f' option from build script to force clang * force dynamic libs with '-d' fixes #251 * mk/linux/setupBuildDeps.sh:fix script so 22.04 is detected *remove vlc deps (not required for the CI) *remove ubuntu-18.04 from the build matrix, see https://github.blog/changelog/2022-08-09-github-actions-the-ubuntu-18-04-actions-runner-image-is-being-deprecated-and-will-be-removed-by-12-1-22/ * revert removal of commented macos jobs * run apt-get update and upgrade * cleanup Prep snapshot section
2022-08-21 00:29:38 +02:00
env:
MATRIX_COMPILER: ${{matrix.compiler}}
MATRIX_OS: ${{matrix.os}}
2021-06-20 03:03:46 +02:00
steps:
workflows/cmake.yml:add tests for recent gcc versions;migrate to checkoutv3 (#250) * workflows/cmake.yml:test on Ubuntu Jammy (22.04);migrate to checkoutv3 This should also fix #247 * maybe fix ssh link error on Ubuntu Jammy gcc and clang build is failing on Jammy with the message: 'cannot find -lssh: No such file or directory' Basically I added libcurl-openssl-dev to the deps * remove libcurl4-gnutls-dev Trying to correct: The following packages have unmet dependencies: libcurl4-gnutls-dev : Conflicts: libcurl4-openssl-dev but 7.81.0-1ubuntu1.3 is to be installed libcurl4-openssl-dev : Conflicts: libcurl4-gnutls-dev but 7.81.0-1ubuntu1.3 is to be installed E: Unable to correct problems, you have held broken packages. An error occurred while installing build dependencies. * use cmake FindCURL module * for OpenSSL, use include instead of find_package * remove jammy, add gcc-10 and 11 test * revert now-unrelated changes * clean-up * add VERBOSE flag to make * Update .github/workflows/cmake.yml * Update .github/workflows/cmake.yml * use '-f' option from build script to force clang * force dynamic libs with '-d' fixes #251 * mk/linux/setupBuildDeps.sh:fix script so 22.04 is detected *remove vlc deps (not required for the CI) *remove ubuntu-18.04 from the build matrix, see https://github.blog/changelog/2022-08-09-github-actions-the-ubuntu-18-04-actions-runner-image-is-being-deprecated-and-will-be-removed-by-12-1-22/ * revert removal of commented macos jobs * run apt-get update and upgrade * cleanup Prep snapshot section
2022-08-21 00:29:38 +02:00
- uses: actions/checkout@v3
2021-06-20 03:03:46 +02:00
- name: Get dependencies
2021-06-20 03:24:13 +02:00
run: |
workflows/cmake.yml:add tests for recent gcc versions;migrate to checkoutv3 (#250) * workflows/cmake.yml:test on Ubuntu Jammy (22.04);migrate to checkoutv3 This should also fix #247 * maybe fix ssh link error on Ubuntu Jammy gcc and clang build is failing on Jammy with the message: 'cannot find -lssh: No such file or directory' Basically I added libcurl-openssl-dev to the deps * remove libcurl4-gnutls-dev Trying to correct: The following packages have unmet dependencies: libcurl4-gnutls-dev : Conflicts: libcurl4-openssl-dev but 7.81.0-1ubuntu1.3 is to be installed libcurl4-openssl-dev : Conflicts: libcurl4-gnutls-dev but 7.81.0-1ubuntu1.3 is to be installed E: Unable to correct problems, you have held broken packages. An error occurred while installing build dependencies. * use cmake FindCURL module * for OpenSSL, use include instead of find_package * remove jammy, add gcc-10 and 11 test * revert now-unrelated changes * clean-up * add VERBOSE flag to make * Update .github/workflows/cmake.yml * Update .github/workflows/cmake.yml * use '-f' option from build script to force clang * force dynamic libs with '-d' fixes #251 * mk/linux/setupBuildDeps.sh:fix script so 22.04 is detected *remove vlc deps (not required for the CI) *remove ubuntu-18.04 from the build matrix, see https://github.blog/changelog/2022-08-09-github-actions-the-ubuntu-18-04-actions-runner-image-is-being-deprecated-and-will-be-removed-by-12-1-22/ * revert removal of commented macos jobs * run apt-get update and upgrade * cleanup Prep snapshot section
2022-08-21 00:29:38 +02:00
sudo apt-get update && sudo apt-get upgrade
2021-06-20 03:24:13 +02:00
sudo mk/linux/setupBuildDeps.sh
workflows/cmake.yml:add tests for recent gcc versions;migrate to checkoutv3 (#250) * workflows/cmake.yml:test on Ubuntu Jammy (22.04);migrate to checkoutv3 This should also fix #247 * maybe fix ssh link error on Ubuntu Jammy gcc and clang build is failing on Jammy with the message: 'cannot find -lssh: No such file or directory' Basically I added libcurl-openssl-dev to the deps * remove libcurl4-gnutls-dev Trying to correct: The following packages have unmet dependencies: libcurl4-gnutls-dev : Conflicts: libcurl4-openssl-dev but 7.81.0-1ubuntu1.3 is to be installed libcurl4-openssl-dev : Conflicts: libcurl4-gnutls-dev but 7.81.0-1ubuntu1.3 is to be installed E: Unable to correct problems, you have held broken packages. An error occurred while installing build dependencies. * use cmake FindCURL module * for OpenSSL, use include instead of find_package * remove jammy, add gcc-10 and 11 test * revert now-unrelated changes * clean-up * add VERBOSE flag to make * Update .github/workflows/cmake.yml * Update .github/workflows/cmake.yml * use '-f' option from build script to force clang * force dynamic libs with '-d' fixes #251 * mk/linux/setupBuildDeps.sh:fix script so 22.04 is detected *remove vlc deps (not required for the CI) *remove ubuntu-18.04 from the build matrix, see https://github.blog/changelog/2022-08-09-github-actions-the-ubuntu-18-04-actions-runner-image-is-being-deprecated-and-will-be-removed-by-12-1-22/ * revert removal of commented macos jobs * run apt-get update and upgrade * cleanup Prep snapshot section
2022-08-21 00:29:38 +02:00
- name: Build
run: |
if [ "${MATRIX_COMPILER}" = "clang" ]; then
EXTRA_OPTS="-f"
fi
mk/linux/build-mg.sh -m -d ${EXTRA_OPTS}
make -C mk/linux/build -j$(nproc) VERBOSE=1
workflows/cmake.yml:add tests for recent gcc versions;migrate to checkoutv3 (#250) * workflows/cmake.yml:test on Ubuntu Jammy (22.04);migrate to checkoutv3 This should also fix #247 * maybe fix ssh link error on Ubuntu Jammy gcc and clang build is failing on Jammy with the message: 'cannot find -lssh: No such file or directory' Basically I added libcurl-openssl-dev to the deps * remove libcurl4-gnutls-dev Trying to correct: The following packages have unmet dependencies: libcurl4-gnutls-dev : Conflicts: libcurl4-openssl-dev but 7.81.0-1ubuntu1.3 is to be installed libcurl4-openssl-dev : Conflicts: libcurl4-gnutls-dev but 7.81.0-1ubuntu1.3 is to be installed E: Unable to correct problems, you have held broken packages. An error occurred while installing build dependencies. * use cmake FindCURL module * for OpenSSL, use include instead of find_package * remove jammy, add gcc-10 and 11 test * revert now-unrelated changes * clean-up * add VERBOSE flag to make * Update .github/workflows/cmake.yml * Update .github/workflows/cmake.yml * use '-f' option from build script to force clang * force dynamic libs with '-d' fixes #251 * mk/linux/setupBuildDeps.sh:fix script so 22.04 is detected *remove vlc deps (not required for the CI) *remove ubuntu-18.04 from the build matrix, see https://github.blog/changelog/2022-08-09-github-actions-the-ubuntu-18-04-actions-runner-image-is-being-deprecated-and-will-be-removed-by-12-1-22/ * revert removal of commented macos jobs * run apt-get update and upgrade * cleanup Prep snapshot section
2022-08-21 00:29:38 +02:00
build-linux-other:
strategy:
fail-fast: false
matrix:
compiler: [10, 12] # 11 is on 22.04 by default, tested above
runs-on: ubuntu-22.04
env:
CC: gcc-${{matrix.compiler}}
CXX: g++-${{matrix.compiler}}
steps:
- uses: actions/checkout@v3
- name: Get dependencies
run: |
workflows/cmake.yml:add tests for recent gcc versions;migrate to checkoutv3 (#250) * workflows/cmake.yml:test on Ubuntu Jammy (22.04);migrate to checkoutv3 This should also fix #247 * maybe fix ssh link error on Ubuntu Jammy gcc and clang build is failing on Jammy with the message: 'cannot find -lssh: No such file or directory' Basically I added libcurl-openssl-dev to the deps * remove libcurl4-gnutls-dev Trying to correct: The following packages have unmet dependencies: libcurl4-gnutls-dev : Conflicts: libcurl4-openssl-dev but 7.81.0-1ubuntu1.3 is to be installed libcurl4-openssl-dev : Conflicts: libcurl4-gnutls-dev but 7.81.0-1ubuntu1.3 is to be installed E: Unable to correct problems, you have held broken packages. An error occurred while installing build dependencies. * use cmake FindCURL module * for OpenSSL, use include instead of find_package * remove jammy, add gcc-10 and 11 test * revert now-unrelated changes * clean-up * add VERBOSE flag to make * Update .github/workflows/cmake.yml * Update .github/workflows/cmake.yml * use '-f' option from build script to force clang * force dynamic libs with '-d' fixes #251 * mk/linux/setupBuildDeps.sh:fix script so 22.04 is detected *remove vlc deps (not required for the CI) *remove ubuntu-18.04 from the build matrix, see https://github.blog/changelog/2022-08-09-github-actions-the-ubuntu-18-04-actions-runner-image-is-being-deprecated-and-will-be-removed-by-12-1-22/ * revert removal of commented macos jobs * run apt-get update and upgrade * cleanup Prep snapshot section
2022-08-21 00:29:38 +02:00
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install -y $CXX
sudo mk/linux/setupBuildDeps.sh
- name: Build
run: |
mk/linux/build-mg.sh -d -m
make -C mk/linux/build -j$(nproc) VERBOSE=1
2021-06-20 03:03:46 +02:00
build-win64:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
strategy:
fail-fast: false
matrix:
arch: [x64]
build_type: [Release]
include:
- build_type: Release
release: 'ON'
runs-on: windows-latest
steps:
workflows/cmake.yml:add tests for recent gcc versions;migrate to checkoutv3 (#250) * workflows/cmake.yml:test on Ubuntu Jammy (22.04);migrate to checkoutv3 This should also fix #247 * maybe fix ssh link error on Ubuntu Jammy gcc and clang build is failing on Jammy with the message: 'cannot find -lssh: No such file or directory' Basically I added libcurl-openssl-dev to the deps * remove libcurl4-gnutls-dev Trying to correct: The following packages have unmet dependencies: libcurl4-gnutls-dev : Conflicts: libcurl4-openssl-dev but 7.81.0-1ubuntu1.3 is to be installed libcurl4-openssl-dev : Conflicts: libcurl4-gnutls-dev but 7.81.0-1ubuntu1.3 is to be installed E: Unable to correct problems, you have held broken packages. An error occurred while installing build dependencies. * use cmake FindCURL module * for OpenSSL, use include instead of find_package * remove jammy, add gcc-10 and 11 test * revert now-unrelated changes * clean-up * add VERBOSE flag to make * Update .github/workflows/cmake.yml * Update .github/workflows/cmake.yml * use '-f' option from build script to force clang * force dynamic libs with '-d' fixes #251 * mk/linux/setupBuildDeps.sh:fix script so 22.04 is detected *remove vlc deps (not required for the CI) *remove ubuntu-18.04 from the build matrix, see https://github.blog/changelog/2022-08-09-github-actions-the-ubuntu-18-04-actions-runner-image-is-being-deprecated-and-will-be-removed-by-12-1-22/ * revert removal of commented macos jobs * run apt-get update and upgrade * cleanup Prep snapshot section
2022-08-21 00:29:38 +02:00
- uses: actions/checkout@v3
- name: Cache Vcpkg Libs
uses: actions/cache@v2
2021-06-17 21:43:30 +02:00
env:
cache-name: cache-vcpkg-deps
with:
path: c:/vcpkg/installed
key: vcpkg-deps
- name: Install Dependencies
run: |
vcpkg integrate install
vcpkg install brotli:x64-windows-static
vcpkg install bzip2:x64-windows-static
vcpkg install curl:x64-windows-static
vcpkg install expat:x64-windows-static
vcpkg install freetype:x64-windows-static
vcpkg install fribidi:x64-windows-static
vcpkg install ftgl:x64-windows-static
vcpkg install glew:x64-windows-static
vcpkg install libiconv:x64-windows-static
vcpkg install libjpeg-turbo:x64-windows-static
vcpkg install liblzma:x64-windows-static
vcpkg install libogg:x64-windows-static
vcpkg install libpng:x64-windows-static
vcpkg install libvorbis:x64-windows-static
vcpkg install libxml2:x64-windows-static
vcpkg install lua:x64-windows-static
vcpkg install openal-soft:x64-windows-static
vcpkg install opengl:x64-windows-static
vcpkg install miniupnpc:x64-windows-static
vcpkg install sdl2:x64-windows-static
vcpkg install sqlite3:x64-windows-static
vcpkg install tiff:x64-windows-static
vcpkg install tool-meson:x64-windows-static
vcpkg install wxwidgets:x64-windows-static
vcpkg install xerces-c:x64-windows-static
vcpkg install zlib:x64-windows-static
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
# Kinda guessing this using supertux + my own build scripts as guides.
2022-07-28 19:51:38 +02:00
run: cmake --no-warn-unused-cli -B ${{github.workspace}}/build -DCMAKE_TOOLCHAIN_FILE=c:/vcpkg/scripts/buildsystems/vcpkg.cmake -G "Visual Studio 17 2022" -T host=x64 -A x64 -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE
- name: Build Mega Glest
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config Release --target ALL_BUILD
- name: Prepare Snapshot
run: |
cd mk/windoze
2021-06-18 22:24:55 +02:00
cp ..\shared\*.ini .
2021-06-18 03:03:30 +02:00
$7zPath = $(Get-Command 7z).Source
cp $7zPath .
cd ../..
- name: Create Mega Glest Snapshot
uses: actions/upload-artifact@v2
with:
2021-06-20 17:22:43 +02:00
name: megaglest-x64-windows
path: |
mk/windoze/*.exe
2021-06-18 22:24:55 +02:00
mk/windoze/*.ini
!mk/windoze/glest-dev.ini
# build-macos:
# strategy:
# fail-fast: false
# matrix:
# arch: [x64]
# os: [macos-latest]
# compiler: [clang]
# runs-on: ${{ matrix.os }}
# steps:
# - uses: actions/checkout@v2
# - name: Get dependencies
# run: |
# brew install pkg-config cmake sdl2 lua jpeg libpng freetype ftgl libogg glew libvorbis cppunit fribidi miniupnpc curl wxmac xquartz zstd xml2 openldap
# - name: Bulid MegaGlest With Clang Compiler
# if: ${{ matrix.compiler == 'clang' }}
# env:
# CC: clang
# CXX: clang++
# run: |
# # Path hack to get curl working.
# export PATH=/usr/local/Cellar/curl/7.77.0/bin:$PATH
# mk/macos/build-mg.sh
# - name: Test
# working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
# run: ctest -C ${{env.BUILD_TYPE}}