102 lines
2.5 KiB
YAML
102 lines
2.5 KiB
YAML
---
|
|
kind: pipeline
|
|
name: default
|
|
|
|
platform:
|
|
os: linux
|
|
arch: amd64
|
|
|
|
steps:
|
|
- name: build-alpine
|
|
image: nephatrine/nxbuilder:alpine
|
|
commands:
|
|
- mkdir build-alpine
|
|
- cd build-alpine
|
|
- cmake -GNinja -DNXPACKAGE_TRIPLET="x86_64-alpine-linux-musl" -DQ2ADMIN_NAME="game" ..
|
|
- ninja concord && ninja
|
|
- tar -czvf q2admin-nxmod_x86_64-alpine-linux-musl.tar.gz game.so
|
|
- cd ../data
|
|
- tar -czvf ../build-alpine/q2admin-nxmod_noarch.tar.gz *.txt *.json
|
|
- name: build-ubuntu
|
|
image: nephatrine/nxbuilder:ubuntu-multilib
|
|
commands:
|
|
- mkdir build-ubuntu
|
|
- cd build-ubuntu
|
|
- cmake -GNinja -DNXPACKAGE_TRIPLET="x86_64-ubuntu-linux-gnu" -DQ2ADMIN_NAME="game" ..
|
|
- ninja concord && ninja
|
|
- tar -czvf q2admin-nxmod_x86_64-ubuntu-linux-gnu.tar.gz game.so
|
|
- name: build-redhat
|
|
image: nephatrine/nxbuilder:almalinux
|
|
commands:
|
|
- mkdir build-redhat
|
|
- cd build-redhat
|
|
- cmake -GNinja -DNXPACKAGE_TRIPLET="x86_64-redhat-linux-gnu" -DQ2ADMIN_NAME="game" ..
|
|
- ninja concord && ninja
|
|
- tar -czvf q2admin-nxmod_x86_64-redhat-linux-gnu.tar.gz game.so
|
|
- name: publish-web
|
|
image: nephatrine/nxbuilder:alpine
|
|
environment:
|
|
WEBDAV_BASEURL: "files.nephatrine.net"
|
|
WEBDAV_USERNAME:
|
|
from_secret: webdav-user
|
|
WEBDAV_PASSWORD:
|
|
from_secret: webdav-pass
|
|
commands:
|
|
- webdav-publish archives build-alpine/*.tar.gz build-redhat/*.tar.gz build-ubuntu/*.tar.gz
|
|
depends_on:
|
|
- build-alpine
|
|
- build-redhat
|
|
- build-ubuntu
|
|
when:
|
|
branch:
|
|
- master
|
|
event:
|
|
exclude:
|
|
- pull_request
|
|
- name: publish-gitea
|
|
image: nephatrine/nxbuilder:alpine
|
|
environment:
|
|
GITEA_BASE: "https://code.nephatrine.net/api/v1"
|
|
GITEA_TOKEN:
|
|
from_secret: gitea-api
|
|
commands:
|
|
- gitea-publish build-alpine/*.tar.gz build-redhat/*.tar.gz build-ubuntu/*.tar.gz
|
|
depends_on:
|
|
- build-alpine
|
|
- build-redhat
|
|
- build-ubuntu
|
|
when:
|
|
event:
|
|
- tag
|
|
|
|
---
|
|
kind: pipeline
|
|
name: notify
|
|
|
|
steps:
|
|
- name: notify-status
|
|
image: appleboy/drone-discord
|
|
failure: ignore
|
|
settings:
|
|
avatar_url: https://nephatrine.net/images/buttons/drone-ci.png
|
|
message: "Build of **[{{repo.name}}:{{commit.branch}}](<https://code.nephatrine.net/nephatrine/{{repo.name}}/src/branch/{{commit.branch}}>)** returned [{{build.status}}](<{{build.link}}>)."
|
|
username: DroneCI
|
|
webhook_id:
|
|
from_secret: wh-quake2-id
|
|
webhook_token:
|
|
from_secret: wh-quake2-tok
|
|
|
|
depends_on:
|
|
- default
|
|
|
|
trigger:
|
|
status:
|
|
- success
|
|
- failure
|
|
|
|
---
|
|
kind: signature
|
|
hmac: 44d81da907d41e63b6d0fe5c3392c74a31d7ce3111f61d94c3df9349bb853daf
|
|
|
|
...
|