Skip to content

Commit

Permalink
Test demo and gtest with all supported compilers
Browse files Browse the repository at this point in the history
  • Loading branch information
kwesolowski committed Jun 20, 2022
1 parent 39bc3c3 commit 7ef6a23
Showing 1 changed file with 67 additions and 10 deletions.
77 changes: 67 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: CI
on:
on:
push:
branches:
- master
Expand All @@ -19,9 +19,36 @@ jobs:
repository: rainlabs/cmake-quality-action
tag_with_ref: true

test-action-demo:
name: "Test action with local demo project"
test-action-demo-clang:
name: "Test action with local demo project on Clang ${{ matrix.version }}"
needs: build-docker

strategy:
matrix:
version: [11, 12, 13] #14 is broken :(

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
with:
path: action
- uses: actions/checkout@main
with:
path: demo
- uses: ./action/
with:
cmake_configure_environment: "CC=clang-${{ matrix.version }} CXX=clang++-${{ matrix.version }}"
source_directory: demo
build_directory: demo-out

test-action-demo-gcc:
name: "Test action with local demo project on GCC"
needs: build-docker

strategy:
matrix:
version: [9, 10, 11, 12]

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
Expand All @@ -32,14 +59,45 @@ jobs:
path: demo
- uses: ./action/
with:
dependencies: clang-8 clang-9
cmake_configure_environment: "CC=clang-9 CXX=clang++-9"
cmake_configure_environment: "CC=gcc-${{ matrix.version }} CXX=g++-${{ matrix.version }}"
source_directory: demo
build_directory: demo-out

test-action-googletest:
name: "Test action with google test"
test-action-googletest-clang:
name: "Test action with google test on Clang"
needs: build-docker

strategy:
matrix:
version: [11, 12, 13] #14 is broken :(

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
with:
path: action
- uses: actions/checkout@main
with:
repository: google/googletest
path: googletest
- uses: ./action/
with:
cmake_configure_environment: "CC=clang-${{ matrix.version }} CXX=clang++-${{ matrix.version }}"
source_directory: googletest
build_directory: googletest-out
cmake_configure_extra_args: "-Dgmock_build_tests=ON"
ctest_enable: true
cmake_install_enable: true
cmake_install_directory: googletest-install

test-action-googletest-gcc:
name: "Test action with google test on GCC"
needs: build-docker

strategy:
matrix:
version: [9, 10, 11, 12]

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
Expand All @@ -48,11 +106,10 @@ jobs:
- uses: actions/checkout@main
with:
repository: google/googletest
path: googletest
path: googletest
- uses: ./action/
with:
dependencies: clang-8 clang-9
cmake_configure_environment: "CC=clang-9 CXX=clang++-9"
cmake_configure_environment: "CC=gcc-${{ matrix.version }} CXX=g++-${{ matrix.version }}"
source_directory: googletest
build_directory: googletest-out
cmake_configure_extra_args: "-Dgmock_build_tests=ON"
Expand Down

0 comments on commit 7ef6a23

Please sign in to comment.