From b53032a8a54fd93e70393a593af975d7efa68d45 Mon Sep 17 00:00:00 2001 From: "E.T" Date: Fri, 5 Jan 2024 21:59:15 +0100 Subject: [PATCH] Ppfw docker build (#1725) * Docker build ppfw by default * Allow GH workflows to be triggered from any branch * Fix asset path for github upload --- .github/workflows/create_nightly_release.yml | 12 +++++++----- .github/workflows/create_stable_release.yml | 12 +++++++----- dockerfile-nogit | 2 +- dockerfile-nogit-alpine | 2 +- dockerfile-nogit-arm | 2 +- 5 files changed, 17 insertions(+), 13 deletions(-) diff --git a/.github/workflows/create_nightly_release.yml b/.github/workflows/create_nightly_release.yml index 298cdc4c..7c5d39f5 100644 --- a/.github/workflows/create_nightly_release.yml +++ b/.github/workflows/create_nightly_release.yml @@ -36,7 +36,12 @@ jobs: uses: actions/checkout@master with: fetch-depth: 0 - ref: next + #ref: next + # The branch, tag or SHA to checkout. When checking out the repository that + # triggered a workflow, this defaults to the reference or SHA for that event. + # Otherwise, uses the default branch. + # https://github.com/actions/checkout + # So scheduled runs will use the default branch (next) but its now possible to trigger a workflow from another branch submodules: true - name: Git Sumbodule Update run: | @@ -56,9 +61,6 @@ jobs: - name: Unzip world map run: | unzip world_map.zip -d sdcard/ADSB - - name: Create Firmware TAR - run: | - mkdir -p firmware_tar/FIRMWARE && cp build/firmware/portapack-h1_h2-mayhem.bin firmware_tar/FIRMWARE/portapack-mayhem_${{ steps.version_date.outputs.date }}.bin && mkdir -p firmware_tar/APPS && cp build/firmware/application/*.ppma firmware_tar/APPS && cd firmware_tar && tar -cvaf ../portapack-mayhem.ppfw.tar * - name: Create Firmware ZIP run: | zip -j firmware.zip build/firmware/portapack-h1_h2-mayhem.bin && cd flashing && zip -r ../firmware.zip * @@ -98,7 +100,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./portapack-mayhem.ppfw.tar + asset_path: build/firmware/portapack-mayhem.ppfw.tar asset_name: mayhem_nightly_${{ steps.version_date.outputs.date }}_OCI.ppfw.tar asset_content_type: application/x-tar - name: Upload Firmware Asset diff --git a/.github/workflows/create_stable_release.yml b/.github/workflows/create_stable_release.yml index 213ee95c..5dac5ec2 100644 --- a/.github/workflows/create_stable_release.yml +++ b/.github/workflows/create_stable_release.yml @@ -14,7 +14,12 @@ jobs: uses: actions/checkout@master with: fetch-depth: 0 - ref: next + #ref: next + # The branch, tag or SHA to checkout. When checking out the repository that + # triggered a workflow, this defaults to the reference or SHA for that event. + # Otherwise, uses the default branch. + # https://github.com/actions/checkout + # So scheduled runs will use the default branch (next) but its now possible to trigger a workflow from another branch submodules: true - name: Git Sumbodule Update run: | @@ -40,9 +45,6 @@ jobs: - name: Unzip world map run: | unzip world_map.zip -d sdcard/ADSB - - name: Create Firmware TAR - run: | - mkdir -p firmware_tar/FIRMWARE && cp build/firmware/portapack-h1_h2-mayhem.bin firmware_tar/FIRMWARE/portapack-mayhem_${{ steps.version_date.outputs.date }}.bin && mkdir -p firmware_tar/APPS && cp build/firmware/application/*.ppma firmware_tar/APPS && cd firmware_tar && tar -cvaf ../portapack-mayhem.ppfw.tar * - name: Create Firmware ZIP run: | zip -j firmware.zip build/firmware/portapack-h1_h2-mayhem.bin && cd flashing && zip -r ../firmware.zip * @@ -92,7 +94,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./portapack-mayhem.ppfw.tar + asset_path: build/firmware/portapack-mayhem.ppfw.tar asset_name: mayhem_${{ steps.version.outputs.version }}_OCI.ppfw.tar asset_content_type: application/x-tar - name: Upload Firmware Asset diff --git a/dockerfile-nogit b/dockerfile-nogit index 862dc418..0f962e35 100644 --- a/dockerfile-nogit +++ b/dockerfile-nogit @@ -38,4 +38,4 @@ RUN mkdir ~/bin && cd ~/bin && \ for tool in gcc g++ cpp c++;do ln -s $(which ccache) arm-none-eabi-$tool;done CMD cd .. && cd build && \ - cmake .. && make firmware + cmake .. && make ppfw diff --git a/dockerfile-nogit-alpine b/dockerfile-nogit-alpine index f2f3a683..6c2f69cb 100644 --- a/dockerfile-nogit-alpine +++ b/dockerfile-nogit-alpine @@ -24,4 +24,4 @@ RUN mkdir ~/bin && cd ~/bin && \ for tool in gcc g++ cpp c++;do ln -s $(which ccache) arm-none-eabi-$tool;done CMD cd .. && cd build && \ - cmake .. && make firmware + cmake .. && make ppfw diff --git a/dockerfile-nogit-arm b/dockerfile-nogit-arm index 5d367076..385b7eb0 100644 --- a/dockerfile-nogit-arm +++ b/dockerfile-nogit-arm @@ -38,4 +38,4 @@ RUN mkdir ~/bin && cd ~/bin && \ for tool in gcc g++ cpp c++;do ln -s $(which ccache) arm-none-eabi-$tool;done CMD cd .. && cd build && \ - cmake .. && make firmware + cmake .. && make ppfw