diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 6132728f..32ec8ee9 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -33,7 +33,7 @@ jobs: run: df -hT - name: Checkout source - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Prepare firmware run: | @@ -45,11 +45,13 @@ jobs: sudo chown $USER:$USER /mnt/workspace rsync -a "$GITHUB_WORKSPACE/" /mnt/workspace/ - - name: Setup ccache - uses: actions/cache@v4 + - name: Cache ccache + uses: actions/cache@v5 with: path: /tmp/ccache - key: ${{ matrix.platform }}-${{ env.CACHE_DATE }} + key: ${{ matrix.platform }}-ccache-${{ env.CACHE_DATE }} + restore-keys: | + ${{ matrix.platform }}-ccache- - name: Build firmware working-directory: /mnt/workspace @@ -60,13 +62,13 @@ jobs: echo "GIT_BRANCH=${GITHUB_BRANCH}" >> $GITHUB_ENV mkdir -p /tmp/ccache - ln -s /tmp/ccache ${HOME}/.ccache + export BR2_CCACHE_DIR=/tmp/ccache NAME=${{ matrix.platform }} DEFCONFIG=${NAME}_defconfig bash build.sh - name: Upload images to workflow artifacts - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 with: name: ${{ matrix.platform }}-images-${{ github.sha }} path: | @@ -86,10 +88,10 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Download all artifacts - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v8 with: path: artifacts/ @@ -113,10 +115,10 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Download all artifacts - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v8 with: path: artifacts/ diff --git a/build.sh b/build.sh index b7556eef..2cff245b 100755 --- a/build.sh +++ b/build.sh @@ -45,7 +45,7 @@ fi # Function to download and extract Buildroot setup_buildroot() { - if [ ! -d "$BUILDROOT_DIR" ]; then + if [ ! -f "$BUILDROOT_DIR/Makefile" ]; then echo "Downloading Buildroot ${BUILDROOT_VERSION}..." if command -v wget >/dev/null 2>&1; then wget "$BUILDROOT_SOURCE" @@ -59,7 +59,9 @@ setup_buildroot() { echo "Extracting Buildroot..." tar -xzf "$BUILDROOT_TARBALL" rm "$BUILDROOT_TARBALL" - mv "buildroot-${BUILDROOT_VERSION}" "$BUILDROOT_DIR" + # Use rsync to merge with any existing directory (e.g. cached dl/) + rsync -a "buildroot-${BUILDROOT_VERSION}/" "$BUILDROOT_DIR/" + rm -rf "buildroot-${BUILDROOT_VERSION}" else echo "Buildroot source already exists at $BUILDROOT_DIR" fi diff --git a/configs/emax_wyvern-link_defconfig b/configs/emax_wyvern-link_defconfig index a82559f7..6ef0b8d1 100644 --- a/configs/emax_wyvern-link_defconfig +++ b/configs/emax_wyvern-link_defconfig @@ -1,5 +1,6 @@ BR2_aarch64=y BR2_cortex_a55=y +BR2_CCACHE=y BR2_TOOLCHAIN_EXTERNAL=y BR2_PACKAGE_OVERRIDE_FILE="${BR2_EXTERNAL_OPENIPC_SBC_GS_PATH}/board/common/local.mk" BR2_TARGET_GENERIC_HOSTNAME="openipcgs" diff --git a/configs/openipc_bonnet_defconfig b/configs/openipc_bonnet_defconfig index 748c6986..23441017 100644 --- a/configs/openipc_bonnet_defconfig +++ b/configs/openipc_bonnet_defconfig @@ -1,5 +1,6 @@ BR2_aarch64=y BR2_cortex_a55=y +BR2_CCACHE=y BR2_TOOLCHAIN_EXTERNAL=y BR2_PACKAGE_OVERRIDE_FILE="${BR2_EXTERNAL_OPENIPC_SBC_GS_PATH}/board/common/local.mk" BR2_TARGET_GENERIC_HOSTNAME="openipcgs" diff --git a/configs/radxa_zero3_defconfig b/configs/radxa_zero3_defconfig index 83576f9b..08e10672 100644 --- a/configs/radxa_zero3_defconfig +++ b/configs/radxa_zero3_defconfig @@ -1,5 +1,6 @@ BR2_aarch64=y BR2_cortex_a55=y +BR2_CCACHE=y BR2_TOOLCHAIN_EXTERNAL=y BR2_PACKAGE_OVERRIDE_FILE="${BR2_EXTERNAL_OPENIPC_SBC_GS_PATH}/board/common/local.mk" BR2_TARGET_GENERIC_HOSTNAME="openipcgs" diff --git a/configs/runcam_wifilink_defconfig b/configs/runcam_wifilink_defconfig index 0575f585..06721d28 100644 --- a/configs/runcam_wifilink_defconfig +++ b/configs/runcam_wifilink_defconfig @@ -1,5 +1,6 @@ BR2_aarch64=y BR2_cortex_a55=y +BR2_CCACHE=y BR2_TOOLCHAIN_EXTERNAL=y BR2_PACKAGE_OVERRIDE_FILE="${BR2_EXTERNAL_OPENIPC_SBC_GS_PATH}/board/common/local.mk" BR2_TARGET_GENERIC_HOSTNAME="openipcgs"