build: cleanup CI workflow

This commit is contained in:
Diavolo 2024-01-12 11:55:14 +01:00
parent d4fad5d966
commit 9f68a0ed4b
No known key found for this signature in database
GPG Key ID: FA77F074E98D98A5
2 changed files with 25 additions and 39 deletions

View File

@ -21,8 +21,8 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
configuration: configuration:
- Debug - debug
- Release - release
arch: arch:
- x64 - x64
include: include:
@ -30,7 +30,7 @@ jobs:
platform: x64 platform: x64
steps: steps:
- name: Check out files - name: Check out files
uses: actions/checkout@v4 uses: actions/checkout@main
with: with:
submodules: true submodules: true
fetch-depth: 0 fetch-depth: 0
@ -38,7 +38,7 @@ jobs:
lfs: false lfs: false
- name: Add msbuild to PATH - name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.3.1 uses: microsoft/setup-msbuild@main
- name: Install Premake5 - name: Install Premake5
uses: abel0b/setup-premake@v2.3 uses: abel0b/setup-premake@v2.3
@ -51,13 +51,13 @@ 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.configuration}} binaries
run: msbuild /m /v:minimal /p:Configuration=${{matrix.configuration}} /p:Platform=${{matrix.platform}} build/alterware-master.sln run: msbuild /m /v:minimal /p:Configuration=${{matrix.configuration}} /p:Platform=${{matrix.platform}} build/alterware-master.sln
- name: Upload ${{matrix.configuration}} ${{matrix.arch}} binaries - name: Upload ${{matrix.arch}} ${{matrix.configuration}} binaries
uses: actions/upload-artifact@v3.1.3 uses: actions/upload-artifact@main
with: with:
name: Windows ${{matrix.configuration}} ${{matrix.arch}} binaries name: windows-${{matrix.arch}}-${{matrix.configuration}}
path: | path: |
build/bin/${{matrix.arch}}/${{matrix.configuration}}/alterware-master.exe build/bin/${{matrix.arch}}/${{matrix.configuration}}/alterware-master.exe
build/bin/${{matrix.arch}}/${{matrix.configuration}}/alterware-master.pdb build/bin/${{matrix.arch}}/${{matrix.configuration}}/alterware-master.pdb
@ -69,18 +69,13 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
configuration: configuration:
- Debug - debug
- Release - release
arch: arch:
- x64 - x64
include:
- configuration: Debug
config: debug
- configuration: Release
config: release
steps: steps:
- name: Check out files - name: Check out files
uses: actions/checkout@v4 uses: actions/checkout@main
with: with:
submodules: true submodules: true
fetch-depth: 0 fetch-depth: 0
@ -104,18 +99,18 @@ 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.configuration}} binaries
run: | run: |
pushd build pushd build
make config=${{matrix.config}}_${{matrix.arch}} -j$(nproc) make config=${{matrix.configuration}}_${{matrix.arch}} -j$(nproc)
env: env:
CC: clang CC: clang
CXX: clang++ CXX: clang++
- name: Upload ${{matrix.configuration}} ${{matrix.arch}} binaries - name: Upload ${{matrix.arch}} ${{matrix.configuration}} binaries
uses: actions/upload-artifact@v3.1.3 uses: actions/upload-artifact@main
with: with:
name: Linux ${{matrix.configuration}} ${{matrix.arch}} binaries name: linux-${{matrix.arch}}-${{matrix.configuration}}
path: | path: |
build/bin/${{matrix.arch}}/${{matrix.configuration}}/alterware-master build/bin/${{matrix.arch}}/${{matrix.configuration}}/alterware-master
@ -126,23 +121,14 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
configuration: configuration:
- Debug - 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@v4 uses: actions/checkout@main
with: with:
submodules: true submodules: true
fetch-depth: 0 fetch-depth: 0
@ -160,14 +146,14 @@ 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.configuration}} binaries
run: | run: |
pushd build pushd build
make config=${{matrix.config}}_${{matrix.arch}} -j$(sysctl -n hw.logicalcpu) make config=${{matrix.configuration}}_${{matrix.arch}} -j$(sysctl -n hw.logicalcpu)
- name: Upload ${{matrix.configuration}} ${{matrix.arch}} binaries - name: Upload ${{matrix.arch}} ${{matrix.configuration}} binaries
uses: actions/upload-artifact@v3.1.3 uses: actions/upload-artifact@main
with: with:
name: macOS ${{matrix.configuration}} ${{matrix.arch}} binaries name: macos-${{matrix.arch}}-${{matrix.configuration}}
path: | path: |
build/bin/${{matrix.arch}}/${{matrix.configuration}}/alterware-master build/bin/${{matrix.arch}}/${{matrix.configuration}}/alterware-master

View File

@ -36,7 +36,7 @@ location "./build"
objdir "%{wks.location}/obj" objdir "%{wks.location}/obj"
targetdir "%{wks.location}/bin/%{cfg.platform}/%{cfg.buildcfg}" targetdir "%{wks.location}/bin/%{cfg.platform}/%{cfg.buildcfg}"
configurations {"Debug", "Release"} configurations {"debug", "release"}
language "C++" language "C++"
cppdialect "C++20" cppdialect "C++20"