Skip to content

Commit

Permalink
Publish demo board firmware as GitHub Artifact and filter upload to P…
Browse files Browse the repository at this point in the history
…LTcloud (#35)
  • Loading branch information
Eric Rauer authored Nov 19, 2020
1 parent 0f95bd9 commit 56f8a97
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/actions/action-pltcloud/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash -l

pltcloud -t "$API_TOKEN" -f "dist/*" -v "${GITHUB_REF:10}" -p "$PROJECT_UUID"
pltcloud -t "$API_TOKEN" -f "dist/*demo*" -v "${GITHUB_REF:10}" -p "$PROJECT_UUID"
11 changes: 0 additions & 11 deletions .github/actions/action-zephyr/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,6 @@

FROM bcdevices/zephyr-west:zephyr-2.4.0-0

LABEL "com.github.actions.name"="Zephyr build"
LABEL "com.github.actions.description"="Build Zephyr project"
LABEL "com.github.actions.icon"="package"
LABEL "com.github.actions.color"="blue"

LABEL "repository"="https://github.com/bcdevices/ly10-zephyr-fw"
LABEL "homepage"="https://github.com/bcdevices/ly10-zephyr-fw"
LABEL "maintainer"="Blue Clover Devices"

WORKDIR /usr/src

ADD entrypoint.sh /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]
5 changes: 5 additions & 0 deletions .github/actions/action-zephyr/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: 'Zephyr build'
description: 'Build Zephyr projects'
runs:
using: 'docker'
image: 'Dockerfile'
4 changes: 2 additions & 2 deletions .github/actions/action-zephyr/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh -l
#!/bin/sh

sh -c "make dist"
make dist
7 changes: 7 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,10 @@ jobs:
env:
API_TOKEN: ${{ secrets.API_TOKEN }}
PROJECT_UUID: ${{ secrets.PROJECT_UUID }}
- uses: meeDamian/[email protected]
if: contains(github.ref, 'tags')
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: dist/*demo*
gzip: false

13 changes: 7 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ DIST := $(BASE_PATH)/dist
default: build

.PHONY: GIT-VERSION-FILE
GIT-VERSION-FILE:
GIT-VERSION-FILE:
@sh ./GIT-VERSION-GEN
-include GIT-VERSION-FILE

GIT_DESC := $(shell git describe --tags --always --dirty --match "v[0-9]*")
VERSION_TAG := $(patsubst v%,%,$(GIT_DESC))

DOCKER_BUILD_ARGS :=
Expand Down Expand Up @@ -118,7 +119,7 @@ build.%/shell/zephyr/zephyr.hex:
else echo "No Zephyr"; fi && \
west build --build-dir build.$*/shell \
--board $* --pristine auto \
$$ZEPHYR_BASE/samples/subsys/shell/shell_module
$$ZEPHYR_BASE/samples/subsys/shell/shell_module

build.%/can/zephyr/zephyr.hex:
mkdir -p build.$*/can
Expand Down Expand Up @@ -200,9 +201,9 @@ dist: dist-clean dist-prep build
install -m 666 build.disco_l475_iot1/button/zephyr/zephyr.hex dist/zephyr-disco_l475_iot1-sample-button-$(VERSION_TAG).hex
install -m 666 build.disco_l475_iot1/gsm_modem/zephyr/zephyr.hex dist/zephyr-disco_l475_iot1-sample-gsm_modem-$(VERSION_TAG).hex
install -m 666 build.disco_l475_iot1/shell/zephyr/zephyr.hex dist/zephyr-disco_l475_iot1-sample-shell-$(VERSION_TAG).hex
install -m 666 build.ly10demo/app/zephyr/zephyr.hex dist/ly10-zephyr-fw-$(VERSION_TAG).hex
install -m 666 build.ly10demo/app/zephyr/zephyr.elf dist/ly10-zephyr-fw-$(VERSION_TAG).elf
install -m 666 build.ly10demo/app/zephyr/zephyr.map dist/ly10-zephyr-fw-$(VERSION_TAG).map
install -m 666 build.ly10demo/app/zephyr/zephyr.hex dist/demo-board-zephyr-fw-$(VERSION_TAG).hex
install -m 666 build.ly10demo/app/zephyr/zephyr.elf dist/demo-board-zephyr-fw-$(VERSION_TAG).elf
install -m 666 build.ly10demo/app/zephyr/zephyr.map dist/demo-board-zephyr-fw-$(VERSION_TAG).map
#install -m 666 build.nrf52dk_nrf52832/servo_motor/zephyr/zephyr.hex dist/zephyr-nrf52dk_nrf528320-sample-servo_motor-$(VERSION_TAG).hex
install -m 666 build.nrf52dk_nrf52832/blinky/zephyr/zephyr.hex dist/zephyr-nrf52dk_nrf52832-sample-blinky-$(VERSION_TAG).hex
install -m 666 build.nrf52dk_nrf52832/button/zephyr/zephyr.hex dist/zephyr-nrf52dk_nrf52832-sample-button-$(VERSION_TAG).hex
Expand All @@ -227,7 +228,7 @@ dist: dist-clean dist-prep build
install -m 666 build.stm32f4_disco/can/zephyr/zephyr.hex dist/zephyr-stm32f4_disco-sample-can-$(VERSION_TAG).hex
#install -m 666 build.stm32f4_disco/gsm_modem/zephyr/zephyr.hex dist/zephyr-stm32f4_disco-sample-gsm_modem-$(VERSION_TAG).hex
install -m 666 build.stm32f4_disco/shell/zephyr/zephyr.hex dist/zephyr-stm32f4_disco-sample-shell-$(VERSION_TAG).hex
sed 's/{{VERSION}}/$(VERSION_TAG)/g' test-suites/suite-LY10-zephyr.yaml.template > dist/suite-LY10-zephyr-$(VERSION_TAG).yaml
sed 's/{{VERSION}}/$(VERSION_TAG)/g' test-suites/suite-demo-board-zephyr.yaml.template > dist/suite-demo-board-zephyr-$(VERSION_TAG).yaml

.PHONY: deploy
deploy:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ suite:
- ident: ICT-T3
title: Program LY10-DEMO-BOARD FW
steps:
- command: program nRF52 none,ly10-zephyr-fw-{{VERSION}}.hex,none
- command: program nRF52 none,demo-board-zephyr-fw-{{VERSION}}.hex,none
- ident: ICT-T4
title: BLE discovery
steps:
Expand Down

0 comments on commit 56f8a97

Please sign in to comment.