This repository has been archived on 2024-05-28. You can view files and clone it, but cannot push or open issues or pull requests.
stm32u5_cargo/stm32u5/.drone.yml
2023-11-14 16:25:09 -05:00

37 lines
1.0 KiB
YAML
Executable File

---
kind: pipeline
type: exec
name: default
platform:
os: linux
arch: amd64
steps:
- name: greeting
commands:
- echo hello world
- pwd
- # create variable base on project name
- export PROJECT_NAME=$(git config --local remote.origin.url | tr '/' '\n' | tail -1)
- export BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
- export BINARY_BASE_PATH=/var/lib/drone-runner-exec/bins/$PROJECT_NAME
- export BINARY_FOLDER_PATH=/var/lib/drone-runner-exec/bins/$PROJECT_NAME/$BRANCH_NAME-$(date +%Y%m%d-%H%M%S)-$(git rev-parse --short HEAD)
- echo $USER
# generate documentation
- doxygen doxygen.cfg
- mv docs stm32u5
- cp -r stm32u5 /var/lib/drone-runner-exec/docs/
- mkdir build
- cd build
- cmake ..
- make
- make install
- # create binary foler base on project name build timer and commit id
- mkdir -p $BINARY_FOLDER_PATH
- cd ..
- cp -r publish/* $BINARY_FOLDER_PATH/
- zip -q -r $BINARY_FOLDER_PATH.zip publish/*
# - cp $BINARY_FOLDER_PATH.zip $BINARY_BASE_PATH/
# - $(date +%Y%m%d%H%M%S)-$(git rev-parse --short HEAD)