81 lines
2.0 KiB
YAML

name: Build
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
types: [opened, synchronize, reopened]
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
env:
PREMAKE_VERSION: "5.0.0-beta5"
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@main
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: diamante0018/setup-premake@v0.0.2
with:
version: ${{ env.PREMAKE_VERSION }}
- name: Generate project files
run: premake5 gmake
- 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@main
with:
name: Linux ${{matrix.configuration}} ${{matrix.arch}} binaries
path: |
build/bin/${{matrix.arch}}/${{matrix.configuration}}/MonitorRam