chore(build): add pr workflow

This commit is contained in:
fallenoak 2020-12-01 17:29:58 -06:00
parent f3ed5627b5
commit 6126778dcb
No known key found for this signature in database
GPG key ID: 7628F8E61AEA070D

50
.github/workflows/pr.yml vendored Normal file
View file

@ -0,0 +1,50 @@
name: PR
on: pull_request
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- name: Ubuntu Latest (GCC)
os: ubuntu-latest
build_type: Release
test_path: TempestTest
cc: gcc
cxx: g++
- name: macOS Latest (Clang)
os: macos-latest
build_type: Release
test_path: TempestTest
cc: clang
cxx: clang++
- name: Windows Latest (MSVC)
os: windows-latest
build_type: Release
test_path: Release/TempestTest
cc: cl
cxx: cl
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Prepare
run: mkdir build
- name: Configure
run: cd build && cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }}
- name: Build
run: cmake --build build --config ${{ matrix.config.build_type }}
- name: Test
run: ./build/test/${{ matrix.config.test_path }}