Add auto-builds on M1

Support `CARGO_TARGET_DIR` in Makefile
next
Sayan Nandan 3 years ago
parent 552d454940
commit 6283cc9b37

@ -2,7 +2,7 @@
kind: pipeline
type: ssh
name: Run tests on M1
name: Build on M1
server:
host:
@ -28,3 +28,30 @@ steps:
- source $SRCENV/.cargo/env
- export RUSTUP_HOME=$SRCENV/.rustup
- make test
when:
event:
exclude:
- tag
- name: Build bundle
environment:
SRCENV:
from_secret: srcenv
CARGO_HOME:
from_secret: cargohome
CARGO_TARGET_DIR:
from_secret: cargotarget
TARGET: aarch64-apple-darwin
VERSION: ${DRONE_TAG}
ARTIFACT: aarch64-apple-darwin
HUBPATH:
from_secret: hubpath
GITHUB_TOKEN:
from_secret: github_token
commands:
- source $SRCENV/.cargo/env
- export RUSTUP_HOME=$SRCENV/.rustup
- make bundle
- $HUBPATH release edit $(find . -type f -name "*.zip" -printf "-a %p ") -m "" "$VERSION"
when:
event:
- tag

@ -86,6 +86,11 @@ BUNDLE += cd target/${TARGET}/release &&
BUNDLE+=7z a ../../../sky-bundle-${VERSION}-${ARTIFACT}.zip skysh.exe skyd.exe sky-bench.exe
else
# not windows, so no exe
ifneq ($(origin CARGO_TARGET_DIR),undefined)
# target defined and target dir. use this instead of target/
BUNDLE+=zip -j sky-bundle-${VERSION}-${ARTIFACT}.zip ${CARGO_TARGET_DIR}/${TARGET}/release/skysh ${CARGO_TARGET_DIR}/${TARGET}/release/skyd ${CARGO_TARGET_DIR}/${TARGET}/release/sky-bench
endif
# just the plain old target/${TARGET} path
BUNDLE+=zip -j sky-bundle-${VERSION}-${ARTIFACT}.zip target/${TARGET}/release/skysh target/${TARGET}/release/skyd target/${TARGET}/release/sky-bench
endif
endif

Loading…
Cancel
Save