pict-rs/.drone.yml

372 lines
5.9 KiB
YAML
Raw Normal View History

2021-12-03 20:21:31 +00:00
kind: pipeline
type: docker
name: clippy
platform:
arch: amd64
clone:
disable: true
steps:
- name: clone
image: alpine/git:latest
user: root
commands:
- git clone $DRONE_GIT_HTTP_URL .
- git checkout $DRONE_COMMIT
- chown -R 991:991 .
- name: clippy
image: asonix/rust-builder:amd64-latest
2021-12-03 21:37:12 +00:00
pull: always
2021-12-03 20:21:31 +00:00
commands:
- rustup component add clippy
2021-12-05 21:27:52 +00:00
- cargo clippy --no-default-features -- -D warnings
- cargo clippy --no-default-features --features io-uring -- -D warnings
- cargo clippy --no-default-features --features object-storage -- -D warnings
- cargo clippy --no-default-features --features object-storage,io-uring -- -D warnings
2021-12-03 20:21:31 +00:00
2021-12-03 22:57:04 +00:00
trigger:
event:
- push
- pull_request
2021-12-03 20:21:31 +00:00
---
kind: pipeline
type: docker
name: tests
platform:
arch: amd64
clone:
disable: true
steps:
- name: clone
image: alpine/git:latest
user: root
commands:
- git clone $DRONE_GIT_HTTP_URL .
- git checkout $DRONE_COMMIT
- chown -R 991:991 .
- name: tests
image: asonix/rust-builder:amd64-latest
2021-12-03 21:37:12 +00:00
pull: always
2021-12-03 20:21:31 +00:00
commands:
- cargo test
2021-12-03 22:57:04 +00:00
trigger:
event:
- push
- pull_request
2021-12-03 20:21:31 +00:00
---
kind: pipeline
type: docker
2021-12-03 22:57:04 +00:00
name: check-amd64
2021-12-03 20:21:31 +00:00
platform:
arch: amd64
clone:
disable: true
steps:
- name: clone
image: alpine/git:latest
user: root
commands:
- git clone $DRONE_GIT_HTTP_URL .
- git checkout $DRONE_COMMIT
- chown -R 991:991 .
2021-12-04 20:35:21 +00:00
- name: check
2021-12-03 20:21:31 +00:00
image: asonix/rust-builder:amd64-latest
2021-12-03 21:37:12 +00:00
pull: always
2021-12-03 20:21:31 +00:00
commands:
2021-12-04 01:20:02 +00:00
- cargo check --target=$TARGET
2021-12-03 22:57:04 +00:00
trigger:
event:
- push
- pull_request
---
kind: pipeline
type: docker
name: build-amd64
platform:
arch: amd64
clone:
disable: true
steps:
- name: clone
image: alpine/git:latest
user: root
commands:
- git clone $DRONE_GIT_HTTP_URL .
- git checkout $DRONE_COMMIT
- chown -R 991:991 .
- name: build
image: asonix/rust-builder:amd64-latest
pull: always
commands:
2021-12-04 01:20:02 +00:00
- cargo build --target=$TARGET --release
- $TOOL-strip target/$TARGET/release/pict-rs
- cp target/$TARGET/release/pict-rs .
2021-12-04 19:24:41 +00:00
- cp pict-rs pict-rs-linux-amd64
2021-12-04 01:20:02 +00:00
- name: push
2021-12-04 18:08:16 +00:00
image: plugins/docker:20
2021-12-04 01:20:02 +00:00
settings:
username: asonix
password:
from_secret: dockerhub_token
repo: asonix/pictrs
dockerfile: docker/drone/Dockerfile
auto_tag: true
2021-12-04 17:27:32 +00:00
auto_tag_suffix: linux-amd64
2021-12-04 01:20:02 +00:00
build_args:
- REPO_ARCH=amd64
2021-12-03 20:21:31 +00:00
2021-12-04 19:24:41 +00:00
- name: publish
image: plugins/gitea-release:1
settings:
api_key:
from_secret: gitea_token
base_url: https://git.asonix.dog
files:
- pict-rs-linux-amd64
2021-12-03 22:57:04 +00:00
trigger:
event:
- tag
2021-12-03 20:21:31 +00:00
---
kind: pipeline
type: docker
2021-12-03 22:57:04 +00:00
name: check-arm64v8
2021-12-03 20:21:31 +00:00
platform:
arch: amd64
clone:
disable: true
steps:
- name: clone
image: alpine/git:latest
user: root
commands:
- git clone $DRONE_GIT_HTTP_URL .
- git checkout $DRONE_COMMIT
- chown -R 991:991 .
2021-12-04 20:35:21 +00:00
- name: check
2021-12-03 20:21:31 +00:00
image: asonix/rust-builder:arm64v8-latest
2021-12-03 21:37:12 +00:00
pull: always
2021-12-03 20:21:31 +00:00
commands:
2021-12-04 01:20:02 +00:00
- cargo check --target=$TARGET
2021-12-03 22:57:04 +00:00
trigger:
event:
- push
- pull_request
---
kind: pipeline
type: docker
name: build-arm64v8
platform:
arch: amd64
clone:
disable: true
steps:
- name: clone
image: alpine/git:latest
user: root
commands:
- git clone $DRONE_GIT_HTTP_URL .
- git checkout $DRONE_COMMIT
- chown -R 991:991 .
- name: build
image: asonix/rust-builder:arm64v8-latest
pull: always
commands:
2021-12-04 01:20:02 +00:00
- cargo build --target=$TARGET --release
- $TOOL-strip target/$TARGET/release/pict-rs
- cp target/$TARGET/release/pict-rs .
2021-12-04 19:24:41 +00:00
- cp pict-rs pict-rs-linux-arm64v8
2021-12-04 01:20:02 +00:00
- name: push
2021-12-04 18:08:16 +00:00
image: plugins/docker:20
2021-12-04 01:20:02 +00:00
settings:
username: asonix
password:
from_secret: dockerhub_token
repo: asonix/pictrs
dockerfile: docker/drone/Dockerfile
auto_tag: true
2021-12-04 17:27:32 +00:00
auto_tag_suffix: linux-arm64v8
2021-12-04 01:20:02 +00:00
build_args:
- REPO_ARCH=arm64v8
2021-12-03 20:21:31 +00:00
2021-12-04 19:24:41 +00:00
- name: publish
image: plugins/gitea-release:1
settings:
api_key:
from_secret: gitea_token
base_url: https://git.asonix.dog
files:
- pict-rs-linux-arm64v8
2021-12-03 22:57:04 +00:00
trigger:
event:
- tag
2021-12-03 20:21:31 +00:00
---
kind: pipeline
type: docker
2021-12-03 22:57:04 +00:00
name: check-arm32v7
2021-12-03 20:21:31 +00:00
platform:
arch: amd64
clone:
disable: true
steps:
- name: clone
image: alpine/git:latest
user: root
commands:
- git clone $DRONE_GIT_HTTP_URL .
- git checkout $DRONE_COMMIT
- chown -R 991:991 .
2021-12-04 20:35:21 +00:00
- name: check
2021-12-03 20:21:31 +00:00
image: asonix/rust-builder:arm32v7-latest
2021-12-03 21:37:12 +00:00
pull: always
2021-12-03 20:21:31 +00:00
commands:
2021-12-04 01:20:02 +00:00
- cargo check --target=$TARGET
2021-12-03 22:57:04 +00:00
trigger:
event:
- push
- pull_request
---
kind: pipeline
type: docker
name: build-arm32v7
platform:
arch: amd64
clone:
disable: true
steps:
- name: clone
image: alpine/git:latest
user: root
commands:
- git clone $DRONE_GIT_HTTP_URL .
- git checkout $DRONE_COMMIT
- chown -R 991:991 .
- name: build
image: asonix/rust-builder:arm32v7-latest
pull: always
commands:
2021-12-04 01:20:02 +00:00
- cargo build --target=$TARGET --release
- $TOOL-strip target/$TARGET/release/pict-rs
- cp target/$TARGET/release/pict-rs .
2021-12-04 19:24:41 +00:00
- cp pict-rs pict-rs-linux-arm32v7
2021-12-04 01:20:02 +00:00
- name: push
2021-12-04 18:08:16 +00:00
image: plugins/docker:20
2021-12-04 01:20:02 +00:00
settings:
username: asonix
password:
from_secret: dockerhub_token
repo: asonix/pictrs
dockerfile: docker/drone/Dockerfile
auto_tag: true
2021-12-04 17:27:32 +00:00
auto_tag_suffix: linux-arm32v7
2021-12-04 01:20:02 +00:00
build_args:
- REPO_ARCH=arm32v7
2021-12-03 22:57:04 +00:00
2021-12-04 19:24:41 +00:00
- name: publish
image: plugins/gitea-release:1
settings:
api_key:
from_secret: gitea_token
base_url: https://git.asonix.dog
files:
- pict-rs-linux-arm32v7
2021-12-03 22:57:04 +00:00
trigger:
event:
- tag
2021-12-04 16:53:53 +00:00
---
kind: pipeline
type: docker
2021-12-04 16:55:18 +00:00
name: manifest
2021-12-04 16:53:53 +00:00
platform:
arch: amd64
clone:
disable: true
steps:
2021-12-04 18:17:49 +00:00
- name: clone
image: alpine/git:latest
user: root
commands:
- git clone $DRONE_GIT_HTTP_URL .
- git checkout $DRONE_COMMIT
- chown -R 991:991 .
2021-12-04 16:53:53 +00:00
- name: manifest
2021-12-04 18:08:16 +00:00
image: plugins/manifest:1
2021-12-04 16:53:53 +00:00
settings:
username: asonix
password:
from_secret: dockerhub_token
2021-12-04 17:47:48 +00:00
dump: true
2021-12-04 16:53:53 +00:00
auto_tag: true
ignore_missing: true
spec: docker/drone/manifest.tmpl
depends_on:
- build-amd64
- build-arm64v8
- build-arm32v7
trigger:
event:
- tag