From f99a7fe44b52b9de4a6dabb139dfb10519658b33 Mon Sep 17 00:00:00 2001 From: Fabio Belavenuto Date: Tue, 31 Jan 2023 16:52:41 -0300 Subject: [PATCH] Testing actions --- .github/workflows/main.yml | 32 ++++++++++++++++++++++++++------ files/configs/arpl_defconfig | 1 + 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 127ed31c..2abea532 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,9 +14,17 @@ jobs: steps: - uses: actions/checkout@v3 - # Check cache + # Check dl cache + - name: Cache downloads + id: dl-cache + uses: actions/cache@v3 + with: + path: ~/dl + key: ${{ runner.os }}-dl + + # Check buildroot cache - name: Cache buildroot - id: cache + id: br-cache uses: actions/cache@v3 with: path: .buildroot @@ -61,9 +69,9 @@ jobs: [ ${STATUS} -ne 200 ] && exit 1 echo OK - # Prepare buildroot for first make (for cache) - - name: Prepare buildroot - if: steps.cache.outputs.cache-hit != 'true' + # Clone buildroot repository (if not cached) + - name: Clone buildroot + if: steps.br-cache.outputs.cache-hit != 'true' run: | git clone --single-branch -b 2022.02 https://github.com/buildroot/buildroot.git .buildroot # Copy files @@ -72,10 +80,22 @@ jobs: cd .buildroot echo "Generating default config" make BR2_EXTERNAL=../external arpl_defconfig + + # Download sources if not cached + - name: Download buildroot packages source + if: steps.dl-cache.outputs.cache-hit != 'true' + run: | + cd .buildroot + make BR2_EXTERNAL=../external source + + # Prepare buildroot for first make + - name: Prepare buildroot + if: steps.br-cache.outputs.cache-hit != 'true' + run: | echo "First make" make BR2_EXTERNAL=../external - # Build incremental from cache + # Build incremental from caches - name: Build image id: build run: | diff --git a/files/configs/arpl_defconfig b/files/configs/arpl_defconfig index b97b7711..be5336d2 100644 --- a/files/configs/arpl_defconfig +++ b/files/configs/arpl_defconfig @@ -1,4 +1,5 @@ BR2_x86_64=y +BR2_DL_DIR="$(HOME)/dl" BR2_CCACHE=y BR2_CCACHE_DIR=".buildroot-ccache" BR2_TOOLCHAIN_BUILDROOT_GLIBC=y