whoa/.github/workflows/pr.yml

76 lines
2.0 KiB
YAML

name: PR
on: [pull_request]
jobs:
build:
name: ${{ matrix.build.os_name }} (${{ matrix.build.compiler_name }})
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- os_name: Ubuntu Latest
compiler_name: GCC
os: ubuntu-latest
build_type: Debug
test_path: WhoaTest
cc: gcc
cxx: g++
- os_name: macOS Latest
compiler_name: Clang
os: macos-latest
build_type: Debug
test_path: WhoaTest
cc: clang
cxx: clang++
- os_name: Windows Latest
compiler_name: MSVC
os: windows-latest
build_type: Debug
test_path: WhoaTest
cc: cl
cxx: cl
steps:
- uses: actions/checkout@v6
with:
submodules: recursive
- name: Install Dependencies (Ubuntu)
run: sudo apt install -y lcov
if: matrix.build.os_name == 'Ubuntu Latest'
- name: Download Fixtures
run: aws s3 cp --endpoint-url ${{ env.AWS_ENDPOINT_URL }} s3://reliquaryhq-whoa/fixture.tgz test/fixture/
env:
AWS_ACCESS_KEY_ID: ${{ secrets.STORAGE_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.STORAGE_AWS_SECRET_ACCESS_KEY }}
AWS_ENDPOINT_URL: ${{ vars.STORAGE_AWS_ENDPOINT_URL }}
- name: Unpack Fixtures
run: tar -xvzf fixture.tgz
working-directory: test/fixture
- name: Prepare
run: mkdir build
- name: Configure
run: cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }}
working-directory: build
- name: Build
run: cmake --build . --config ${{ matrix.config.build_type }}
working-directory: build
- name: Install
run: cmake --install . --config ${{ matrix.config.build_type }}
working-directory: build
- name: Test
run: ../../build/dist/bin/${{ matrix.config.test_path }}
working-directory: test/fixture