Skip to content

rewrite using tools-cache (#25) #148

rewrite using tools-cache (#25)

rewrite using tools-cache (#25) #148

Workflow file for this run

on: [push]
jobs:
check:
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- name: Setup Babashka
id: setup-babashka-1
uses: turtlequeue/setup-babashka@main
with:
babashka-version: 1.3.189
- name: Check if bb runs fine
run: bb --version
- name: Setup Babashka from cache
id: setup-babashka-2
uses: turtlequeue/setup-babashka@main
with:
babashka-version: 1.3.189
fail-on-cache-miss: true
- name: Check if bb runs fine from cache
run: bb --version
- name: Test Cache
run: |
if [ -z "${{ steps.setup-babashka-1.outputs.cache-hit }}" ]; then
echo "Cache-hit output not set in first run. Failing the job."
exit 1
elif [ "${{ steps.setup-babashka-2.outputs.cache-hit }}" != "true" ]; then
echo "Cache not used in the second run. Failing the job."
exit 1
fi
shell: bash
check-url:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
babashka-url: ['https://github.com/babashka/babashka/releases/download/v1.3.189/babashka-1.3.189-linux-amd64-static.tar.gz']
steps:
- name: Setup Babashka
id: setup-babashka-1
uses: turtlequeue/setup-babashka@main
with:
babashka-version: 1.3.189
babashka-url: ${{ matrix.babashka-url }}
- name: Check if bb runs fine
run: bb --version
- name: Setup Babashka from cache
id: setup-babashka-2
uses: turtlequeue/setup-babashka@main
with:
babashka-version: 1.3.189
babashka-url: ${{ matrix.babashka-url }}
fail-on-cache-miss: true
- name: Check if bb runs fine from cache
run: bb --version
- name: Test Cache
run: |
if [ -z "${{ steps.setup-babashka-1.outputs.cache-hit }}" ]; then
echo "Cache-hit output not set in first run. Failing the job."
exit 1
elif [ "${{ steps.setup-babashka-2.outputs.cache-hit }}" != "true" ]; then
echo "Cache not used in the second run. Failing the job."
exit 1
fi
shell: bash
check-windows:
# https://ci.appveyor.com/project/borkdude/babashka
runs-on: windows-latest
strategy:
matrix:
babashka-url: ['https://ci.appveyor.com/api/buildjobs/hgg0343wy6uj4xog/artifacts/babashka-1.3.190-SNAPSHOT-windows-amd64.zip']
steps:
- name: Setup Babashka
id: setup-babashka-1
uses: turtlequeue/setup-babashka@main
with:
babashka-version: 1.3.190-SNAPSHOT
babashka-url: ${{ matrix.babashka-url }}
- name: Check if bb runs fine
run: bb --version
- name: Setup Babashka from cache
id: setup-babashka-2
uses: turtlequeue/setup-babashka@main
with:
babashka-version: 1.3.190-SNAPSHOT
babashka-url: ${{ matrix.babashka-url }}
fail-on-cache-miss: true
- name: Check if bb runs fine from cache
run: bb --version
- name: Test Cache
run: |
if [ -z "${{ steps.setup-babashka-1.outputs.cache-hit }}" ]; then
echo "Cache-hit output not set in first run. Failing the job."
exit 1
elif [ "${{ steps.setup-babashka-2.outputs.cache-hit }}" != "true" ]; then
echo "Cache not used in the second run. Failing the job."
exit 1
fi
shell: bash