2023-07-19 20:26:32 +00:00
|
|
|
when:
|
2023-08-23 15:04:28 +00:00
|
|
|
- event: tag
|
2023-08-12 09:37:01 +00:00
|
|
|
branch: main
|
2023-07-19 20:26:32 +00:00
|
|
|
|
2023-07-13 12:33:15 +00:00
|
|
|
matrix:
|
|
|
|
BUILD_TARGET:
|
|
|
|
- aarch64-unknown-linux-gnu
|
|
|
|
- x86_64-unknown-linux-gnu
|
|
|
|
|
|
|
|
steps:
|
|
|
|
build:
|
|
|
|
image: git.nikos.gg/prymn/rust/aarch64:latest
|
2023-09-03 14:37:03 +00:00
|
|
|
environment:
|
|
|
|
- RUSTC_WRAPPER=/usr/local/bin/sccache
|
|
|
|
- SCCACHE_BUCKET=prymn-cargo-cache
|
|
|
|
- SCCACHE_ENDPOINT=https://75178f9eca227dea51b3db4db2c15a5a.r2.cloudflarestorage.com
|
|
|
|
- SCCACHE_REGION=auto
|
|
|
|
secrets: [ aws_access_key_id, aws_secret_access_key ]
|
2023-07-13 12:33:15 +00:00
|
|
|
commands:
|
|
|
|
- protoc --version
|
2023-09-03 12:02:37 +00:00
|
|
|
- cargo build --bin prymn_agent --release --target "${BUILD_TARGET}"
|
2023-07-13 12:33:15 +00:00
|
|
|
- mkdir -p "dist/${BUILD_TARGET}"
|
|
|
|
- cp "target/${BUILD_TARGET}/release/prymn_agent" "dist/${BUILD_TARGET}"
|
|
|
|
|
2023-09-03 14:37:03 +00:00
|
|
|
upload:
|
2023-07-13 12:33:15 +00:00
|
|
|
image: woodpeckerci/plugin-s3
|
|
|
|
settings:
|
|
|
|
bucket: prymn-static
|
|
|
|
endpoint: https://75178f9eca227dea51b3db4db2c15a5a.r2.cloudflarestorage.com
|
|
|
|
access_key:
|
|
|
|
from_secret: r2_access_key
|
|
|
|
secret_key:
|
|
|
|
from_secret: r2_secret_key
|
2023-09-03 12:02:37 +00:00
|
|
|
source: dist/**/*
|
2023-09-03 14:37:03 +00:00
|
|
|
target: /agent
|