MarioDB/.woodpecker/default.yml
nyosic db567849bf
Some checks failed
ci/woodpecker/push/default Pipeline failed
Update .woodpecker/default.yml
2025-04-04 13:34:38 +00:00

42 lines
1.1 KiB
YAML

steps:
# Step 1: Build and Test the C++ Project
- name: build
image: gcc:latest
environment:
CC: gcc
CXX: g++
commands:
# Install CMake
- apt-get update && apt-get install -y cmake
# Cache CMake dependencies
- cmake -DCMAKE_BUILD_TYPE=Release -Bbuild -H.
- cmake --build build --target all
- ls -l build/main
# Run tests
- cd build && ctest --output-on-failure
# Create the release directory
- mkdir -p release
- cp /woodpecker/src/git.xyro.win/nyosic/MarioDB/build/main release/
# Step 3: Upload Release Artifact
- name: release
image: woodpeckerci/plugin-gitea-release
environment:
GITEA_URL: "https://git.xyro.win"
GITEA_TOKEN: "${GITEA_TOKEN}" # Make sure to set this secret in the Woodpecker UI
REPO_NAME: "MarioDB" # Replace with your actual repository name
TAG_NAME: "${CI_COMMIT_REF}" # Use the commit reference (tag name)
ASSET_PATH: "release/main" # Path to the compiled C++ binary
when:
branch:
- main # Trigger release only on the main branch
trigger:
event:
- push
- pull_request