From 286c17c8bed7e8c450ffef10dffb4bfd02e7e2af Mon Sep 17 00:00:00 2001 From: lfierz Date: Mon, 6 May 2024 16:26:05 +0200 Subject: [PATCH] "create default driver github workflow" --- .github/workflows/arduino_quality_check.yml | 24 ++++++++++ .github/workflows/github_release.yml | 10 ++++ .gitlab-ci.yml | 52 --------------------- 3 files changed, 34 insertions(+), 52 deletions(-) create mode 100644 .github/workflows/arduino_quality_check.yml create mode 100644 .github/workflows/github_release.yml delete mode 100644 .gitlab-ci.yml diff --git a/.github/workflows/arduino_quality_check.yml b/.github/workflows/arduino_quality_check.yml new file mode 100644 index 0000000..f5b4be6 --- /dev/null +++ b/.github/workflows/arduino_quality_check.yml @@ -0,0 +1,24 @@ +name: Quality check + +on: + pull_request: + branches: + - master + push: + branches: + - master + +jobs: + arduino-quality: + uses: sensirion/.github/.github/workflows/driver.arduino.check.yml@main + with: + expect-arduino-examples: true + lint-lib-manager-check: update + + todo-check: + if: github.event_name == 'push' && github.ref != 'refs/head/master' + uses: sensirion/.github/.github/workflows/driver.common.todo_check.yml@main + + code-generation-check: + if: github.event_name == 'push' && github.ref != 'refs/head/master' + uses: sensirion/.github/.github/workflows/driver.generated.metadata_check.yml@main diff --git a/.github/workflows/github_release.yml b/.github/workflows/github_release.yml new file mode 100644 index 0000000..d98ee0e --- /dev/null +++ b/.github/workflows/github_release.yml @@ -0,0 +1,10 @@ +name: Github Release + +on: + push: + tags: + - '*' + +jobs: + github-release: + uses: sensirion/.github/.github/workflows/driver.common.github_release.yml@main diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 6c3dd76..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,52 +0,0 @@ -stages: - - validate - - test -compile_test: - stage: test - image: - name: registry.gitlab.sensirion.lokal/sensirion/docker/docker-arduino:0.4.0 - tags: [docker, linux] - before_script: - - rm -rf ../sensirion-core-arduino-library - script: - - git clone --depth 1 --branch 0.5.2 https://github.com/Sensirion/arduino-core.git ../sensirion-core-arduino-library - - arduino-cli compile --libraries=".." --warnings all --fqbn arduino:samd:mkrzero ./examples/exampleUsage/exampleUsage.ino - - arduino-cli compile --libraries=".." --warnings all --fqbn arduino:avr:mega ./examples/exampleUsage/exampleUsage.ino - - arduino-cli compile --libraries=".." --warnings all --fqbn esp32:esp32:esp32 ./examples/exampleUsage/exampleUsage.ino - - arduino-cli compile --libraries=".." --warnings all --fqbn esp8266:esp8266:generic ./examples/exampleUsage/exampleUsage.ino - -arduino_lint: - stage: validate - image: - name: registry.gitlab.sensirion.lokal/mso-sw/drivers/docker-driver-generator:0.2.0 - tags: [linux, docker] - script: - - mkdir ~/arlint - - PATH=~/arlint:$PATH - - curl -fsSL https://raw.githubusercontent.com/arduino/arduino-lint/main/etc/install.sh | BINDIR=~/arlint sh - - arduino-lint --library-manager false - -syntax_check: - stage: validate - image: - name: registry.gitlab.sensirion.lokal/mso-sw/drivers/docker-driver-generator:0.2.0 - tags: [linux, docker] - script: - - find . -type f -iregex ".*\.\(c\|h\|cpp\|ino\)" -exec clang-format-6.0 -i -style=file {} \; && git diff --exit-code - - -cppcheck: - stage: validate - image: - name: registry.gitlab.sensirion.lokal/mso-sw/drivers/docker-driver-generator:0.2.0 - tags: [linux, docker] - script: - - cppcheck --std=c++11 --language=c++ --error-exitcode=1 --enable=warning,style,performance,portability src/* - -TODO_check: - stage: validate - image: - name: registry.gitlab.sensirion.lokal/mso-sw/drivers/docker-driver-generator:0.2.0 - tags: [linux, docker] - script: - - '! grep -rnw --exclude=.gitlab-ci.yml --exclude-dir=.git . -e "TODO"' \ No newline at end of file