Skip to content

Commit

Permalink
Upload the smart desk image (#269)
Browse files Browse the repository at this point in the history
  • Loading branch information
ferrarimarco authored Dec 28, 2021
1 parent 9768564 commit b12ad47
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 17 deletions.
39 changes: 38 additions & 1 deletion .github/workflows/build-firmware-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ jobs:
LINTER_RULES_PATH: .
VALIDATE_ALL_CODEBASE: true
build-smart-desk:
defaults:
run:
working-directory: provisioning/esp32/smart_desk
needs:
- lint
runs-on: ubuntu-20.04
Expand All @@ -32,5 +35,39 @@ jobs:
- name: "Build the Smart Desk firmware"
run: |
make
working-directory: provisioning/esp32/smart_desk
- uses: actions/upload-artifact@v2
with:
if-no-files-found: error
name: smart-desk.bin.xz
# working-directory has no effect on this action, so we need to set the full path anyway.
# See https://github.com/actions/upload-artifact/issues/246
path: |
provisioning/esp32/smart_desk/build/smart-desk.bin.xz
update-release-draft:
if: ${{ github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' }}
outputs:
release-tag-name: ${{ steps.draft-release.outputs.tag_name }}
runs-on: ubuntu-latest
steps:
- id: draft-release
name: Update release
uses: release-drafter/release-drafter@v5
with:
config-name: release-drafter.yaml
upload-images-to-release:
needs:
- build-smart-desk
- update-release-draft
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Download artifacts to upload
uses: actions/download-artifact@v2
- name: "Upload artifacts to the ${{ needs.update-release-draft.outputs.release-tag-name }} release"
run: |
ls ./**/*.${{ matrix.artifact-file-extension }} >/dev/null && gh release upload "${{ needs.update-release-draft.outputs.release-tag-name }}" ./**/*.${{ matrix.artifact-file-extension }} --clobber
strategy:
matrix:
artifact-file-extension:
- xz
...
12 changes: 11 additions & 1 deletion provisioning/esp32/smart_desk/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.PHONY: all
all: size-components-esp-idf-project build-esp-idf-project ## Run all targets.
all: size-components-esp-idf-project compress-binary-image ## Run all targets.

# if this session isn't interactive, then we don't want to allocate a
# TTY, which would fail, but if it is interactive, we do want to attach
Expand Down Expand Up @@ -89,6 +89,16 @@ size-components-esp-idf-project: ## Launch the ESP-IDF project size-components.
idf.py \
size-components

BINARY_IMAGE_COMPRESSION_IMAGE_TAG ?= ubuntu:20.04

.PHONY: compress-binary-image
compress-binary-image: build-esp-idf-project
docker run --rm -i $(DOCKER_FLAGS) \
-v "$(CURDIR)":/workspace \
-w="/workspace" \
"$(BINARY_IMAGE_COMPRESSION_IMAGE_TAG)" \
bash -c "apt-get update && apt-get --yes install xz-utils && xz -9 --compress --force --threads=0 --verbose build/smart-desk.bin"

RFC2217_EXEC_PATH ?= .env/rfc2217_server.py

.PHONY: setup-rfc2217-server
Expand Down
15 changes: 0 additions & 15 deletions provisioning/esp32/smart_desk/cloudbuild.yaml

This file was deleted.

0 comments on commit b12ad47

Please sign in to comment.