From 0698081d7b1756dd799dd2d59e0972933055fa88 Mon Sep 17 00:00:00 2001 From: erki Date: Mon, 15 May 2023 20:55:21 +0000 Subject: [PATCH] Migrate over to gitea actions Co-authored-by: erki Reviewed-on: https://git.skullnet.me/erki/skullc-peripherals/pulls/2 --- .drone.yml | 28 ----------------------- .gitea/workflows/ci.yml | 30 +++++++++++++++++++++++++ Jenkinsfile | 50 ----------------------------------------- conanfile.txt | 5 ----- 4 files changed, 30 insertions(+), 83 deletions(-) delete mode 100644 .drone.yml create mode 100644 .gitea/workflows/ci.yml delete mode 100644 Jenkinsfile delete mode 100644 conanfile.txt diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index 8459a83..0000000 --- a/.drone.yml +++ /dev/null @@ -1,28 +0,0 @@ -kind: pipeline -type: docker -name: default - -steps: - - name: build and test - pull: never - image: erki/cpp-ubuntu:latest - commands: - - mkdir -p build - - cd build - - cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DWITH_TESTS=ON - - ninja - - ctest . --output-on-failure - - name: notify - image: plugins/matrix - settings: - homeserver: - from_secret: matrix_homeserver - roomid: - from_secret: matrix_roomid - username: - from_secret: matrix_username - password: - from_secret: matrix_password - when: - status: - - failure \ No newline at end of file diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 0000000..3a13f55 --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,30 @@ +name: CI & Unit Tests +run-name: CI & Unit Tests +on: [push, pull_request] + +jobs: + Unit-Tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Prepare environment + run: | + apt update + apt install -y --no-install-recommends build-essential cmake ninja-build + + - name: Configure build + working-directory: ${{runner.workspace}} + run: | + cmake . -B${{runner.workspace}}/build \ + -G"Ninja" \ + -DCMAKE_BUILD_TYPE=Release \ + -DSKULLC_WITH_TESTS=ON + + - name: Build tests + lib + working-directory: ${{runner.workspace}}/build + run: ninja + + - name: Run tests + working-directory: ${{runner.workspace}}/build + run: ctest . --output-on-failure diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index a5e0ff9..0000000 --- a/Jenkinsfile +++ /dev/null @@ -1,50 +0,0 @@ -pipeline { - agent { - label 'ubuntu' - } - - stages { - stage("build && test") { - steps { - echo "Workspace: ${env.WORKSPACE}" - sh 'mkdir -p build' - - dir("build") { - sh 'ls' - sh 'cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DSKULLC_WITH_TESTS=ON' - sh 'ninja' - sh 'ctest . -T test --output-on-failure --no-compress-output' - } - } - } - } - - post { - always { - archiveArtifacts ( - artifacts: 'build/Testing/**/*.xml', - fingerprint: true - ) - - // Process the CTest xml output with the xUnit plugin - xunit ( - testTimeMargin: '3000', - thresholdMode: 1, - thresholds: [ - skipped(failureThreshold: '0'), - failed(failureThreshold: '0') - ], - tools: [CTest( - pattern: 'build/Testing/**/*.xml', - deleteOutputFiles: true, - failIfNotNew: false, - skipNoTestFiles: true, - stopProcessingIfError: true - )] - ) - - // Clear the source and build dirs before next run - deleteDir() - } - } -} diff --git a/conanfile.txt b/conanfile.txt deleted file mode 100644 index e13ae86..0000000 --- a/conanfile.txt +++ /dev/null @@ -1,5 +0,0 @@ -[requires] -catch2/[>=2.0.0,<3.0.0] - -[generators] -cmake_find_package \ No newline at end of file