Skip to content

GNU/Linux

GNU/Linux #18

Workflow file for this run

name: GNU/Linux
on:
push:
branches: [ "master", "unstable" ]
paths:
- rte/src/*
pull_request:
branches: [ "master", "unstable" ]
paths:
- rte/src/*
workflow_dispatch:
jobs:
gnu-linux:
strategy:
matrix:
arch: [32, 64]
build_type: [Release]
include:
- build_type: Release
arch: 32
release: OFF
- build_type: Release
arch: 64
release: ON
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3
with:
fetch-depth: 1
submodules: true
- name: Install 32-bit dependencies
if: ${{ matrix.arch == 32 }}
run: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -y \
cmake \
build-essential \
gcc-multilib \
g++-multilib \
libsdl2-dev:i386 \
libsdl2-image-dev:i386 \
libsdl2-gfx-dev:i386 \
libsdl2-mixer-dev:i386 \
libsdl2-net-dev:i386 \
libflac-dev:i386 \
libjpeg-dev:i386 \
libpng-dev:i386 \
libtiff-dev:i386 \
libfluidsynth-dev:i386 \
libwebp-dev:i386 \
libmodplug-dev:i386 \
libmpg123-dev:i386 \
libvorbis-dev:i386 \
libopusfile-dev:i386 \
libzstd-dev:i386
- name: Install 64-bit dependencies
if: ${{ matrix.arch == 64 }}
run: |
sudo apt-get update
sudo apt-get install -y \
cmake \
build-essential \
g++-9 \
gcc-multilib \
g++-multilib \
libc++-dev \
libsdl2-dev \
libsdl2-image-dev \
libsdl2-gfx-dev \
libsdl2-mixer-dev \
libsdl2-net-dev \
libflac-dev \
libjpeg-dev \
libpng-dev \
libtiff-dev \
libfluidsynth-dev \
libwebp-dev \
libmodplug-dev \
libmpg123-dev \
libvorbis-dev \
libopusfile-dev \
libzstd-dev
- name: Set compiler (gcc)
run: |
echo "CXX=g++" >> $GITHUB_ENV
echo "CC=gcc" >> $GITHUB_ENV
- name: Configure build
env:
ARCH: ${{ matrix.arch == 32 && '-DCMAKE_C_FLAGS=-m32 -DCMAKE_CXX_FLAGS=-m32' || '' }}
BUILD_TYPE: ${{ matrix.build_type }}
run: |
cmake --version
$CXX --version
cd rte
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE $ARCH \
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=bin \
-DBUILD_STATIC_LIBS=ON
- name: Build
working-directory: rte/build
run: |
make
- name: Package
uses: actions/upload-artifact@v3
with:
name: "Brux-GNULinux-${{ matrix.arch }}-${{ matrix.build_type }}-binary"
path: "rte/build/bin"