use matrix instead

This commit is contained in:
coco875 2025-07-19 14:10:51 +02:00
parent 859835a162
commit 73a7938046
6 changed files with 27 additions and 131 deletions

View File

@ -1,53 +0,0 @@
name: Linux Validation (Debug)
on:
pull_request:
branches: [ "*" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
submodules: recursive
- name: Update machine
run: sudo apt update
- name: Install dependencies
run: sudo apt-get install gcc g++ git cmake ninja-build lsb-release libsdl2-dev libpng-dev libsdl2-net-dev libzip-dev zipcmp zipmerge ziptool nlohmann-json3-dev libtinyxml2-dev libspdlog-dev libboost-dev libopengl-dev libogg-dev libvorbis-dev
- name: Install latest SDL
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
wget https://www.libsdl.org/release/SDL2-2.24.1.tar.gz
tar -xzf SDL2-2.24.1.tar.gz
cd SDL2-2.24.1
./configure
make -j 10
sudo make install
- name: Install latest tinyxml2
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
wget https://github.com/leethomason/tinyxml2/archive/refs/tags/10.0.0.tar.gz
tar -xzf 10.0.0.tar.gz
cd tinyxml2-10.0.0
mkdir -p build
cd build
cmake ..
make
sudo make install
- name: Build
run: |
cmake -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE=Debug
cmake --build build-cmake -j --config Debug
- name: Create Package
run: |
mkdir spaghetti-release
mv build-cmake/Spaghettify spaghetti-release/
- name: Publish packaged artifacts
uses: actions/upload-artifact@v4
with:
name: spaghetti-linux-x64
path: spaghetti-release
retention-days: 1

View File

@ -7,6 +7,9 @@ on:
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy:
matrix:
config: [Release, Debug]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
@ -39,15 +42,15 @@ jobs:
sudo make install sudo make install
- name: Build - name: Build
run: | run: |
cmake -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE=Release cmake -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE=${{ matrix.config }}
cmake --build build-cmake -j --config Release cmake --build build-cmake -j --config ${{ matrix.config }}
- name: Create Package - name: Create Package
run: | run: |
mkdir spaghetti-release mkdir spaghetti-${{ matrix.config }}
mv build-cmake/Spaghettify spaghetti-release/ mv build-cmake/Spaghettify spaghetti-${{ matrix.config }}/
- name: Publish packaged artifacts - name: Publish packaged artifacts
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: spaghetti-linux-x64 name: spaghetti-linux-x64-${{ matrix.config }}
path: spaghetti-release path: spaghetti-${{ matrix.config }}
retention-days: 1 retention-days: 1

View File

@ -1,35 +0,0 @@
name: MacOS Validation (Debug)
on:
pull_request:
branches: [ "*" ]
jobs:
build:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
submodules: recursive
- name: Install dependencies
run: brew install ninja cmake
- name: Install vcpkg
uses: lukka/run-vcpkg@v11.5
with:
vcpkgDirectory: '${{ github.workspace }}/vcpkg'
- name: Build
run: |
cmake -H. -Bbuild-cmake -GNinja -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake
cmake --build build-cmake -j --config Debug
- name: Create Package
run: |
mkdir spaghetti-release
mv build-cmake/Spaghettify spaghetti-release/
- name: Publish packaged artifacts
uses: actions/upload-artifact@v4
with:
name: spaghetti-mac-universal
path: spaghetti-release
retention-days: 1

View File

@ -1,4 +1,4 @@
name: MacOS Validation (Release) name: MacOS Validation
on: on:
pull_request: pull_request:
@ -7,6 +7,9 @@ on:
jobs: jobs:
build: build:
runs-on: macOS-latest runs-on: macOS-latest
strategy:
matrix:
config: [Release, Debug]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
@ -21,15 +24,15 @@ jobs:
vcpkgDirectory: '${{ github.workspace }}/vcpkg' vcpkgDirectory: '${{ github.workspace }}/vcpkg'
- name: Build - name: Build
run: | run: |
cmake -H. -Bbuild-cmake -GNinja -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake cmake -H. -Bbuild-cmake -GNinja -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake
cmake --build build-cmake -j --config Release cmake --build build-cmake -j --config ${{ matrix.config }}
- name: Create Package - name: Create Package
run: | run: |
mkdir spaghetti-release mkdir spaghetti-${{ matrix.config }}
mv build-cmake/Spaghettify spaghetti-release/ mv build-cmake/Spaghettify spaghetti-${{ matrix.config }}/
- name: Publish packaged artifacts - name: Publish packaged artifacts
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: spaghetti-mac-universal name: spaghetti-mac-universal-${{ matrix.config }}
path: spaghetti-release path: spaghetti-${{ matrix.config }}
retention-days: 1 retention-days: 1

View File

@ -1,25 +0,0 @@
name: Windows Validation (Debug)
on:
pull_request:
branches: [ "*" ]
jobs:
build:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
submodules: recursive
- name: Build
run: |
cmake -S . -B "build/x64" -G "Visual Studio 17 2022" -T v143 -A x64 -DCMAKE_BUILD_TYPE=Debug
cmake --build ./build/x64 --config Debug --parallel 10
- name: Upload build
uses: actions/upload-artifact@v4
with:
name: spaghetti-windows
path: ./build/x64/Debug
retention-days: 1

View File

@ -1,4 +1,4 @@
name: Windows Validation (Release) name: Windows Validation
on: on:
pull_request: pull_request:
@ -7,6 +7,9 @@ on:
jobs: jobs:
build: build:
runs-on: windows-2022 runs-on: windows-2022
strategy:
matrix:
config: [Release, Debug]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
@ -15,11 +18,11 @@ jobs:
submodules: recursive submodules: recursive
- name: Build - name: Build
run: | run: |
cmake -S . -B "build/x64" -G "Visual Studio 17 2022" -T v143 -A x64 -DCMAKE_BUILD_TYPE=Release cmake -S . -B "build/x64" -G "Visual Studio 17 2022" -T v143 -A x64 -DCMAKE_BUILD_TYPE=${{ matrix.config }}
cmake --build ./build/x64 --config Release --parallel 10 cmake --build ./build/x64 --config ${{ matrix.config }} --parallel 10
- name: Upload build - name: Upload build
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: spaghetti-windows name: spaghetti-windows-${{ matrix.config }}
path: ./build/x64/Debug path: ./build/x64/${{ matrix.config }}
retention-days: 1 retention-days: 1