chore(build): improve workflows (#150)

This commit is contained in:
fallenoak 2025-12-27 12:52:27 -06:00 committed by GitHub
parent dcd2f7dc49
commit 8443ba863f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 41 additions and 31 deletions

View File

@ -4,39 +4,46 @@ on: [pull_request]
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }}
runs-on: ${{ matrix.build.os }}
strategy:
fail-fast: false
matrix:
config:
- name: Ubuntu Latest (GCC)
os: ubuntu-latest
build_type: Release
build:
- system_name: Linux
build_type: Debug
compiler_name: GCC
test_path: WhoaTest
os: ubuntu-latest
cc: gcc
cxx: g++
- name: macOS Latest (Clang)
os: macos-latest
build_type: Release
- system_name: macOS
build_type: Debug
compiler_name: Clang
test_path: WhoaTest
os: macos-latest
cc: clang
cxx: clang++
- name: Windows Latest (MSVC)
os: windows-latest
build_type: Release
- system_name: Windows
build_type: Debug
compiler_name: MSVC
test_path: WhoaTest
os: windows-latest
cc: cl
cxx: cl
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Install Dependencies (${{ matrix.build.os }})
run: sudo apt install -y lcov
if: matrix.build.os == 'ubuntu-latest'
- name: Download Fixtures
run: aws s3 cp --endpoint-url ${{ env.AWS_ENDPOINT_URL }} s3://reliquaryhq-whoa/fixture.tgz test/fixture/
env:
@ -52,17 +59,17 @@ jobs:
run: mkdir build
- name: Configure
run: cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }}
run: cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build.build_type }}
working-directory: build
- name: Build
run: cmake --build . --config ${{ matrix.config.build_type }}
run: cmake --build . --config ${{ matrix.build.build_type }}
working-directory: build
- name: Install
run: cmake --install . --config ${{ matrix.config.build_type }}
run: cmake --install . --config ${{ matrix.build.build_type }}
working-directory: build
- name: Test
run: ../../build/dist/bin/${{ matrix.config.test_path }}
run: ../../build/dist/bin/${{ matrix.build.test_path }}
working-directory: test/fixture

View File

@ -7,36 +7,39 @@ on:
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }}
runs-on: ${{ matrix.build.os }}
strategy:
fail-fast: false
matrix:
config:
- name: Ubuntu Latest (GCC)
os: ubuntu-latest
build:
- system_name: Linux
build_type: Release
compiler_name: GCC
test_path: WhoaTest
os: ubuntu-latest
cc: gcc
cxx: g++
- name: macOS Latest (Clang)
os: macos-latest
- system_name: macOS
build_type: Release
compiler_name: Clang
test_path: WhoaTest
os: macos-latest
cc: clang
cxx: clang++
- name: Windows Latest (MSVC)
os: windows-latest
- system_name: Windows
build_type: Release
compiler_name: MSVC
test_path: WhoaTest
os: windows-latest
cc: cl
cxx: cl
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6
with:
submodules: recursive
@ -55,17 +58,17 @@ jobs:
run: mkdir build
- name: Configure
run: cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }}
run: cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build.build_type }}
working-directory: build
- name: Build
run: cmake --build . --config ${{ matrix.config.build_type }}
run: cmake --build . --config ${{ matrix.build.build_type }}
working-directory: build
- name: Install
run: cmake --install . --config ${{ matrix.config.build_type }}
run: cmake --install . --config ${{ matrix.build.build_type }}
working-directory: build
- name: Test
run: ../../build/dist/bin/${{ matrix.config.test_path }}
run: ../../build/dist/bin/${{ matrix.build.test_path }}
working-directory: test/fixture