From 14c5307b982baa4ed23f5529e424b3453d4b4cac Mon Sep 17 00:00:00 2001 From: rusdacent <57439765+rusdacent@users.noreply.github.com> Date: Thu, 25 Feb 2021 13:40:15 +0300 Subject: [PATCH] Bump version for target in CI (#350) * set target f5 for CI * test env var for target version * remove env variables from names of steps --- .github/workflows/ci.yml | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 97b3de06..bdb4087f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,9 @@ on: - 'wiki/**' - 'wiki_static/**' +env: + TARGET_VERSION: f5 + jobs: build: runs-on: [self-hosted] @@ -32,39 +35,39 @@ jobs: with: run: /syntax_check.sh - - name: Build F4 bootloader in docker + - name: Build bootloader in docker uses: ./.github/actions/docker with: - run: make -C bootloader TARGET=f4 + run: make -C bootloader TARGET=${TARGET_VERSION} - name: Generate dfu file for bootloader uses: ./.github/actions/docker with: - run: hex2dfu -i bootloader/.obj/f4/bootloader.hex -o bootloader/.obj/f4/bootloader.dfu + run: hex2dfu -i bootloader/.obj/${TARGET_VERSION}/bootloader.hex -o bootloader/.obj/${TARGET_VERSION}/bootloader.dfu - - name: Build F4 firmware in docker + - name: Build firmware in docker uses: ./.github/actions/docker with: - run: make -C firmware TARGET=f4 APP_RELEASE=1 + run: make -C firmware TARGET=${TARGET_VERSION} APP_RELEASE=1 - name: Generate dfu file for firmware uses: ./.github/actions/docker with: - run: hex2dfu -i firmware/.obj/f4/firmware.hex -o firmware/.obj/f4/firmware.dfu + run: hex2dfu -i firmware/.obj/${TARGET_VERSION}/firmware.hex -o firmware/.obj/${TARGET_VERSION}/firmware.dfu - name: Generate full hex file uses: ./.github/actions/docker with: - run: srec_cat bootloader/.obj/f4/bootloader.hex -Intel firmware/.obj/f4/firmware.hex -Intel -o full.hex -Intel + run: srec_cat bootloader/.obj/${TARGET_VERSION}/bootloader.hex -Intel firmware/.obj/${TARGET_VERSION}/firmware.hex -Intel -o full.hex -Intel - name: Move upload files uses: ./.github/actions/docker with: run: | - mv bootloader/.obj/f4/bootloader.dfu bootloader.dfu - mv bootloader/.obj/f4/bootloader.bin bootloader.bin - mv firmware/.obj/f4/firmware.dfu firmware.dfu - mv firmware/.obj/f4/firmware.bin firmware.bin + mv bootloader/.obj/${TARGET_VERSION}/bootloader.dfu bootloader.dfu + mv bootloader/.obj/${TARGET_VERSION}/bootloader.bin bootloader.bin + mv firmware/.obj/${TARGET_VERSION}/firmware.dfu firmware.dfu + mv firmware/.obj/${TARGET_VERSION}/firmware.bin firmware.bin - name: Generate full dfu file uses: ./.github/actions/docker @@ -78,10 +81,10 @@ jobs: - name: Add firmware.bin at full.bin run: cat firmware.bin >> full.bin - - name: Publish F4 artifacts + - name: Publish artifacts uses: actions/upload-artifact@v2 with: - name: artifacts_f4 + name: artifacts path: | bootloader.dfu bootloader.bin