Merge pull request #2654 from hathach/update-circleci
circle ci remove deps caching to reduce storage credit
This commit is contained in:
@@ -8,14 +8,14 @@ commands:
|
|||||||
toolchain_url:
|
toolchain_url:
|
||||||
type: string
|
type: string
|
||||||
steps:
|
steps:
|
||||||
- run:
|
# - run:
|
||||||
name: Make toolchain cache key
|
# name: Make toolchain cache key
|
||||||
command: echo "<< parameters.toolchain >>-<< parameters.toolchain_url>>" > toolchain_key
|
# command: echo "<< parameters.toolchain >>-<< parameters.toolchain_url>>" > toolchain_key
|
||||||
- restore_cache:
|
# - restore_cache:
|
||||||
name: Restore Toolchain Cache
|
# name: Restore Toolchain Cache
|
||||||
key: deps-{{ checksum "toolchain_key" }}
|
# key: deps-{{ checksum "toolchain_key" }}
|
||||||
paths:
|
# paths:
|
||||||
- ~/cache/<< parameters.toolchain >>
|
# - ~/cache/<< parameters.toolchain >>
|
||||||
- run:
|
- run:
|
||||||
name: Install Toolchain
|
name: Install Toolchain
|
||||||
command: |
|
command: |
|
||||||
@@ -25,11 +25,11 @@ commands:
|
|||||||
wget << parameters.toolchain_url>> -O toolchain.tar.gz
|
wget << parameters.toolchain_url>> -O toolchain.tar.gz
|
||||||
tar -C ~/cache/<< parameters.toolchain >> -xaf toolchain.tar.gz
|
tar -C ~/cache/<< parameters.toolchain >> -xaf toolchain.tar.gz
|
||||||
fi
|
fi
|
||||||
- save_cache:
|
# - save_cache:
|
||||||
name: Save Toolchain Cache
|
# name: Save Toolchain Cache
|
||||||
key: deps-{{ checksum "toolchain_key" }}
|
# key: deps-{{ checksum "toolchain_key" }}
|
||||||
paths:
|
# paths:
|
||||||
- ~/cache/<< parameters.toolchain >>
|
# - ~/cache/<< parameters.toolchain >>
|
||||||
- run:
|
- run:
|
||||||
name: Setup build environment
|
name: Setup build environment
|
||||||
command: |
|
command: |
|
||||||
@@ -44,30 +44,10 @@ commands:
|
|||||||
family:
|
family:
|
||||||
type: string
|
type: string
|
||||||
steps:
|
steps:
|
||||||
- run:
|
|
||||||
name: Make deps cache key
|
|
||||||
command: |
|
|
||||||
python tools/get_deps.py --print > deps_key
|
|
||||||
- restore_cache:
|
|
||||||
name: Restore Dependencies Cache
|
|
||||||
key: deps-{{ checksum "deps_key" }}
|
|
||||||
paths:
|
|
||||||
- lib/CMSIS_5
|
|
||||||
- lib/FreeRTOS-Kernel
|
|
||||||
- lib/lwip
|
|
||||||
- tools/uf2
|
|
||||||
- run:
|
- run:
|
||||||
name: Get Dependencies
|
name: Get Dependencies
|
||||||
command: |
|
command: |
|
||||||
python tools/get_deps.py << parameters.family >>
|
python tools/get_deps.py << parameters.family >>
|
||||||
- save_cache:
|
|
||||||
name: Save Dependencies Cache
|
|
||||||
key: deps-{{ checksum "deps_key" }}
|
|
||||||
paths:
|
|
||||||
- lib/CMSIS_5
|
|
||||||
- lib/FreeRTOS-Kernel
|
|
||||||
- lib/lwip
|
|
||||||
- tools/uf2
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
arm-clang:
|
arm-clang:
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ runs:
|
|||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- name: Cache Toolchain
|
- name: Cache Toolchain
|
||||||
|
if: ${{ !startsWith(inputs.toolchain_url, 'https://github.com') }}
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
id: cache-toolchain-download
|
id: cache-toolchain-download
|
||||||
with:
|
with:
|
||||||
@@ -22,7 +23,7 @@ runs:
|
|||||||
if: steps.cache-toolchain-download.outputs.cache-hit != 'true'
|
if: steps.cache-toolchain-download.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ~/cache/${{ inputs.toolchain }}
|
mkdir -p ~/cache/${{ inputs.toolchain }}
|
||||||
wget --progress=dot:mega ${{ inputs.toolchain_url }} -O toolchain.tar.gz
|
wget --progress=dot:giga ${{ inputs.toolchain_url }} -O toolchain.tar.gz
|
||||||
tar -C ~/cache/${{ inputs.toolchain }} -xaf toolchain.tar.gz
|
tar -C ~/cache/${{ inputs.toolchain }} -xaf toolchain.tar.gz
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
|
|||||||
@@ -11,32 +11,31 @@ inputs:
|
|||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- id: set-docker-image
|
- name: Set DOCKER_ESP_IDF
|
||||||
run: |
|
run: |
|
||||||
DOCKER_IMAGE=$HOME/cache/${{ inputs.toolchain }}/docker_image.tar
|
DOCKER_ESP_IDF=$HOME/cache/${{ inputs.toolchain }}/docker_image.tar
|
||||||
echo "DOCKER_IMAGE=$DOCKER_IMAGE" >> $GITHUB_ENV
|
echo "DOCKER_ESP_IDF=$DOCKER_ESP_IDF" >> $GITHUB_ENV
|
||||||
echo "DOCKER_IMAGE=$DOCKER_IMAGE" >> $GITHUB_OUTPUT
|
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Cache Docker Image
|
- name: Cache Docker Image
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
id: cache-toolchain-espressif
|
id: cache-toolchain-espressif
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.set-docker-image.outputs.DOCKER_IMAGE }}
|
path: ${{ env.DOCKER_ESP_IDF }}
|
||||||
key: ${{ inputs.toolchain }}-${{ inputs.toolchain_url }}
|
key: ${{ inputs.toolchain }}-${{ inputs.toolchain_url }}
|
||||||
|
|
||||||
- name: Pull and Save Docker Image
|
- name: Pull and Save Docker Image
|
||||||
if: steps.cache-toolchain-espressif.outputs.cache-hit != 'true'
|
if: steps.cache-toolchain-espressif.outputs.cache-hit != 'true'
|
||||||
run: |
|
run: |
|
||||||
docker pull espressif/idf:${{ inputs.toolchain_url }}
|
docker pull espressif/idf:${{ inputs.toolchain_url }}
|
||||||
mkdir -p ~/cache/${{ inputs.toolchain }}
|
mkdir -p $(dirname $DOCKER_ESP_IDF)
|
||||||
docker save -o $DOCKER_IMAGE espressif/idf:${{ inputs.toolchain_url }}
|
docker save -o $DOCKER_ESP_IDF espressif/idf:${{ inputs.toolchain_url }}
|
||||||
du -sh $DOCKER_IMAGE
|
du -sh $DOCKER_ESP_IDF
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Load Docker Image
|
- name: Load Docker Image
|
||||||
if: steps.cache-toolchain-espressif.outputs.cache-hit == 'true'
|
if: steps.cache-toolchain-espressif.outputs.cache-hit == 'true'
|
||||||
run: |
|
run: |
|
||||||
du -sh $DOCKER_IMAGE
|
du -sh $DOCKER_ESP_IDF
|
||||||
docker load --input $DOCKER_IMAGE
|
docker load --input $DOCKER_ESP_IDF
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|||||||
Reference in New Issue
Block a user