Skip to content

Commit

Permalink
update ci script
Browse files Browse the repository at this point in the history
  • Loading branch information
andreas committed Sep 3, 2023
1 parent 9091bef commit 776d810
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ parameters:
build_flags:
type: string
default: ""
config:
type: string
default: "{}"
orbs:
python: circleci/[email protected]

Expand All @@ -31,19 +34,24 @@ jobs:
- run:
name: "build"
command: "pio run -e << pipeline.parameters.environment >>"
- run:
name: "save config"
working_directory: ".pio/build/<< pipeline.parameters.environment >>"
command: "echo '<< pipeline.parameters.config >>' > config.json"
- run:
name: "save build config"
working_directory: ".pio/build/<< pipeline.parameters.environment >>"
command: "echo 'PLATFORMIO_BUILD_FLAGS=\"<< pipeline.parameters.config >>\" pio run -e << pipeline.parameters.environment >> ' > buildconfig.txt"
- run:
name: "rename"
command: "mv .pio/build/<< pipeline.parameters.environment >>/firmware.bin .pio/build/<< pipeline.parameters.environment >>/<< pipeline.parameters.environment >>-update.bin"
- run:
name: "compress"
working_directory: ".pio/build/<< pipeline.parameters.environment >>"
command: "zip << pipeline.parameters.environment >>.zip << pipeline.parameters.environment >>-*.bin"
command: "zip << pipeline.parameters.environment >>.zip << pipeline.parameters.environment >>-*.bin config.json buildconfig.txt"
- store_artifacts:
path: .pio/build/<< pipeline.parameters.environment >>/<< pipeline.parameters.environment >>.zip
destination: << pipeline.parameters.environment >>.zip
- store_artifacts:
path: .pio/build/<< pipeline.parameters.environment >>/<< pipeline.parameters.environment >>-all.bin
destination: << pipeline.parameters.environment >>-all.bin
# Orchestrate jobs using workflows
# See: https://circleci.com/docs/configuration-reference/#workflows
workflows:
Expand Down

0 comments on commit 776d810

Please sign in to comment.