Skip to content

Commit 8945c6d

Browse files
authored
Merge pull request #181 from bensuperpc/improve_ci
Improve GitHub CI with additional build targets
2 parents 642d8e1 + 770b1f2 commit 8945c6d

File tree

1 file changed

+37
-12
lines changed

1 file changed

+37
-12
lines changed

.github/workflows/Tests.yml

Lines changed: 37 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,53 @@
1-
name: Tests
2-
3-
on: [push, pull_request]
1+
name: Build and tests
2+
3+
on:
4+
push:
5+
branches:
6+
- '*'
7+
paths-ignore:
8+
- '**/README.md'
9+
pull_request:
10+
branches:
11+
- '*'
12+
workflow_dispatch:
413

514
jobs:
6-
Test:
7-
8-
runs-on: ubuntu-20.04
15+
build:
16+
name: ${{ matrix.platform.os }} ${{ matrix.config.name }} ${{ matrix.type.name }}
17+
runs-on: ${{ matrix.platform.os }}
18+
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
platform:
23+
# - { name: Windows VS2019, os: windows-2019 }
24+
# - { name: Windows VS2022, os: windows-2022 }
25+
- { name: Linux GCC, os: ubuntu-20.04, flags: -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_CXX_STANDARD=17 }
26+
- { name: Linux Clang, os: ubuntu-20.04, flags: -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_STANDARD=17 }
27+
- { name: Linux GCC, os: ubuntu-18.04, flags: -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_CXX_STANDARD=14 }
28+
- { name: Linux Clang, os: ubuntu-18.04, flags: -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_STANDARD=14 }
29+
# - { name: MacOS XCode, os: macos-latest }
30+
config:
31+
- { name: Shared, flags: -DBUILD_SHARED_LIBS=TRUE }
32+
- { name: Static, flags: -DBUILD_SHARED_LIBS=FALSE }
33+
type:
34+
- { name: Release, flags: -DCMAKE_BUILD_TYPE=Release }
35+
- { name: Debug, flags: -DCMAKE_BUILD_TYPE=Debug }
936

1037
steps:
1138
- uses: actions/checkout@v2
1239
with:
1340
submodules: recursive
14-
15-
- name: Update Packages
16-
run: sudo apt-get update
1741

18-
- name: Install Dependencies
42+
- name: Install Linux Dependencies
43+
if: runner.os == 'Linux'
1944
run: sudo apt-get install xorg-dev libglu1-mesa-dev -y
2045

2146
- name: Configure
22-
run: cmake -B build .
47+
run: cmake -B build -S . -DBUILD_TESTING=ON -DCMAKE_CXX_FLAGS="-Wall -Wextra -Wpedantic" ${{ matrix.platform.flags }} ${{ matrix.type.flags }} ${{ matrix.config.flags }}
2348

2449
- name: Build
2550
run: cmake --build build
2651

2752
- name: Test
28-
run: ./build/tests/raylib_cpp_test
53+
run: ctest --verbose --test-dir build

0 commit comments

Comments
 (0)