From 8ad6e1c35868965651b583011c63b264b049f841 Mon Sep 17 00:00:00 2001 From: Fred Emmott Date: Sat, 6 Jun 2020 18:35:18 -0700 Subject: [PATCH] Add CI --- .github/workflows/ci.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..28bd05a --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,35 @@ +name: Continuous Integration +on: [push, pull_request] +jobs: + build: + name: ${{matrix.os}}/${{matrix.build-type}} + runs-on: ${{matrix.os}}-latest + steps: + - uses: actions/checkout@v2 + - name: Make build directory + run: cmake -E make_directory build + - name: Configure + working-directory: build + run: | + cmake ../Sources \ + -DCMAKE_BUILD_TYPE=${{matrix.build-type}} + shell: bash + - name: Compile + working-directory: build + run: cmake --build . --config ${{matrix.build-type}} + - name: Upload binary (Mac) + if: matrix.os == 'macos' + uses: actions/upload-artifact@v2 + with: + name: cpu-${{matrix.build-type}} + path: build/cpu + - name: Upload binary (Windows) + if: matrix.os == 'windows' + uses: actions/upload-artifact@v2 + with: + name: cpu-${{matrix.build-type}}.exe + path: build/${{matrix.build-type}}/cpu.exe + strategy: + matrix: + os: [windows, macos] + build-type: [Release, Debug]