Browse Source

Add some actions!

Manoël Trapier 2 years ago
parent
commit
c33cdabdec
1 changed files with 44 additions and 0 deletions
  1. 44 0
      .github/workflows/cmake.yml

+ 44 - 0
.github/workflows/cmake.yml

@@ -0,0 +1,44 @@
+name: CMake
+
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    branches: [ master ]
+
+env:
+  # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
+  BUILD_TYPE: Release
+
+jobs:
+  build:
+    runs-on: ${{ matrix.os }}
+    continue-on-error: ${{ matrix.allow_failure }}
+    strategy:
+      fail-fast: false
+      matrix:
+        os: [ ubuntu-18.04, ubuntu-20.04, ubuntu-latest, macos-latest ]
+        allow_failure: false
+        include:
+          - os: macos-latest
+            allow_failure: true
+
+    steps:
+    - uses: actions/checkout@v2
+      with:
+        submodule: true
+
+    - name: Configure CMake
+      run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
+
+    - name: Build
+      run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
+
+    - name: Test round 1
+      working-directory: ${{github.workspace}}/build
+      run: make test
+    
+    - name: Test round 2
+      working-directory: ${{github.workspace}}/build/tests
+      run: make test
+