Getting price support into CloudSMETS. #191
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
on: | |
push: | |
paths: | |
- '.github/workflows/tlsr825x*' | |
- 'actions/telink/**' | |
- 'actions/common/**' | |
- 'tlsr8258/**' | |
branches: | |
- '**' | |
tags: | |
- '*' | |
jobs: | |
TeLink-tlsr825x-build: | |
runs-on: windows-latest | |
name: Test install of the TLSR825x build environment and image build. | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
sparse-checkout: | | |
.github | |
actions | |
tlsr8258 | |
- if: github.ref_type == 'tag' | |
uses: ./actions/common/semver | |
with: | |
tag: ${{ github.ref_name }} | |
- name: set-env-vars | |
shell: pwsh | |
run: | | |
# Put IDE and SDK at the lower point in the directory tree. | |
$Qualifier=Split-Path -Path "${env:GITHUB_WORKSPACE}" -Qualifier | |
# echo "TELINK_IDE_PATH=${env:GITHUB_WORKSPACE}\${{ vars.TELINK_IDE_DIR }}" >> ${env:GITHUB_ENV} | |
echo "TELINK_IDE_PATH=${Qualifier}\${{ vars.TELINK_IDE_DIR }}" >> ${env:GITHUB_ENV} | |
# The _PATH is the place we install to, the _SDK is where we reference to. | |
# echo "TELINK_ZIGBEE_SDK_PATH=${env:GITHUB_WORKSPACE}\${{ vars.TELINK_ZIGBEE_SDK_DIR}} " >> ${env:GITHUB_ENV} | |
echo "TELINK_ZIGBEE_SDK_PATH=${Qualifier}\${{ vars.TELINK_ZIGBEE_SDK_DIR}}" >> ${env:GITHUB_ENV} | |
# echo "TELINK_ZIGBEE_SDK=${env:GITHUB_WORKSPACE}\${{ vars.TELINK_ZIGBEE_SDK_DIR }}\tl_zigbee_sdk" >> ${env:GITHUB_ENV} | |
echo "TELINK_ZIGBEE_SDK=${Qualifier}\${{ vars.TELINK_ZIGBEE_SDK_DIR }}\tl_zigbee_sdk" >> ${env:GITHUB_ENV} | |
- id: install-ide | |
uses: ./actions/telink/tlsr825x/install-ide | |
with: | |
telink_ide_path: ${{ env.TELINK_IDE_PATH }} | |
telink_ide_uri: ${{ vars.TELINK_IDE_URI }} | |
telink_ide_zip: ${{ vars.TELINK_IDE_ZIP }} | |
telink_ide_hash: ${{ vars.TELINK_IDE_HASH }} | |
debug: ${{ vars.DEBUG }} | |
- id: install-zigbee-sdk | |
uses: ./actions/telink/tlsr825x/install-tl-zigbee-sdk | |
with: | |
telink_zigbee_sdk_path: ${{ env.TELINK_ZIGBEE_SDK_PATH }} | |
telink_zigbee_sdk_uri: ${{ vars.TELINK_ZIGBEE_SDK_URI }} | |
telink_zigbee_sdk_zip: ${{ vars.TELINK_ZIGBEE_SDK_ZIP }} | |
telink_zigbee_sdk_hash: ${{ vars.TELINK_ZIGBEE_SDK_HASH }} | |
debug: ${{ vars.DEBUG }} | |
- id: build-tlsr825x-image | |
uses: ./actions/telink/tlsr825x/build | |
with: | |
telink_ide: ${{ env.TELINK_IDE_PATH }} | |
telink_zigbee_sdk: ${{ env.TELINK_ZIGBEE_SDK }} | |
project: ${{ vars.TLSR8258_PROJECT }} | |
target: ${{ vars.TLSR8258_TARGET }} | |
debug: ${{ vars.DEBUG }} | |
- if: github.ref_type == 'tag' | |
id: prepare-for-blob-upload | |
name: Prepare firmware for upload to Azure blob storage | |
shell: bash | |
run: | | |
mkdir _azure.upload | |
cp ${{ vars.TLSR8258_PROJECT }}\${{ vars.TLSR8258_TARGET }}\${{ vars.TLSR8258_TARGET }}.bin _azure.upload | |
cp ${{ vars.TLSR8258_PROJECT }}\${{ vars.TLSR8258_TARGET }}\${{ vars.TLSR8258_TARGET }}.elf _azure.upload | |
cp ${{ vars.TLSR8258_PROJECT }}\${{ vars.TLSR8258_TARGET }}\${{ vars.TLSR8258_TARGET }}.lst _azure.upload | |
- if: github.ref_type == 'tag' | |
name: Upload firmware to Azure blob storage | |
uses: fixpoint/azblob-upload-artifact@v4 | |
with: | |
connection-string: '${{ secrets.AZURE_STORAGE_CONNECTION_STRING }}' | |
container: 'cloudsmets' | |
name: '${{ github.ref_name }}' | |
path: '_azure.upload' | |
- uses: actions/upload-artifact@v3 | |
name: Upload firmware to GitHub artifacts storage | |
with: | |
name: tlsr8258-firmware | |
path: | | |
${{ vars.TLSR8258_PROJECT }}\${{ vars.TLSR8258_TARGET }}\${{ vars.TLSR8258_TARGET }}.bin | |
${{ vars.TLSR8258_PROJECT }}\${{ vars.TLSR8258_TARGET }}\${{ vars.TLSR8258_TARGET }}.elf | |
${{ vars.TLSR8258_PROJECT }}\${{ vars.TLSR8258_TARGET }}\${{ vars.TLSR8258_TARGET }}.lst | |
retention-days: 1 | |
if-no-files-found: error | |