Files
master-tool/.github/workflows/build.yml
T

237 lines
6.2 KiB
YAML
Raw Normal View History

2022-11-12 21:49:50 +00:00
name: Build
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
types: [opened, synchronize, reopened]
2022-11-25 15:30:21 +00:00
2022-11-25 15:36:38 +00:00
concurrency:
2022-11-25 15:30:21 +00:00
group: ${{ github.ref }}
cancel-in-progress: true
2024-01-12 12:09:41 +01:00
env:
2026-01-30 11:05:26 +01:00
PREMAKE_VERSION: "5.0.0-beta8"
2024-01-12 12:09:41 +01:00
2022-11-12 21:49:50 +00:00
jobs:
2025-04-14 09:50:44 +02:00
build-windows:
2022-11-12 21:49:50 +00:00
name: Build Windows
2026-06-03 09:35:36 +02:00
runs-on: windows-2022
2022-11-12 21:49:50 +00:00
strategy:
fail-fast: false
matrix:
configuration:
2024-01-12 12:09:41 +01:00
- release
2025-04-14 09:50:44 +02:00
compiler:
- msvc
- clang
2022-11-12 21:49:50 +00:00
arch:
2025-04-14 09:50:44 +02:00
- x86
2022-11-12 21:49:50 +00:00
- x64
2024-03-12 11:14:23 +01:00
- arm64
2022-11-12 21:49:50 +00:00
include:
2025-04-14 09:50:44 +02:00
- arch: x86
platform: Win32
2022-11-12 21:49:50 +00:00
- arch: x64
platform: x64
2026-06-03 09:38:22 +02:00
- arch: arm64
platform: arm64
2022-11-12 21:49:50 +00:00
steps:
- name: Check out files
2024-01-12 12:09:41 +01:00
uses: actions/checkout@main
2022-11-12 21:49:50 +00:00
with:
submodules: true
fetch-depth: 0
lfs: false
- name: Add msbuild to PATH
2024-01-12 12:09:41 +01:00
uses: microsoft/setup-msbuild@main
2022-11-12 21:49:50 +00:00
2023-06-22 14:53:21 +02:00
- name: Install Premake5
2024-03-12 11:14:23 +01:00
uses: diamante0018/setup-premake@master
2023-06-22 14:53:21 +02:00
with:
2024-01-12 12:09:41 +01:00
version: ${{ env.PREMAKE_VERSION }}
2023-06-22 14:53:21 +02:00
2025-04-14 09:50:44 +02:00
- name: Generate project files (clang)
if: matrix.compiler == 'clang'
run: premake5 --cc=${{matrix.compiler}} vs2022
- name: Generate project files (msvc)
if: matrix.compiler == 'msvc'
2023-06-22 14:53:21 +02:00
run: premake5 vs2022
2022-11-12 21:49:50 +00:00
- name: Set up problem matching
uses: ammaraskar/msvc-problem-matcher@master
2025-04-14 09:50:44 +02:00
- name: Build ${{matrix.arch}} ${{matrix.configuration}} ${{matrix.compiler}} binaries
2024-01-12 12:09:41 +01:00
run: msbuild /m /p:Configuration=${{matrix.configuration}} /p:Platform=${{matrix.platform}} build/alterware-master-tool.sln
2022-11-12 21:49:50 +00:00
2025-04-14 09:50:44 +02:00
- name: Upload ${{matrix.arch}} ${{matrix.configuration}} ${{matrix.compiler}} binaries
2024-01-12 12:09:41 +01:00
uses: actions/upload-artifact@main
2022-11-12 21:49:50 +00:00
with:
2025-04-14 09:50:44 +02:00
name: windows-${{matrix.arch}}-${{matrix.configuration}}-${{matrix.compiler}}
2022-11-12 21:49:50 +00:00
path: |
2023-06-23 14:17:09 +02:00
build/bin/${{matrix.arch}}/${{matrix.configuration}}/alterware-master-tool.exe
build/bin/${{matrix.arch}}/${{matrix.configuration}}/alterware-master-tool.pdb
2022-11-12 21:49:50 +00:00
2023-02-28 11:11:29 +00:00
build-linux:
2022-11-12 21:49:50 +00:00
name: Build Linux
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
configuration:
2024-01-12 12:09:41 +01:00
- release
2022-11-12 21:49:50 +00:00
arch:
2025-04-14 09:50:44 +02:00
- amd64
2022-11-12 21:49:50 +00:00
steps:
- name: Check out files
2024-01-12 12:09:41 +01:00
uses: actions/checkout@main
2022-11-12 21:49:50 +00:00
with:
submodules: true
fetch-depth: 0
lfs: false
2023-06-22 14:53:21 +02:00
- name: Install Premake5
2024-03-12 11:14:23 +01:00
uses: diamante0018/setup-premake@master
2023-06-22 14:53:21 +02:00
with:
2024-01-12 12:09:41 +01:00
version: ${{ env.PREMAKE_VERSION }}
2023-06-22 14:53:21 +02:00
2022-11-12 21:49:50 +00:00
- name: Generate project files
2025-04-14 09:50:44 +02:00
run: premake5 --cc=clang gmake
2022-11-12 21:49:50 +00:00
- name: Set up problem matching
uses: ammaraskar/gcc-problem-matcher@master
2024-01-12 12:09:41 +01:00
- name: Build ${{matrix.arch}} ${{matrix.configuration}} binaries
2022-11-12 21:49:50 +00:00
run: |
pushd build
2024-01-12 12:09:41 +01:00
make config=${{matrix.configuration}}_${{matrix.arch}} -j$(nproc)
2023-06-29 19:33:57 +02:00
env:
CC: clang
CXX: clang++
2022-11-12 21:49:50 +00:00
2024-01-12 12:09:41 +01:00
- name: Upload ${{matrix.arch}} ${{matrix.configuration}} binaries
uses: actions/upload-artifact@main
2022-11-12 21:49:50 +00:00
with:
2024-01-12 12:09:41 +01:00
name: linux-${{matrix.arch}}-${{matrix.configuration}}
2022-11-12 21:49:50 +00:00
path: |
2023-06-23 14:17:09 +02:00
build/bin/${{matrix.arch}}/${{matrix.configuration}}/alterware-master-tool
2022-11-12 21:49:50 +00:00
2025-04-14 09:50:44 +02:00
prebuild-linux-arm64:
name: Prebuild Linux
runs-on: ubuntu-latest
steps:
- name: Check out files
uses: actions/checkout@main
with:
submodules: true
fetch-depth: 0
lfs: false
- name: Install Premake5
uses: diamante0018/setup-premake@master
with:
version: ${{ env.PREMAKE_VERSION }}
- name: Generate project files
run: premake5 --cc=clang gmake
- name: Upload project files
uses: actions/upload-artifact@main
with:
name: linux-project-files
path: |
build/
build-linux-arm64:
name: Build Linux
runs-on: ${{ matrix.os }}
needs: prebuild-linux-arm64
strategy:
fail-fast: false
matrix:
configuration:
- release
arch:
- arm64
include:
- arch: arm64
os: ubuntu-24.04-arm
steps:
- name: Check out files
uses: actions/checkout@main
with:
submodules: true
fetch-depth: 0
lfs: false
- name: Create the build directory
run: mkdir -p build
- name: Download project files
uses: actions/download-artifact@main
with:
name: linux-project-files
path: build/
- name: Build ${{matrix.arch}} ${{matrix.configuration}} binaries
working-directory: ${{ github.workspace }}
run: |
pushd build
make config=${{matrix.configuration}}_${{matrix.arch}} -j$(nproc)
env:
CC: clang
CXX: clang++
- name: Upload ${{matrix.arch}} ${{matrix.configuration}} binaries
uses: actions/upload-artifact@main
with:
name: linux-${{matrix.arch}}-${{matrix.configuration}}
path: |
build/bin/${{matrix.arch}}/${{matrix.configuration}}/alterware-master-tool
2022-11-12 21:49:50 +00:00
build-mac:
name: Build macOS
2024-09-02 08:44:59 +02:00
runs-on: macos-latest
2022-11-12 21:49:50 +00:00
strategy:
fail-fast: false
matrix:
configuration:
2024-01-12 12:09:41 +01:00
- release
2022-11-12 21:49:50 +00:00
arch:
2025-04-14 09:50:44 +02:00
- amd64
2023-06-25 15:18:37 +02:00
- arm64
2022-11-12 21:49:50 +00:00
steps:
- name: Check out files
2024-01-12 12:09:41 +01:00
uses: actions/checkout@main
2022-11-12 21:49:50 +00:00
with:
submodules: true
fetch-depth: 0
lfs: false
2023-06-22 14:53:21 +02:00
- name: Install Premake5
2024-03-12 11:14:23 +01:00
uses: diamante0018/setup-premake@master
2023-06-22 14:53:21 +02:00
with:
2024-01-12 12:09:41 +01:00
version: ${{ env.PREMAKE_VERSION }}
2023-06-22 14:53:21 +02:00
2022-11-12 21:49:50 +00:00
- name: Generate project files
2025-04-14 09:50:44 +02:00
run: premake5 gmake
2022-11-12 21:49:50 +00:00
- name: Set up problem matching
uses: ammaraskar/gcc-problem-matcher@master
2024-01-12 12:09:41 +01:00
- name: Build ${{matrix.arch}} ${{matrix.configuration}} binaries
2022-11-12 21:49:50 +00:00
run: |
pushd build
2024-01-12 12:09:41 +01:00
make config=${{matrix.configuration}}_${{matrix.arch}} -j$(sysctl -n hw.logicalcpu)
2022-11-12 21:49:50 +00:00
2024-01-12 12:09:41 +01:00
- name: Upload ${{matrix.arch}} ${{matrix.configuration}} binaries
uses: actions/upload-artifact@main
2022-11-12 21:49:50 +00:00
with:
2024-01-12 12:09:41 +01:00
name: macos-${{matrix.arch}}-${{matrix.configuration}}
2022-11-12 21:49:50 +00:00
path: |
2023-06-23 14:17:09 +02:00
build/bin/${{matrix.arch}}/${{matrix.configuration}}/alterware-master-tool