foxygit / doom Log in
commit dd0ad1b392af67ac4e02acdff2bce1c00c40915a
Author:     Bensuperpc <bensuperpc@gmail.com>
AuthorDate: Sat Nov 13 23:20:26 2021 +0100
Commit:     Bensuperpc <bensuperpc@gmail.com>
CommitDate: Sat Nov 13 23:20:26 2021 +0100

    Update github CI

    Add ubuntu-20.04 in CI
    Add CMake build test in CI

    Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
---
 .github/workflows/main.yml | 21 ++++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)

diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index fe4d3848..c19d5ed9 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -2,26 +2,37 @@ name: Chocolate Doom

 on:
   push:
-    branches: [ master ]
+    branches:
+      - "*"
+    paths-ignore:
+      - "**.md"
   pull_request:
-    branches: [ master ]
+    branches:
+      - "*"
+  workflow_dispatch:

 jobs:
   build:
-    runs-on: ubuntu-18.04
+    runs-on: ${{ matrix.os }}

     strategy:
       matrix:
         compiler: [clang, gcc]
+        os: [ubuntu-18.04, ubuntu-20.04]

     steps:
       - name: Install dependencies
-        run: sudo apt-get update && sudo apt-get install libpng-dev libsamplerate0-dev libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-net-dev
+        run: sudo apt-get update && sudo apt-get install libpng-dev libsamplerate0-dev libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-net-dev ninja-build

       - uses: actions/checkout@v2
         with:
           submodules: true

+      - name: CMake
+        env:
+          CC: ${{ matrix.compiler }}
+        run: cmake -S . -B build -G Ninja && ninja -C build
+
       - name: Make
         env:
           CC: ${{ matrix.compiler }}
@@ -41,4 +52,4 @@ jobs:
       - name: Run cppcheck
         env:
           ANALYZE: true
-        run: $GITHUB_WORKSPACE/.travis.sh
\ No newline at end of file
+        run: $GITHUB_WORKSPACE/.travis.sh