-
Notifications
You must be signed in to change notification settings - Fork 3
74 lines (67 loc) · 2.68 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
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