2023-05-26 10:09:29 -04:00
|
|
|
name: Build
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- "*"
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- "*"
|
|
|
|
types: [opened, synchronize, reopened]
|
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-win:
|
|
|
|
name: Build Windows
|
|
|
|
runs-on: windows-latest
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
configuration:
|
|
|
|
- Release
|
|
|
|
arch:
|
|
|
|
- x64
|
|
|
|
include:
|
|
|
|
- arch: x64
|
|
|
|
platform: x64
|
|
|
|
steps:
|
|
|
|
- name: Check out files
|
2023-06-23 06:10:20 -04:00
|
|
|
uses: actions/checkout@v3.5.3
|
2023-05-26 10:09:29 -04:00
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
fetch-depth: 0
|
|
|
|
# NOTE - If LFS ever starts getting used during builds, switch this to true!
|
|
|
|
lfs: false
|
|
|
|
|
|
|
|
- name: Add msbuild to PATH
|
|
|
|
uses: microsoft/setup-msbuild@v1.3.1
|
|
|
|
|
2023-06-08 05:49:48 -04:00
|
|
|
- name: Install Premake5
|
|
|
|
uses: abel0b/setup-premake@v2.2
|
|
|
|
with:
|
|
|
|
version: "5.0.0-beta2"
|
|
|
|
|
2023-05-26 10:09:29 -04:00
|
|
|
- name: Generate project files
|
2023-06-08 05:49:48 -04:00
|
|
|
run: premake5 vs2022
|
2023-05-26 10:09:29 -04:00
|
|
|
|
|
|
|
- name: Set up problem matching
|
|
|
|
uses: ammaraskar/msvc-problem-matcher@master
|
|
|
|
|
|
|
|
- name: Build ${{matrix.configuration}} ${{matrix.arch}} binaries
|
|
|
|
run: msbuild /m /v:minimal /p:Configuration=${{matrix.configuration}} /p:Platform=${{matrix.platform}} build/alterware-master.sln
|
|
|
|
|
|
|
|
- name: Upload ${{matrix.configuration}} ${{matrix.arch}} binaries
|
|
|
|
uses: actions/upload-artifact@v3.1.2
|
|
|
|
with:
|
|
|
|
name: Windows ${{matrix.configuration}} ${{matrix.arch}} binaries
|
|
|
|
path: |
|
|
|
|
build/bin/${{matrix.arch}}/${{matrix.configuration}}/alterware-master.exe
|
|
|
|
build/bin/${{matrix.arch}}/${{matrix.configuration}}/alterware-master.pdb
|
|
|
|
|
|
|
|
build-linux:
|
|
|
|
name: Build Linux
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
configuration:
|
|
|
|
- Release
|
|
|
|
arch:
|
|
|
|
- x64
|
2023-06-23 16:39:53 -04:00
|
|
|
- arm64
|
2023-05-26 10:09:29 -04:00
|
|
|
include:
|
|
|
|
- configuration: Release
|
|
|
|
config: release
|
|
|
|
steps:
|
|
|
|
- name: Check out files
|
2023-06-23 06:10:20 -04:00
|
|
|
uses: actions/checkout@v3.5.3
|
2023-05-26 10:09:29 -04:00
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
fetch-depth: 0
|
|
|
|
# NOTE - If LFS ever starts getting used during builds, switch this to true!
|
|
|
|
lfs: false
|
|
|
|
|
|
|
|
- name: Install dependencies (x64)
|
|
|
|
if: matrix.arch == 'x64'
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
2023-06-29 14:28:28 -04:00
|
|
|
sudo apt-get install libcurl4-gnutls-dev -y
|
2023-05-26 10:09:29 -04:00
|
|
|
|
2023-06-29 14:28:28 -04:00
|
|
|
- name: Install crossbuild tools (arm64)
|
2023-06-23 16:39:53 -04:00
|
|
|
if: matrix.arch == 'arm64'
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
2023-06-29 14:28:28 -04:00
|
|
|
sudo apt-get install crossbuild-essential-arm64 -y
|
2023-06-23 16:39:53 -04:00
|
|
|
|
|
|
|
- name: Install dependencies (arm64)
|
|
|
|
if: matrix.arch == 'arm64'
|
|
|
|
run: |
|
|
|
|
echo "deb [arch=arm64] http://ports.ubuntu.com/ jammy main multiverse universe" | sudo tee /etc/apt/sources.list
|
|
|
|
echo "deb [arch=arm64] http://ports.ubuntu.com/ jammy-security main multiverse universe" | sudo tee -a /etc/apt/sources.list
|
|
|
|
echo "deb [arch=arm64] http://ports.ubuntu.com/ jammy-backports main multiverse universe" | sudo tee -a /etc/apt/sources.list
|
|
|
|
echo "deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates main multiverse universe" | sudo tee -a /etc/apt/sources.list
|
|
|
|
sudo dpkg --add-architecture arm64
|
|
|
|
sudo apt-get update
|
2023-06-29 14:28:28 -04:00
|
|
|
sudo apt-get install libcurl4-gnutls-dev:arm64 -y
|
2023-05-26 10:09:29 -04:00
|
|
|
|
2023-06-08 05:49:48 -04:00
|
|
|
- name: Install Premake5
|
|
|
|
uses: abel0b/setup-premake@v2.2
|
|
|
|
with:
|
|
|
|
version: "5.0.0-beta2"
|
|
|
|
|
2023-05-26 10:09:29 -04:00
|
|
|
- name: Generate project files
|
2023-06-08 05:49:48 -04:00
|
|
|
run: premake5 gmake2
|
2023-05-26 10:09:29 -04:00
|
|
|
|
|
|
|
- name: Set up problem matching
|
|
|
|
uses: ammaraskar/gcc-problem-matcher@master
|
|
|
|
|
|
|
|
- name: Build ${{matrix.configuration}} ${{matrix.arch}} binaries
|
|
|
|
run: |
|
|
|
|
pushd build
|
2023-05-26 10:12:59 -04:00
|
|
|
make config=${{matrix.config}}_${{matrix.arch}} -j$(nproc)
|
2023-06-29 14:28:28 -04:00
|
|
|
env:
|
|
|
|
CC: clang
|
|
|
|
CXX: clang++
|
2023-05-26 10:09:29 -04:00
|
|
|
|
|
|
|
- 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}}/alterware-master
|
|
|
|
|
2023-06-29 14:28:28 -04:00
|
|
|
build-macos:
|
2023-05-26 10:09:29 -04:00
|
|
|
name: Build macOS
|
|
|
|
runs-on: macos-13
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
configuration:
|
|
|
|
- Release
|
|
|
|
arch:
|
|
|
|
- x64
|
2023-06-29 14:28:28 -04:00
|
|
|
- arm64
|
2023-05-26 10:09:29 -04:00
|
|
|
include:
|
|
|
|
- configuration: Release
|
|
|
|
config: release
|
|
|
|
- arch: x64
|
|
|
|
platform: x64
|
2023-06-29 14:28:28 -04:00
|
|
|
- arch: arm64
|
|
|
|
platform: arm64
|
2023-05-26 10:09:29 -04:00
|
|
|
steps:
|
|
|
|
- name: Check out files
|
2023-06-18 17:43:42 -04:00
|
|
|
uses: actions/checkout@v3.5.3
|
2023-05-26 10:09:29 -04:00
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
fetch-depth: 0
|
|
|
|
# NOTE - If LFS ever starts getting used during builds, switch this to true!
|
|
|
|
lfs: false
|
|
|
|
|
2023-06-08 05:49:48 -04:00
|
|
|
- name: Install Premake5
|
|
|
|
uses: abel0b/setup-premake@v2.2
|
|
|
|
with:
|
|
|
|
version: "5.0.0-beta2"
|
|
|
|
|
2023-05-26 10:09:29 -04:00
|
|
|
- name: Generate project files
|
2023-06-08 05:49:48 -04:00
|
|
|
run: premake5 gmake2
|
2023-05-26 10:09:29 -04:00
|
|
|
|
|
|
|
- name: Set up problem matching
|
|
|
|
uses: ammaraskar/gcc-problem-matcher@master
|
|
|
|
|
|
|
|
- name: Build ${{matrix.configuration}} ${{matrix.arch}} binaries
|
|
|
|
run: |
|
|
|
|
pushd build
|
2023-06-23 08:06:51 -04:00
|
|
|
make config=${{matrix.config}}_${{matrix.arch}} -j$(sysctl -n hw.logicalcpu)
|
2023-05-26 10:09:29 -04:00
|
|
|
|
|
|
|
- name: Upload ${{matrix.configuration}} ${{matrix.arch}} binaries
|
|
|
|
uses: actions/upload-artifact@v3.1.2
|
|
|
|
with:
|
|
|
|
name: macOS ${{matrix.configuration}} ${{matrix.arch}} binaries
|
|
|
|
path: |
|
2023-06-23 08:06:51 -04:00
|
|
|
build/bin/${{matrix.arch}}/${{matrix.configuration}}/alterware-master
|