From abcf2535a508e140db5817a0f75cce823aeda705 Mon Sep 17 00:00:00 2001 From: Roman Pavelka Date: Fri, 14 Jul 2023 15:21:30 +0200 Subject: [PATCH] Add github actions with basic CI --- .github/workflows/learn-github-actions.yml | 26 ++++++++++++++++++++++ README.md | 1 + 2 files changed, 27 insertions(+) create mode 100644 .github/workflows/learn-github-actions.yml diff --git a/.github/workflows/learn-github-actions.yml b/.github/workflows/learn-github-actions.yml new file mode 100644 index 0000000..eda13e4 --- /dev/null +++ b/.github/workflows/learn-github-actions.yml @@ -0,0 +1,26 @@ +name: Build +on: + push: +jobs: + build-project: + runs-on: ubuntu-latest + strategy: + matrix: + build-tool: [make, ninja] + compiler: [g++, clang++] + steps: + - name: Checkout the repository + uses: actions/checkout@v3.5.3 + + - name: Configure the project + uses: threeal/cmake-action@v1.2.0 + with: + build-dir: submodules/out + generator: ${{ matrix.build-tool }} + cxx-compiler: ${{ matrix.compiler }} + + - name: Build the project + run: cmake --build build + + - name: Test the project + run: ctest --test-dir build diff --git a/README.md b/README.md index ff43f8d..5ddc9f2 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,7 @@ Check commits one-by-one as they: 1. start with not using CMake at all and building the thing using plain g++, 1. use the simplest CMake 1. Hide the growing complexity to Makefile +1. Adds configure, build and test to GitHub pipeline. ### TODO