From 683fa2138f4783d51c84a99455aad74978832395 Mon Sep 17 00:00:00 2001 From: Edward Wall Date: Fri, 4 Jul 2025 14:35:07 +0200 Subject: [PATCH] adds gitea action --- .gitea/workflows/action.yaml | 21 +++++++++++++++ .gitlab-ci.yml | 51 ------------------------------------ 2 files changed, 21 insertions(+), 51 deletions(-) create mode 100644 .gitea/workflows/action.yaml delete mode 100644 .gitlab-ci.yml diff --git a/.gitea/workflows/action.yaml b/.gitea/workflows/action.yaml new file mode 100644 index 0000000..4d02668 --- /dev/null +++ b/.gitea/workflows/action.yaml @@ -0,0 +1,21 @@ +name: Test And Build +on: [push] + +jobs: + Lint: + runs-on: linepics + steps: + - name: checkout repo + uses: actions/checkout@v4 + - name: cppcheck + run: cppcheck --std=c++17 --addon=cert --addon=misc --error-exitcode=1 sinqEPICSApp/src/*.cpp + - name: formatting + run: clang-format --style=file --Werror --dry-run sinqEPICSApp/src/*.cpp sinqEPICSApp/src/*.c sinqEPICSApp/src/*.h + Build: + runs-on: linepics + steps: + - name: checkout repo + uses: actions/checkout@v4 + - run: | + sed -i 's/ARCH_FILTER=.*/ARCH_FILTER=linux%/' Makefile.RHEL8 + make -f Makefile.RHEL8 install diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index d36dc85..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,51 +0,0 @@ -default: - image: docker.psi.ch:5000/wall_e/sinqepics:latest - -stages: - - test - - build - -cppcheck: - stage: test - script: - - cppcheck --std=c++17 --addon=cert --addon=misc --error-exitcode=1 sinqEPICSApp/ - allow_failure: true # Long term this needs to be removed - artifacts: - expire_in: 1 week - tags: - - docker - -formatting: - stage: test - script: - - clang-format --style=file --Werror --dry-run sinqEPICSApp/src/*.cpp sinqEPICSApp/src/*.c sinqEPICSApp/src/*.h - allow_failure: true # Long term this needs to be removed - artifacts: - expire_in: 1 week - tags: - - docker - -# clangtidy: -# stage: test -# script: -# - curl https://docker.psi.ch:5000/v2/_catalog -# # - dnf update -y -# # - dnf install -y clang-tools-extra -# # - clang-tidy sinqEPICSApp/src/*.cpp sinqEPICSApp/src/*.c sinqEPICSApp/src/*.h -checks=cppcoreguidelines-*,cert-* -# # tags: -# # - docker - -build_module: - stage: build - script: - - sed -i 's/ARCH_FILTER=.*/ARCH_FILTER=linux%/' Makefile.RHEL8 - - make -f Makefile.RHEL8 install - - cp -rT "/ioc/modules/sinq/$(ls -U /ioc/modules/sinq/ | head -1)" "./sinq-${CI_COMMIT_SHORT_SHA}" - artifacts: - name: "sinq-${CI_COMMIT_SHORT_SHA}" - paths: - - "sinq-${CI_COMMIT_SHORT_SHA}/*" - expire_in: 1 week - when: always - tags: - - docker