2020-02-16 02:20:12 +00:00
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: default
|
|
|
|
|
|
|
|
steps:
|
2021-02-24 21:17:58 +00:00
|
|
|
- name: build-shared
|
2021-02-24 21:05:36 +00:00
|
|
|
image: arminfriedl/xwim-build:shared
|
2020-02-16 02:20:12 +00:00
|
|
|
commands:
|
2022-06-25 17:12:12 +00:00
|
|
|
- meson wrap install gtest || true
|
2021-02-24 21:17:58 +00:00
|
|
|
- meson target/shared
|
2021-02-24 21:05:36 +00:00
|
|
|
- ninja -C target/shared
|
2021-02-25 18:44:25 +00:00
|
|
|
- mv target/shared/src/xwim xwim-x86_64-glibc-linux-shared
|
2021-02-24 21:05:36 +00:00
|
|
|
|
|
|
|
- name: build-static
|
|
|
|
image: arminfriedl/xwim-build:static
|
|
|
|
commands:
|
2022-06-25 17:12:12 +00:00
|
|
|
- meson wrap install gtest || true
|
2021-02-24 21:17:58 +00:00
|
|
|
- meson --default-library=static target/static
|
2021-02-24 21:05:36 +00:00
|
|
|
- ninja -C target/static
|
2021-02-25 18:44:25 +00:00
|
|
|
- mv target/static/src/xwim xwim-x86_64-musl-linux-static
|
|
|
|
|
|
|
|
- name: publish-binaries
|
|
|
|
image: appleboy/drone-scp
|
|
|
|
settings:
|
|
|
|
host: friedl.net
|
|
|
|
username:
|
|
|
|
from_secret: deploy_user
|
|
|
|
password:
|
|
|
|
from_secret: deploy_password
|
|
|
|
port: 22
|
|
|
|
target: /var/services/dirlist/repo/cicd/xwim/${DRONE_COMMIT_SHA:0:8}/
|
|
|
|
source:
|
|
|
|
- xwim-x86_64-glibc-linux-shared
|
|
|
|
- xwim-x86_64-musl-linux-static
|
|
|
|
depends_on:
|
|
|
|
- build-shared
|
|
|
|
- build-static
|
2020-02-16 02:20:12 +00:00
|
|
|
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
exclude:
|
|
|
|
- tag
|
2020-02-22 19:33:54 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: release
|
|
|
|
|
|
|
|
steps:
|
2021-02-24 21:17:58 +00:00
|
|
|
- name: build-shared
|
|
|
|
image: arminfriedl/xwim-build:shared
|
|
|
|
commands:
|
2022-06-25 17:12:12 +00:00
|
|
|
- meson wrap install gtest || true
|
2021-02-24 21:17:58 +00:00
|
|
|
- meson --buildtype=release target/shared
|
|
|
|
- ninja -C target/shared
|
2021-02-25 20:07:44 +00:00
|
|
|
- strip target/shared/src/xwim
|
2021-02-24 21:17:58 +00:00
|
|
|
- mkdir xwim-${DRONE_TAG}-x86_64-glibc-linux-shared
|
|
|
|
- mv target/shared/src/xwim xwim-${DRONE_TAG}-x86_64-glibc-linux-shared
|
|
|
|
|
|
|
|
- name: build-static
|
|
|
|
image: arminfriedl/xwim-build:static
|
2020-02-22 19:33:54 +00:00
|
|
|
commands:
|
2022-06-25 17:12:12 +00:00
|
|
|
- meson wrap install gtest || true
|
2021-02-24 21:17:58 +00:00
|
|
|
- meson --buildtype=release --default-library=static target/static
|
|
|
|
- ninja -C target/static
|
2021-02-24 21:23:14 +00:00
|
|
|
- strip target/static/src/xwim
|
2021-02-24 21:17:58 +00:00
|
|
|
- mkdir xwim-${DRONE_TAG}-x86_64-musl-linux-static
|
|
|
|
- mv target/static/src/xwim xwim-${DRONE_TAG}-x86_64-musl-linux-static
|
2020-02-22 19:33:54 +00:00
|
|
|
|
|
|
|
- name: package
|
|
|
|
image: arminfriedl/xwim-build
|
|
|
|
commands:
|
2021-02-24 21:17:58 +00:00
|
|
|
- tar czf xwim-${DRONE_TAG}-x86_64-glibc-linux-shared.tar.gz xwim-${DRONE_TAG}-x86_64-glibc-linux-shared/xwim
|
|
|
|
- tar czf xwim-${DRONE_TAG}-x86_64-musl-linux-static.tar.gz xwim-${DRONE_TAG}-x86_64-musl-linux-static/xwim
|
|
|
|
depends_on:
|
|
|
|
- build-shared
|
|
|
|
- build-static
|
2020-02-22 19:33:54 +00:00
|
|
|
|
|
|
|
- name: publish
|
|
|
|
image: plugins/gitea-release
|
|
|
|
settings:
|
|
|
|
base_url: https://git.friedl.net
|
|
|
|
api_key:
|
|
|
|
from_secret: gitea_token
|
|
|
|
files:
|
2021-02-24 21:17:58 +00:00
|
|
|
- xwim-${DRONE_TAG}-x86_64-glibc-linux-shared.tar.gz
|
|
|
|
- xwim-${DRONE_TAG}-x86_64-musl-linux-static.tar.gz
|
2020-02-22 19:33:54 +00:00
|
|
|
title: xwim ${DRONE_TAG}
|
|
|
|
checksum:
|
|
|
|
- md5
|
|
|
|
- sha256
|
2021-02-24 21:17:58 +00:00
|
|
|
depends_on:
|
|
|
|
- package
|
2020-02-22 19:33:54 +00:00
|
|
|
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- tag
|