Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workflows/cmake.yml:add tests for recent gcc versions;migrate to checkoutv3 #250

Merged
merged 17 commits into from
Aug 20, 2022
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 42 additions & 18 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,56 @@ jobs:
strategy:
fail-fast: false
matrix:
arch: [x64]
os: [ubuntu-18.04, ubuntu-latest]
os: [ubuntu-18.04, ubuntu-20.04]
compiler: [gcc, clang]
runs-on: ${{ matrix.os }}
env:
MATRIX_COMPILER: ${{matrix.compiler}}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Get dependencies
run: |
sudo apt update
run: |
sudo apt-get update && sudo apt-get -y upgrade
sudo mk/linux/setupBuildDeps.sh

- name: Bulid MegaGlest With GCC Compiler
if: ${{ matrix.compiler == 'gcc' }}
env:
CC: gcc
CXX: g++
run: mk/linux/build-mg.sh
- name: Build

- name: Bulid MegaGlest With Clang Compiler
if: ${{ matrix.compiler == 'clang' }}
env:
CC: clang
CXX: clang++
run: mk/linux/build-mg.sh
run: |
if [ "${MATRIX_COMPILER}" = "gcc" ]; then
eval "CC=gcc && CXX=g++"
else
eval "CC=clang && CXX=clang++"
fi
mk/linux/build-mg.sh -m
make -C build -j$(nproc) VERBOSE=1
andy5995 marked this conversation as resolved.
Show resolved Hide resolved

build-latest-gcc:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
compiler: [10, 11] # 12 is not available in focal at this time, and MG won't build on 22.04
runs-on: ubuntu-20.04
env:
CC: gcc-${{matrix.compiler}}
CXX: g++-${{matrix.compiler}}
steps:
- uses: actions/checkout@v3
- name: Get dependencies
run: |
if [ "${CC}" = "gcc-11" ]; then
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6B05F25D762E3157;
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
fi
sudo apt-get update && sudo apt-get -y upgrade
sudo apt-get install -y $CC $CXX
sudo mk/linux/setupBuildDeps.sh
- name: Build
run: |
mk/linux/build-mg.sh -m
make -C build -j$(nproc) VERBOSE=1
andy5995 marked this conversation as resolved.
Show resolved Hide resolved

- name: Prepare Snapshot
if: ${{ matrix.compiler == 'gcc' && matrix.os == 'ubuntu-latest' }}
Expand Down Expand Up @@ -75,7 +99,7 @@ jobs:
runs-on: windows-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Cache Vcpkg Libs
uses: actions/cache@v2
Expand Down
4 changes: 2 additions & 2 deletions mk/linux/setupBuildDeps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ 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"
;;
Expand All @@ -185,7 +185,7 @@ case $distribution in
;;
esac
;;

LinuxMint|Linuxmint)
case $release in
2)
Expand Down