diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bac0e846..71463778 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,6 +8,11 @@ on: branches: - "**" types: [opened, synchronize, reopened] + +concurrency: + group: ${{ github.ref }} + cancel-in-progress: true + jobs: build-win: name: Build Windows @@ -37,8 +42,13 @@ jobs: - name: Add msbuild to PATH 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 - run: cmd /C call prebuild-windows.bat + run: premake5 vs2022 - name: Set up problem matching uses: ammaraskar/msvc-problem-matcher@master @@ -52,7 +62,7 @@ jobs: name: Windows ${{matrix.configuration}} ${{matrix.arch}} binaries path: | 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: name: Build macOS @@ -83,8 +93,13 @@ jobs: fetch-depth: 0 lfs: false + - name: Add premake5 to PATH + uses: abel0b/setup-premake@v2.2 + with: + version: "5.0.0-beta2" + - name: Generate project files - run: ./prebuild-macos.sh + run: premake5 gmake2 - name: Set up problem matching uses: ammaraskar/gcc-problem-matcher@master @@ -93,6 +108,7 @@ jobs: run: | pushd build make config=${{matrix.config}}_${{matrix.platform}} -j$(sysctl -n hw.logicalcpu) + - name: Upload ${{matrix.configuration}} ${{matrix.arch}} binaries uses: actions/upload-artifact@v3.1.2 with: @@ -119,15 +135,23 @@ jobs: - arch: x64 platform: x64 steps: - - uses: rui314/setup-mold@staging - name: Check out files uses: actions/checkout@v3.3.0 with: submodules: true fetch-depth: 0 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 - run: ./prebuild-linux.sh + run: premake5 gmake2 - name: Set up problem matching uses: ammaraskar/gcc-problem-matcher@master diff --git a/README.md b/README.md index d5b5b663..5452cea1 100644 --- a/README.md +++ b/README.md @@ -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`. +## 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 If you like my work, consider sponsoring/donating! Would allow me to spend more time adding new features & fixing bugs. diff --git a/prebuild-linux.sh b/prebuild-linux.sh deleted file mode 100755 index 25bca616..00000000 --- a/prebuild-linux.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -git submodule update --init --recursive -./tools/linux/premake5 gmake2 diff --git a/prebuild-macos.sh b/prebuild-macos.sh deleted file mode 100755 index 64ced334..00000000 --- a/prebuild-macos.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -git submodule update --init --recursive -./tools/macos/premake5 gmake2 diff --git a/prebuild-windows.bat b/prebuild-windows.bat deleted file mode 100644 index 198b6110..00000000 --- a/prebuild-windows.bat +++ /dev/null @@ -1,3 +0,0 @@ -@echo off -git submodule update --init --recursive -tools\windows\premake5.exe %* vs2022 diff --git a/tools/linux/premake5 b/tools/linux/premake5 deleted file mode 100755 index bcb51ced..00000000 Binary files a/tools/linux/premake5 and /dev/null differ diff --git a/tools/macos/premake5 b/tools/macos/premake5 deleted file mode 100755 index 48daa610..00000000 Binary files a/tools/macos/premake5 and /dev/null differ diff --git a/tools/windows/premake5.exe b/tools/windows/premake5.exe deleted file mode 100644 index 1a637aa9..00000000 Binary files a/tools/windows/premake5.exe and /dev/null differ