parent
4973ceceb1
commit
3ac5ce54d5
75
.github/workflows/build.yml
vendored
75
.github/workflows/build.yml
vendored
@ -16,14 +16,13 @@ concurrency:
|
|||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-win:
|
build-windows:
|
||||||
name: Build Windows
|
name: Build Windows
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
configuration:
|
config:
|
||||||
- debug
|
|
||||||
- release
|
- release
|
||||||
arch:
|
arch:
|
||||||
- x86
|
- x86
|
||||||
@ -35,7 +34,7 @@ jobs:
|
|||||||
platform: x64
|
platform: x64
|
||||||
steps:
|
steps:
|
||||||
- name: Check out files
|
- name: Check out files
|
||||||
uses: actions/checkout@v3.3.0
|
uses: actions/checkout@v3.5.3
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
@ -55,40 +54,30 @@ jobs:
|
|||||||
- name: Set up problem matching
|
- name: Set up problem matching
|
||||||
uses: ammaraskar/msvc-problem-matcher@master
|
uses: ammaraskar/msvc-problem-matcher@master
|
||||||
|
|
||||||
- name: Build ${{matrix.configuration}} ${{matrix.arch}} binaries
|
- name: Build ${{matrix.arch}} ${{matrix.config}} binaries
|
||||||
run: msbuild /m /v:minimal /p:Configuration=${{matrix.configuration}} /p:Platform=${{matrix.platform}} build/gsc-tool.sln
|
run: msbuild /m /v:minimal /p:Configuration=${{matrix.config}} /p:Platform=${{matrix.platform}} build/gsc-tool.sln
|
||||||
|
|
||||||
- name: Upload ${{matrix.configuration}} ${{matrix.arch}} binaries
|
- name: Upload ${{matrix.arch}} ${{matrix.config}} binaries
|
||||||
uses: actions/upload-artifact@v3.1.2
|
uses: actions/upload-artifact@v3.1.2
|
||||||
with:
|
with:
|
||||||
name: Windows ${{matrix.configuration}} ${{matrix.arch}} binaries
|
name: windows-${{matrix.arch}}-${{matrix.config}}
|
||||||
path: |
|
path: |
|
||||||
build/bin/${{matrix.arch}}/${{matrix.configuration}}/gsc-tool.exe
|
build/bin/${{matrix.arch}}/${{matrix.config}}/gsc-tool.exe
|
||||||
|
|
||||||
build-mac:
|
build-macos:
|
||||||
name: Build macOS
|
name: Build macOS
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
configuration:
|
config:
|
||||||
- debug
|
|
||||||
- release
|
- release
|
||||||
arch:
|
arch:
|
||||||
- x64
|
- x64
|
||||||
- ARM64
|
- arm64
|
||||||
include:
|
|
||||||
- configuration: debug
|
|
||||||
config: debug
|
|
||||||
- configuration: release
|
|
||||||
config: release
|
|
||||||
- arch: x64
|
|
||||||
platform: x64
|
|
||||||
- arch: ARM64
|
|
||||||
platform: arm64
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out files
|
- name: Check out files
|
||||||
uses: actions/checkout@v3.3.0
|
uses: actions/checkout@v3.5.3
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
@ -105,39 +94,31 @@ jobs:
|
|||||||
- name: Set up problem matching
|
- name: Set up problem matching
|
||||||
uses: ammaraskar/gcc-problem-matcher@master
|
uses: ammaraskar/gcc-problem-matcher@master
|
||||||
|
|
||||||
- name: Build ${{matrix.configuration}} ${{matrix.arch}} binaries
|
- name: Build ${{matrix.arch}} ${{matrix.config}} binaries
|
||||||
run: |
|
run: |
|
||||||
pushd build
|
pushd build
|
||||||
make config=${{matrix.config}}_${{matrix.platform}} -j$(sysctl -n hw.logicalcpu)
|
make config=${{matrix.config}}_${{matrix.arch}} -j$(sysctl -n hw.logicalcpu)
|
||||||
|
|
||||||
- name: Upload ${{matrix.configuration}} ${{matrix.arch}} binaries
|
- name: Upload ${{matrix.arch}} ${{matrix.config}} binaries
|
||||||
uses: actions/upload-artifact@v3.1.2
|
uses: actions/upload-artifact@v3.1.2
|
||||||
with:
|
with:
|
||||||
name: macOS ${{matrix.configuration}} ${{matrix.arch}} binaries
|
name: macos-${{matrix.arch}}-${{matrix.config}}
|
||||||
path: |
|
path: |
|
||||||
build/bin/${{matrix.platform}}/${{matrix.configuration}}/gsc-tool
|
build/bin/${{matrix.arch}}/${{matrix.config}}/gsc-tool
|
||||||
|
|
||||||
build-lin:
|
build-linux:
|
||||||
name: Build Linux
|
name: Build Linux
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
configuration:
|
config:
|
||||||
- debug
|
|
||||||
- release
|
- release
|
||||||
arch:
|
arch:
|
||||||
- x64
|
- x64
|
||||||
include:
|
|
||||||
- configuration: debug
|
|
||||||
config: debug
|
|
||||||
- configuration: release
|
|
||||||
config: release
|
|
||||||
- arch: x64
|
|
||||||
platform: x64
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out files
|
- name: Check out files
|
||||||
uses: actions/checkout@v3.3.0
|
uses: actions/checkout@v3.5.3
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
@ -157,7 +138,7 @@ jobs:
|
|||||||
- name: Set up problem matching
|
- name: Set up problem matching
|
||||||
uses: ammaraskar/gcc-problem-matcher@master
|
uses: ammaraskar/gcc-problem-matcher@master
|
||||||
|
|
||||||
- name: Build ${{matrix.configuration}} ${{matrix.arch}} binaries
|
- name: Build ${{matrix.arch}} ${{matrix.config}} binaries
|
||||||
run: |
|
run: |
|
||||||
pushd build
|
pushd build
|
||||||
make config=${{matrix.config}}_${{matrix.arch}} -j$(nproc)
|
make config=${{matrix.config}}_${{matrix.arch}} -j$(nproc)
|
||||||
@ -165,26 +146,26 @@ jobs:
|
|||||||
CC: clang
|
CC: clang
|
||||||
CXX: clang++
|
CXX: clang++
|
||||||
|
|
||||||
- name: Upload ${{matrix.configuration}} ${{matrix.arch}} binaries
|
- name: Upload ${{matrix.arch}} ${{matrix.config}} binaries
|
||||||
uses: actions/upload-artifact@v3.1.2
|
uses: actions/upload-artifact@v3.1.2
|
||||||
with:
|
with:
|
||||||
name: Linux ${{matrix.configuration}} ${{matrix.arch}} binaries
|
name: linux-${{matrix.arch}}-${{matrix.config}}
|
||||||
path: |
|
path: |
|
||||||
build/bin/${{matrix.platform}}/${{matrix.configuration}}/gsc-tool
|
build/bin/${{matrix.arch}}/${{matrix.config}}/gsc-tool
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
name: Deploy Release
|
name: Deploy Release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [ build-win, build-mac, build-lin ]
|
needs: [ build-windows, build-macos, build-linux ]
|
||||||
if: startsWith(github.ref, 'refs/tags/') && (github.event.base_ref == 'refs/heads/prod' || github.event.base_ref == 'refs/heads/dev')
|
if: startsWith(github.ref, 'refs/tags/') && (github.event.base_ref == 'refs/heads/prod' || github.event.base_ref == 'refs/heads/dev')
|
||||||
steps:
|
steps:
|
||||||
- name: Check out files
|
- name: Check out files
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3.5.3
|
||||||
|
|
||||||
- name: Download Binaries
|
- name: Download Binaries
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3.0.2
|
||||||
with:
|
with:
|
||||||
name: Windows release x64 binaries
|
name: windows-x64-release
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
uses: "marvinpinto/action-automatic-releases@latest"
|
uses: "marvinpinto/action-automatic-releases@latest"
|
||||||
|
17
premake5.lua
17
premake5.lua
@ -84,10 +84,10 @@ workspace "gsc-tool"
|
|||||||
|
|
||||||
configurations { "debug", "release" }
|
configurations { "debug", "release" }
|
||||||
|
|
||||||
if os.istarget("darwin") then
|
if os.istarget("linux") or os.istarget("darwin") then
|
||||||
platforms { "x64", "arm64" }
|
platforms { "x64", "arm64" }
|
||||||
else
|
else
|
||||||
platforms { "x86", "x64" }
|
platforms { "x86", "x64", "arm64" }
|
||||||
end
|
end
|
||||||
|
|
||||||
filter "platforms:x86"
|
filter "platforms:x86"
|
||||||
@ -116,10 +116,6 @@ workspace "gsc-tool"
|
|||||||
systemversion "latest"
|
systemversion "latest"
|
||||||
filter {}
|
filter {}
|
||||||
|
|
||||||
filter { "system:macosx" }
|
|
||||||
systemversion "12.0"
|
|
||||||
filter {}
|
|
||||||
|
|
||||||
symbols "On"
|
symbols "On"
|
||||||
staticruntime "On"
|
staticruntime "On"
|
||||||
warnings "Extra"
|
warnings "Extra"
|
||||||
@ -129,9 +125,16 @@ workspace "gsc-tool"
|
|||||||
linkoptions "-pthread"
|
linkoptions "-pthread"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if os.istarget("darwin") then
|
||||||
|
filter "platforms:arm64"
|
||||||
|
buildoptions "-arch arm64"
|
||||||
|
linkoptions "-arch arm64"
|
||||||
|
filter {}
|
||||||
|
end
|
||||||
|
|
||||||
filter "configurations:release"
|
filter "configurations:release"
|
||||||
optimize "Full"
|
optimize "Full"
|
||||||
defines { "NDEBUG" }
|
defines "NDEBUG"
|
||||||
flags { "FatalCompileWarnings" }
|
flags { "FatalCompileWarnings" }
|
||||||
filter {}
|
filter {}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user