-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(flex-stacker): add flex-stacker build and deply github workflow. (
#488)
- Loading branch information
Showing
1 changed file
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: 'Flex Stacker create release from tag' | ||
on: | ||
push: | ||
tags: | ||
- 'flex-stacker@*' | ||
pull_request: | ||
paths: | ||
- '.github/workflows/flex-stacker-create-release.yaml' | ||
workflow_dispatch: | ||
|
||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
|
||
jobs: | ||
cross-compile-check-and-release: | ||
name: 'Cross-Compile/Check and Create Release' | ||
runs-on: 'ubuntu-20.04' | ||
timeout-minutes: 10 | ||
steps: | ||
- uses: 'actions/checkout@v2' | ||
with: | ||
fetch-depth: 0 | ||
- uses: 'actions/cache@v2' | ||
with: | ||
key: stm32-cross-${{ secrets.MODULES_STM32_CACHE_VERSION }}-${{ hashFiles('cmake/*') }} | ||
restore-keys: stm32-cross-${{ secrets.MODULES_STM32_CACHE_VERSION }}- | ||
path: './stm32-tools' | ||
- name: 'Configure' | ||
run: cmake --preset=stm32-cross . | ||
- name: 'Build' | ||
run: cmake --build --preset cross --target flex-stacker-hex | ||
- name: 'Build Combo Image Hex' | ||
run: cmake --build --preset cross --target flex-stacker-image-hex | ||
- name: 'Build Combo Image Binary' | ||
run: cmake --build --preset cross --target flex-stacker-image-bin | ||
- name: 'Build Combo Image Zip' | ||
run: cmake --build --preset cross --target flex-stacker-zip | ||
- name: 'Prep for install' | ||
run: cmake --install ./build-stm32-cross --component flex-stacker | ||
- name: 'Save firmware artifacts' | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: flex-stacker-build | ||
path: dist/flex-stacker/*.zip | ||
- if: github.event_name != 'pull_request' | ||
name: 'Deploy' | ||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.S3_MODULES_DEPLOY_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_MODULES_DEPLOY_SECRET }} | ||
AWS_DEFAULT_REGION: us-east-2 | ||
TRAVIS_TAG: ${{ github.ref_name }} | ||
run: | | ||
. ./scripts/set_build_vars.sh | ||
aws s3 sync --acl=public-read ${RELEASE_LOCAL_DIR} s3://opentrons-modules-builds/${RELEASE_UPLOAD_DIR} |