2023-07-21 18:01:02 +02:00

73 lines
1.9 KiB
YAML

name: Build
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
types: [opened, synchronize, reopened]
jobs:
build-linux:
name: Build Linux
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
configuration:
- Release
arch:
- x64
- arm64
include:
- configuration: Release
config: release
steps:
- name: Check out files
uses: actions/checkout@v3.5.3
with:
submodules: true
fetch-depth: 0
# NOTE - If LFS ever starts getting used during builds, switch this to true!
lfs: false
- name: Install crossbuild tools (arm64)
if: matrix.arch == 'arm64'
run: |
sudo apt-get update
sudo apt-get install crossbuild-essential-arm64 -y
- name: Install Premake5
uses: abel0b/setup-premake@v2.2
with:
version: "5.0.0-beta2"
- name: Generate project files
run: premake5 gmake2
- name: Set up problem matching
uses: ammaraskar/gcc-problem-matcher@master
- name: Set up CC environment variable
if: matrix.arch == 'arm64'
run: |
echo "CC=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
- name: Set up CXX environment variable
if: matrix.arch == 'arm64'
run: |
echo "CXX=aarch64-linux-gnu-g++" >> $GITHUB_ENV
- name: Build ${{matrix.configuration}} ${{matrix.arch}} binaries
run: |
pushd build
make config=${{matrix.config}}_${{matrix.arch}} -j$(nproc)
- name: Upload ${{matrix.configuration}} ${{matrix.arch}} binaries
uses: actions/upload-artifact@v3.1.2
with:
name: Linux ${{matrix.configuration}} ${{matrix.arch}} binaries
path: |
build/bin/${{matrix.arch}}/${{matrix.configuration}}/MonitorRam