From 22bb4cd866a12a6a0265c9144c741835ebf833fc Mon Sep 17 00:00:00 2001 From: Bart Louwers Date: Thu, 17 Oct 2024 18:04:37 +0200 Subject: [PATCH] add basic ci --- .github/workflows/ci.yml | 20 ++++++++++++++++++++ .pre-commit-config.yaml | 16 ++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 .pre-commit-config.yaml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..c722802 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,20 @@ +name: ci + +on: + push: + branches: + - main + + pull_request: + branches: + - main + +jobs: + ci: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: cmake -S . -B build + - run: cmake --build build + - run: build/test + - run: build/test_value diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..c83268c --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,16 @@ +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v5.0.0 + hooks: + - id: check-yaml + args: [--allow-multiple-documents] +- repo: https://github.com/pre-commit/mirrors-clang-format + rev: v19.1.1 + hooks: + - id: clang-format + files: '.*\.(hpp|cpp|h)' +- repo: https://github.com/Mateusz-Grzelinski/actionlint-py + rev: v1.7.3.17 + hooks: + - id: actionlint + additional_dependencies: [shellcheck-py]