shithub: choc

Download patch

ref: dd0ad1b392af67ac4e02acdff2bce1c00c40915a
parent: ffeb096167f496a66e4288e8abd07ba621c55250
author: Bensuperpc <[email protected]>
date: Sat Nov 13 18:20:26 EST 2021

Update github CI

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

Signed-off-by: Bensuperpc <[email protected]>

--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -2,26 +2,37 @@
 
 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 @@
       - name: Run cppcheck
         env:
           ANALYZE: true
-        run: $GITHUB_WORKSPACE/.travis.sh
\ No newline at end of file
+        run: $GITHUB_WORKSPACE/.travis.sh