maint(build): use premake actions (#128)

This commit is contained in:
Xenxo Espasandín 2023-06-12 23:21:43 +02:00 committed by GitHub
parent 4f0573c5f4
commit 34a67d97c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 35 additions and 14 deletions

View File

@ -8,6 +8,11 @@ on:
branches: branches:
- "**" - "**"
types: [opened, synchronize, reopened] types: [opened, synchronize, reopened]
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs: jobs:
build-win: build-win:
name: Build Windows name: Build Windows
@ -37,8 +42,13 @@ jobs:
- name: Add msbuild to PATH - name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.3.1 uses: microsoft/setup-msbuild@v1.3.1
- name: Add premake5 to PATH
uses: abel0b/setup-premake@v2.2
with:
version: "5.0.0-beta2"
- name: Generate project files - name: Generate project files
run: cmd /C call prebuild-windows.bat run: premake5 vs2022
- name: Set up problem matching - name: Set up problem matching
uses: ammaraskar/msvc-problem-matcher@master uses: ammaraskar/msvc-problem-matcher@master
@ -52,7 +62,7 @@ jobs:
name: Windows ${{matrix.configuration}} ${{matrix.arch}} binaries name: Windows ${{matrix.configuration}} ${{matrix.arch}} binaries
path: | path: |
build/bin/${{matrix.arch}}/${{matrix.configuration}}/gsc-tool.exe build/bin/${{matrix.arch}}/${{matrix.configuration}}/gsc-tool.exe
build/bin/${{matrix.arch}}/${{matrix.configuration}}/gsc-tool.pdb # build/bin/${{matrix.arch}}/${{matrix.configuration}}/gsc-tool.pdb
build-mac: build-mac:
name: Build macOS name: Build macOS
@ -83,8 +93,13 @@ jobs:
fetch-depth: 0 fetch-depth: 0
lfs: false lfs: false
- name: Add premake5 to PATH
uses: abel0b/setup-premake@v2.2
with:
version: "5.0.0-beta2"
- name: Generate project files - name: Generate project files
run: ./prebuild-macos.sh run: premake5 gmake2
- name: Set up problem matching - name: Set up problem matching
uses: ammaraskar/gcc-problem-matcher@master uses: ammaraskar/gcc-problem-matcher@master
@ -93,6 +108,7 @@ jobs:
run: | run: |
pushd build pushd build
make config=${{matrix.config}}_${{matrix.platform}} -j$(sysctl -n hw.logicalcpu) make config=${{matrix.config}}_${{matrix.platform}} -j$(sysctl -n hw.logicalcpu)
- name: Upload ${{matrix.configuration}} ${{matrix.arch}} binaries - name: Upload ${{matrix.configuration}} ${{matrix.arch}} binaries
uses: actions/upload-artifact@v3.1.2 uses: actions/upload-artifact@v3.1.2
with: with:
@ -119,15 +135,23 @@ jobs:
- arch: x64 - arch: x64
platform: x64 platform: x64
steps: steps:
- uses: rui314/setup-mold@staging
- name: Check out files - name: Check out files
uses: actions/checkout@v3.3.0 uses: actions/checkout@v3.3.0
with: with:
submodules: true submodules: true
fetch-depth: 0 fetch-depth: 0
lfs: false lfs: false
- name: Add mold to PATH
uses: rui314/setup-mold@staging
- name: Add premake5 to PATH
uses: abel0b/setup-premake@v2.2
with:
version: "5.0.0-beta2"
- name: Generate project files - name: Generate project files
run: ./prebuild-linux.sh run: premake5 gmake2
- name: Set up problem matching - name: Set up problem matching
uses: ammaraskar/gcc-problem-matcher@master uses: ammaraskar/gcc-problem-matcher@master

View File

@ -62,6 +62,12 @@ note: for PS3 & Xbox 360 `.gscbin` files *(compressedLen, len, bytecodeLen)* are
- treyarch (T6) format is a single buffer with gscobj data `.gsc` or `.csc`. - treyarch (T6) format is a single buffer with gscobj data `.gsc` or `.csc`.
## Build
- install [*premake5*](https://premake.github.io) on your system PATH
- clone this repository
- update the submodules ``git submodule update --init --recursive``
- run prebuild script ``premake5 vs2022`` (windows) or ``premake5 gmake2`` (linux/macos)
## Contribute ## Contribute
If you like my work, consider sponsoring/donating! Would allow me to spend more time adding new features & fixing bugs. If you like my work, consider sponsoring/donating! Would allow me to spend more time adding new features & fixing bugs.

View File

@ -1,3 +0,0 @@
#!/bin/bash
git submodule update --init --recursive
./tools/linux/premake5 gmake2

View File

@ -1,3 +0,0 @@
#!/bin/sh
git submodule update --init --recursive
./tools/macos/premake5 gmake2

View File

@ -1,3 +0,0 @@
@echo off
git submodule update --init --recursive
tools\windows\premake5.exe %* vs2022

Binary file not shown.

Binary file not shown.

Binary file not shown.