Skip to content

Commit

Permalink
DevOps: Auto build for Update Packages: build tup file: #56, evaluate…
Browse files Browse the repository at this point in the history
… use of GitHub Actions: #138
  • Loading branch information
JakobLichterfeld committed Feb 7, 2023
1 parent 72cfe29 commit bc46af0
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 5 deletions.
7 changes: 7 additions & 0 deletions .github/actions/platformio-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,10 @@ runs:
working-directory: ./mcu
shell: bash
run: pio run

- name: publish as artifact
uses: actions/upload-artifact@v3
with:
name: PlatformIO-build
path: ./mcu/.pio/build/az-delivery-devkit-v4/firmware.bin
retention-days: 1
9 changes: 8 additions & 1 deletion .github/actions/ui-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,11 @@ runs:
- name: Build
working-directory: ./ui
shell: bash
run: pnpm build
run: pnpm build

- name: publish as artifact
uses: actions/upload-artifact@v3
with:
name: UI-build
path: ./ui/dist/
retention-days: 1
1 change: 1 addition & 0 deletions .github/workflows/PlatformIO-Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ jobs:
steps:
- name: PlatformIO Build
uses: TheRealKasumi/TesLight/.github/actions/platformio-build@feat/DevOps_Auto_build_for_Update_Packages
# TODO replace with: uses: ./.github/actions/platformio-build
17 changes: 13 additions & 4 deletions .github/workflows/build_teslight_update_packaging_tool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,19 @@ jobs:
uses: TheRealKasumi/TesLight/.github/actions/ui-build@feat/DevOps_Auto_build_for_Update_Packages
# TODO replace with: uses: ./.github/actions/ui-build

- name: Download a single artifact
- name: Download artifact - PlatformIO Build
uses: actions/download-artifact@v3
with:
name: PlatformIO-build
path: ./update-package-tool/build/tup/src

- name: Download artifact - UI Build
uses: actions/download-artifact@v3
with:
name: UI-build
path: ./update-package-tool/build/tup/src

- name: Download artifact - TesLight_Update_Packaging_Tool_for_Linux
uses: actions/download-artifact@v3
with:
name: TesLight_Update_Packaging_Tool_for_Linux
Expand All @@ -144,9 +156,6 @@ jobs:
- name: tup build
shell: bash
run: |
mkdir -p ./update-package-tool/build/tup/src
cp ./mcu/.pio/build/az-delivery-devkit-v4/firmware.bin ./update-package-tool/build/tup/src/firmware.bin
cp ./ui/dist/. ./update-package-tool/build/tup/src
mkdir -p ./update-package-tool/build/tup/build
chmod +x ./update-package-tool/build/tupt_for_linux.exe
./update-package-tool/build/tupt_for_linux.exe ./update-package-tool/build/tup/build/update.tup ./update-package-tool/build/tup/src
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ui-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ jobs:
steps:
- name: UI lint
uses: TheRealKasumi/TesLight/.github/actions/ui-lint@feat/DevOps_Auto_build_for_Update_Packages
# TODO replace with: uses: ./.github/actions/ui-lint

build:
needs: [lint]
runs-on: ubuntu-latest
steps:
- name: UI build
uses: TheRealKasumi/TesLight/.github/actions/ui-build@feat/DevOps_Auto_build_for_Update_Packages
# TODO replace with: uses: ./.github/actions/ui-build

0 comments on commit bc46af0

Please sign in to comment.