diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..705318f --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,48 @@ +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: StormTest + cc: gcc + cxx: g++ + + - name: macOS Latest (Clang) + os: macos-latest + build_type: Release + test_path: StormTest + cc: clang + cxx: clang++ + + - name: Windows Latest (MSVC) + os: windows-latest + build_type: Release + test_path: Release/StormTest + cc: cl + cxx: cl + + steps: + - uses: actions/checkout@v2 + + - 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 }}