This commit is contained in:
@@ -1,75 +1,61 @@
|
||||
# .woodpecker.yml
|
||||
#when:
|
||||
# - event: push
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- TARGET: aarch64-unknown-linux-musl
|
||||
SHORT: arm64-musl
|
||||
- TARGET: x86_64-pc-windows-gnu
|
||||
SHORT: windows
|
||||
- TARGET: x86_64-unknown-linux-musl
|
||||
SHORT: amd64-musl
|
||||
BIN_SUFFIX:
|
||||
# - TARGET: aarch64-unknown-linux-musl
|
||||
# SHORT: arm64-musl
|
||||
# BIN_SUFFIX:
|
||||
# - TARGET: x86_64-pc-windows-gnu
|
||||
# SHORT: windows
|
||||
# BIN_SUFFIX: .exe
|
||||
|
||||
pipeline:
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: default
|
||||
platform:
|
||||
arch: amd64
|
||||
|
||||
volumes:
|
||||
- name: target-${TARGET}
|
||||
temp: {}
|
||||
|
||||
steps:
|
||||
- name: Prepare
|
||||
image: img.kie.rs/jjkiers/rust-crossbuild:rust1.79.0-zig0.11.0-zig
|
||||
commands:
|
||||
- mkdir -p artifacts
|
||||
- echo "Using image: img.kie.rs/jjkiers/rust-crossbuild:rust1.79.0-zig0.11.0-zig"
|
||||
- cargo --version
|
||||
- rustc --version
|
||||
|
||||
- name: Build for ${SHORT}
|
||||
image: img.kie.rs/jjkiers/rust-crossbuild:rust1.79.0-zig0.11.0-zig
|
||||
commands:
|
||||
- |
|
||||
if echo "${SHORT}" | grep -q windows; then
|
||||
BIN_SUFFIX=.exe
|
||||
else
|
||||
BIN_SUFFIX=
|
||||
fi
|
||||
- echo "Building ${TARGET} (${SHORT})"
|
||||
- cargo zigbuild --release --target ${TARGET}
|
||||
- mkdir -p artifacts
|
||||
- cp target/${TARGET}/release/l4p${BIN_SUFFIX} artifacts/l4p-${TARGET}${BIN_SUFFIX}
|
||||
- rm -rf target/${TARGET}/release/*
|
||||
depends_on:
|
||||
- Prepare
|
||||
volumes:
|
||||
- name: target-${TARGET}
|
||||
path: /drone/src/target
|
||||
|
||||
- name: Show built artifacts
|
||||
image: img.kie.rs/jjkiers/rust-crossbuild:rust1.79.0-zig0.11.0-zig
|
||||
commands:
|
||||
- ls -lah artifacts
|
||||
depends_on:
|
||||
- Build for ${SHORT}
|
||||
|
||||
- name: Create release on gitea
|
||||
image: plugins/gitea-release
|
||||
settings:
|
||||
api_key:
|
||||
from_secret: gitea_token
|
||||
base_url: https://code.kiers.eu
|
||||
files: artifacts/*
|
||||
checksum: sha256
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
- promote
|
||||
depends_on:
|
||||
- Show built artifacts
|
||||
|
||||
image_pull_secrets:
|
||||
- docker_private_repo
|
||||
steps:
|
||||
- name: Prepare
|
||||
image: img.kie.rs/jjkiers/rust-crossbuild:rust1.79.0-zig0.11.0-zig
|
||||
commands:
|
||||
- echo Using image img.kie.rs/jjkiers/rust-crossbuild:rust1.79.0-zig0.11.0-zig
|
||||
- mkdir -p artifacts
|
||||
- cargo --version
|
||||
- rustc --version
|
||||
|
||||
- name: Build for ${SHORT}
|
||||
image: img.kie.rs/jjkiers/rust-crossbuild:rust1.79.0-zig0.11.0-zig
|
||||
commands:
|
||||
- echo Building ${TARGET} \(${SHORT}\)
|
||||
- cargo zigbuild --release --target ${TARGET}
|
||||
- mkdir -p artifacts
|
||||
- cp target/${TARGET}/release/l4p${BIN_SUFFIX} artifacts/l4p-${TARGET}${BIN_SUFFIX}
|
||||
- rm -rf target/${TARGET}/release/*
|
||||
depends_on:
|
||||
- Prepare
|
||||
# volumes:
|
||||
# - name: target-${TARGET}
|
||||
# path: /drone/src/target
|
||||
#
|
||||
# - name: Show built artifacts
|
||||
# image: img.kie.rs/jjkiers/rust-crossbuild:rust1.79.0-zig0.11.0-zig
|
||||
# commands:
|
||||
# - ls -lah artifacts
|
||||
# depends_on:
|
||||
# - Build for ${SHORT}
|
||||
#
|
||||
# - name: Create release on gitea
|
||||
# image: plugins/gitea-release
|
||||
# settings:
|
||||
# api_key:
|
||||
# from_secret: gitea_token
|
||||
# base_url: https://code.kiers.eu
|
||||
# files: artifacts/*
|
||||
# checksum: sha256
|
||||
# when:
|
||||
# event:
|
||||
# - tag
|
||||
# - promote
|
||||
# depends_on:
|
||||
# - Show built artifacts
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user