Skip to content

Commit

Permalink
circle ci skip cache for toolchain
Browse files Browse the repository at this point in the history
action skip cache for toolchain url hosted by github
  • Loading branch information
hathach committed May 21, 2024
1 parent c2cfb71 commit 7ea06f8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
26 changes: 13 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ commands:
toolchain_url:
type: string
steps:
- run:
name: Make toolchain cache key
command: echo "<< parameters.toolchain >>-<< parameters.toolchain_url>>" > toolchain_key
- restore_cache:
name: Restore Toolchain Cache
key: deps-{{ checksum "toolchain_key" }}
paths:
- ~/cache/<< parameters.toolchain >>
# - run:
# name: Make toolchain cache key
# command: echo "<< parameters.toolchain >>-<< parameters.toolchain_url>>" > toolchain_key
# - restore_cache:
# name: Restore Toolchain Cache
# key: deps-{{ checksum "toolchain_key" }}
# paths:
# - ~/cache/<< parameters.toolchain >>
- run:
name: Install Toolchain
command: |
Expand All @@ -25,11 +25,11 @@ commands:
wget << parameters.toolchain_url>> -O toolchain.tar.gz
tar -C ~/cache/<< parameters.toolchain >> -xaf toolchain.tar.gz
fi
- save_cache:
name: Save Toolchain Cache
key: deps-{{ checksum "toolchain_key" }}
paths:
- ~/cache/<< parameters.toolchain >>
# - save_cache:
# name: Save Toolchain Cache
# key: deps-{{ checksum "toolchain_key" }}
# paths:
# - ~/cache/<< parameters.toolchain >>
- run:
name: Setup build environment
command: |
Expand Down
3 changes: 2 additions & 1 deletion .github/actions/setup_toolchain/download/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ runs:
using: "composite"
steps:
- name: Cache Toolchain
if: ${{ !startsWith(inputs.toolchain_url, 'https://github.com') }}
uses: actions/cache@v4
id: cache-toolchain-download
with:
Expand All @@ -22,7 +23,7 @@ runs:
if: steps.cache-toolchain-download.outputs.cache-hit != 'true'
run: |
mkdir -p ~/cache/${{ inputs.toolchain }}
wget --progress=dot:mega ${{ inputs.toolchain_url }} -O toolchain.tar.gz
wget ${{ inputs.toolchain_url }} -O toolchain.tar.gz
tar -C ~/cache/${{ inputs.toolchain }} -xaf toolchain.tar.gz
shell: bash

Expand Down

0 comments on commit 7ea06f8

Please sign in to comment.