Update ImGui & apply compile options to dependencies #124
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: [push, pull_request] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
distro: ["ubuntu:latest", "debian:latest", "debian:unstable", "debian:testing", "dockerscripts/linuxmint:mate", "archlinux:latest", "manjarolinux/base:latest", "fedora:latest", "opensuse/tumbleweed:latest"] | |
fail-fast: false | |
runs-on: ubuntu-latest | |
container: ${{ matrix.distro }} | |
steps: | |
- if: matrix.distro == 'ubuntu:latest' || matrix.distro == 'dockerscripts/linuxmint:mate' | |
name: Setup dependencies | |
run: | | |
apt-get update | |
apt-get install -y patchelf gdb git cmake make build-essential libsdl2-dev gcc-12 g++-12 | |
- if: matrix.distro == 'debian:unstable' || matrix.distro == 'debian:testing' || matrix.distro == 'debian:latest' | |
name: Setup dependencies | |
run: | | |
apt-get update | |
apt-get install -y patchelf gdb git cmake make build-essential libsdl2-dev | |
- if: matrix.distro == 'archlinux:latest' || matrix.distro == 'manjarolinux/base:latest' | |
name: Setup dependencies | |
run: | | |
pacman -Syu --noconfirm | |
pacman -S --noconfirm base-devel cmake gdb git sdl2 patchelf | |
- if: matrix.distro == 'fedora:latest' | |
name: Setup dependencies | |
run: | | |
dnf update -y | |
dnf install -y patchelf gdb git cmake make gcc-c++ SDL2-devel | |
- if: matrix.distro == 'opensuse/tumbleweed:latest' | |
name: Setup dependencies | |
run: | | |
zypper refresh | |
zypper install -y patchelf gdb git cmake make gcc-c++ SDL2-devel | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- if: matrix.distro == 'ubuntu:latest' || matrix.distro == 'dockerscripts/linuxmint:mate' | |
name: Build | |
run: CC=gcc-12 CXX=g++-12 ./Build.sh | |
- if: "!(matrix.distro == 'ubuntu:latest' || matrix.distro == 'dockerscripts/linuxmint:mate')" | |
name: Build | |
run: ./Build.sh | |
- name: Distro name for artifact | |
if: always() | |
id: distro_name | |
run: | | |
CONTAINER_NAME=${{ matrix.distro }} | |
. /etc/os-release | |
TMP_OUTPUT=$(echo "name=$NAME" | sed "s/\// /g") | |
if [ "$CONTAINER_NAME" == "debian:unstable" ]; then | |
echo "$TMP_OUTPUT unstable" >> "$GITHUB_OUTPUT" | |
elif [ "$CONTAINER_NAME" == "debian:testing" ]; then | |
echo "$TMP_OUTPUT testing" >> "$GITHUB_OUTPUT" | |
else | |
echo $TMP_OUTPUT >> "$GITHUB_OUTPUT" | |
fi | |
shell: bash | |
- name: Upload artifacts | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ steps.distro_name.outputs.name }} | |
path: | | |
Build/*.so |