From 9bce5bb39fc1f30211470b010f74e8050ba021b2 Mon Sep 17 00:00:00 2001 From: nyosic Date: Fri, 4 Apr 2025 12:47:47 +0000 Subject: [PATCH] Update .woodpecker/default.yml --- .woodpecker/default.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.woodpecker/default.yml b/.woodpecker/default.yml index 0da3ceb..5602c68 100644 --- a/.woodpecker/default.yml +++ b/.woodpecker/default.yml @@ -1,5 +1,6 @@ -pipeline: - build: +# .woodpecker.yml +steps: + - name: Build the C++ project image: gcc:13 # Replace with clang or another version if needed environment: BUILD_DIR: build @@ -14,7 +15,7 @@ pipeline: - echo "[*] Building project" - make -j$(nproc) - test: + - name: Run tests image: gcc:13 environment: BUILD_DIR: build @@ -23,27 +24,27 @@ pipeline: - cd $BUILD_DIR - ctest --output-on-failure || echo "[!] Some tests failed" - format-check: + - name: Check code formatting image: gcc:13 commands: - apt-get update && apt-get install -y clang-format - echo "[*] Checking code formatting..." - find . -name '*.cpp' -o -name '*.hpp' -o -name '*.h' | xargs clang-format --dry-run --Werror - cache: + - name: Cache build directory image: alpine settings: paths: - build - release: + - name: Create release in Gitea image: woodpeckerci/plugin-gitea-release when: event: - tag # Trigger only on tags environment: GITEA_URL: "https://git.xyro.win" - GITEA_TOKEN: "${GITEA_TOKEN}" # Make sure to set this secret - REPO_NAME: "my-repo" # Set your repo name - TAG_NAME: "${CI_COMMIT_REF}" # Use the tag name as the version - ASSET_PATH: "build/my-cpp-program" # The compiled C++ binary + GITEA_TOKEN: "${GITEA_TOKEN}" # Make sure to set this secret in the Woodpecker UI + REPO_NAME: "my-repo" # Replace with your actual repository name + TAG_NAME: "${CI_COMMIT_REF}" # Use the commit reference (tag name) + ASSET_PATH: "build/my-cpp-program" # Path to the compiled C++ binary