From cbf72914ac38827dc5de60d0b8a863b1a6982116 Mon Sep 17 00:00:00 2001 From: andy5995 Date: Wed, 17 Aug 2022 11:17:29 -0500 Subject: [PATCH] remove jammy, add gcc-11 and 12 test --- .github/workflows/cmake.yml | 43 ++++++++++++++++++++++++++----------- mk/linux/setupBuildDeps.sh | 6 +----- 2 files changed, 32 insertions(+), 17 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 89bb24797..b92c70825 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -14,10 +14,11 @@ jobs: strategy: fail-fast: false matrix: - arch: [x64] - os: [ubuntu-18.04, ubuntu-20.04, ubuntu-22.04] + os: [ubuntu-18.04, ubuntu-20.04] compiler: [gcc, clang] runs-on: ${{ matrix.os }} + env: + MATRIX_COMPILER: ${{matrix.compiler}} steps: - uses: actions/checkout@v3 @@ -28,17 +29,35 @@ jobs: sudo mk/linux/setupBuildDeps.sh - name: Build MegaGlest With GCC Compiler - if: ${{ matrix.compiler == 'gcc' }} - env: - CC: gcc - CXX: g++ - run: mk/linux/build-mg.sh - - name: Build MegaGlest With Clang Compiler - if: ${{ matrix.compiler == 'clang' }} - env: - CC: clang - CXX: clang++ + run: | + if [ "${MATRIX_COMPILER}" = "gcc" ]; then + eval "CC=gcc && CXX=g++" + else + eval "CC=clang && CXX=clang++" + fi + mk/linux/build-mg.sh + + build-latest-gcc: + strategy: + fail-fast: false + matrix: + os: [ubuntu-20.04] + compiler: [11, 12] + runs-on: ubuntu-20.04 + env: + CC: gcc-${{matrix.compiler}} + CXX: g++-${{matrix.compiler}} + steps: + - uses: actions/checkout@v3 + - name: Get dependencies + run: | + sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6B05F25D762E3157; + sudo add-apt-repository -y ppa:ubuntu-toolchain-r/ppa + sudo apt-get update && sudo apt-get -y upgrade + sudo apt-get install -y $CC $CXX + sudo mk/linux/setupBuildDeps.sh + - name: Build MegaGlest With GCC Compiler run: mk/linux/build-mg.sh - name: Prepare Snapshot diff --git a/mk/linux/setupBuildDeps.sh b/mk/linux/setupBuildDeps.sh index a140a61ab..afec277c2 100755 --- a/mk/linux/setupBuildDeps.sh +++ b/mk/linux/setupBuildDeps.sh @@ -163,14 +163,10 @@ case $distribution in #name > bionic installcommand="apt-get install $APT_OPTIONS build-essential cmake libcurl4-gnutls-dev libsdl2-dev libopenal-dev liblua5.3-dev libjpeg-dev libpng-dev libfreetype6-dev libwxgtk3.0-dev libcppunit-dev libfribidi-dev libftgl-dev libglew-dev libogg-dev libvorbis-dev libminiupnpc-dev libircclient-dev libvlc-dev libvlccore-dev libxml2-dev libx11-dev libgl1-mesa-dev libglu1-mesa-dev librtmp-dev libkrb5-dev libldap2-dev libidn11-dev libgnutls28-dev libnghttp2-dev libssh2-1-dev libidn2-dev libpsl-dev" ;; - 20.04) + "20.04"|"22.04*") #name > Focal Fossa installcommand="apt-get install $APT_OPTIONS build-essential cmake libcurl4-gnutls-dev libsdl2-dev libopenal-dev liblua5.3-dev libjpeg-dev libpng-dev libfreetype6-dev libwxgtk3.0-gtk3-dev libcppunit-dev libfribidi-dev libftgl-dev libglew-dev libogg-dev libvorbis-dev libminiupnpc-dev libircclient-dev libvlc-dev libvlccore-dev libxml2-dev libx11-dev libgl1-mesa-dev libglu1-mesa-dev librtmp-dev libkrb5-dev libldap2-dev libidn2-dev libpsl-dev libgnutls28-dev libnghttp2-dev libssh-dev libbrotli-dev" ;; - 22.04) - #name > Jammy - installcommand="apt-get install $APT_OPTIONS cmake libcurl4-openssl-dev libsdl2-dev libopenal-dev liblua5.3-dev libwxgtk3.0-gtk3-dev libcppunit-dev libfribidi-dev libftgl-dev libglew-dev libogg-dev libvorbis-dev libminiupnpc-dev libircclient-dev libvlc-dev libvlccore-dev libgl1-mesa-dev libglu1-mesa-dev librtmp-dev libkrb5-dev libldap2-dev libidn2-dev libpsl-dev libgnutls28-dev libnghttp2-dev libssh2-1-dev" - ;; *) installcommand="apt-get install $APT_OPTIONS $packages_for_next_debian_ubuntu_mint" unsupported_currently_this_OS="release"