ci: Cache timelord-cli to avoid unnecesary compilation

This commit is contained in:
Jade Ellis 2025-05-01 00:47:03 +01:00
parent a98da7d942
commit cbcf4300df
No known key found for this signature in database
GPG key ID: 8705A2A3EBF77BD2

View file

@ -80,17 +80,29 @@ jobs:
run: echo '${{ toJSON(fromJSON(needs.define-variables.outputs.build_matrix)) }}' run: echo '${{ toJSON(fromJSON(needs.define-variables.outputs.build_matrix)) }}'
- name: Echo matrix - name: Echo matrix
run: echo '${{ toJSON(matrix) }}' run: echo '${{ toJSON(matrix) }}'
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false
- run: | - run: |
if ! command -v rustup &> /dev/null ; then if ! command -v rustup &> /dev/null ; then
curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://sh.rustup.rs" | sh -s -- --default-toolchain none -y curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://sh.rustup.rs" | sh -s -- --default-toolchain none -y
echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH
fi fi
- uses: https://github.com/cargo-bins/cargo-binstall@main
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Cache timelord-cli installation
id: cache-timelord-bin
uses: actions/cache@v3
with:
path: ~/.cargo/bin/timelord
key: timelord-cli-v3.0.1
- name: Install timelord-cli
uses: https://github.com/cargo-bins/cargo-binstall@main
if: steps.cache-timelord-bin.outputs.cache-hit != 'true'
- run: cargo binstall timelord-cli@3.0.1 - run: cargo binstall timelord-cli@3.0.1
if: steps.cache-timelord-bin.outputs.cache-hit != 'true'
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: Set up QEMU - name: Set up QEMU