Add C/.woodpecker.yaml
This commit is contained in:
parent
c87c751cfa
commit
ea853279be
1 changed files with 64 additions and 0 deletions
64
C/.woodpecker.yaml
Normal file
64
C/.woodpecker.yaml
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
steps:
|
||||||
|
- name: Build
|
||||||
|
image: alpine
|
||||||
|
commands:
|
||||||
|
- apk add --no-cache g++ libc-dev
|
||||||
|
- mkdir -p build
|
||||||
|
- echo "Building project..."
|
||||||
|
- g++ -O2 -static -o build/main main.cpp
|
||||||
|
- chmod +x build/main
|
||||||
|
|
||||||
|
- name: Check Static
|
||||||
|
image: alpine
|
||||||
|
commands:
|
||||||
|
- apk add --no-cache file
|
||||||
|
- file build/main
|
||||||
|
- ldd build/main || echo "Static binary - no dynamic dependencies"
|
||||||
|
depends_on:
|
||||||
|
- Build
|
||||||
|
|
||||||
|
- name: Test-Debian
|
||||||
|
image: debian:bullseye
|
||||||
|
commands:
|
||||||
|
- apt-get update && apt-get install -y ca-certificates
|
||||||
|
- ./build/main
|
||||||
|
depends_on:
|
||||||
|
- Build
|
||||||
|
|
||||||
|
- name: discord notification
|
||||||
|
image: appleboy/drone-discord
|
||||||
|
settings:
|
||||||
|
webhook_id: 1357683988373704824
|
||||||
|
webhook_token:
|
||||||
|
from_secret: WEBHOOK_TOKEN
|
||||||
|
message: >
|
||||||
|
{{#success build.status}}
|
||||||
|
build {{build.number}} succeeded. Good job.
|
||||||
|
{{else}}
|
||||||
|
build {{build.number}} failed. Fix me please.
|
||||||
|
{{/success}}
|
||||||
|
when:
|
||||||
|
status: [success, failure]
|
||||||
|
|
||||||
|
- name: Confirm-Build
|
||||||
|
image: alpine
|
||||||
|
commands:
|
||||||
|
- ls -al build
|
||||||
|
- echo "Build is mint!"
|
||||||
|
depends_on:
|
||||||
|
- Build
|
||||||
|
- Test-Debian
|
||||||
|
|
||||||
|
- name: Release
|
||||||
|
image: plugins/gitea-release
|
||||||
|
settings:
|
||||||
|
api_key:
|
||||||
|
from_secret: FORGEJO_TOKEN
|
||||||
|
base_url: https://git.xyro.win
|
||||||
|
repo_owner: nyosic
|
||||||
|
repo_name: MarioDB
|
||||||
|
files: build/main
|
||||||
|
depends_on:
|
||||||
|
- Confirm-Build
|
||||||
|
when:
|
||||||
|
event: tag
|
Loading…
Add table
Reference in a new issue