Skip to content

Accelerate GitHub Actions workflow #7

Accelerate GitHub Actions workflow

Accelerate GitHub Actions workflow #7

Workflow file for this run

# NOTE:
# Workflow for creating a cache.
# Currently, all jobs can share the cache,
# but the data to be cached is not necessarily created by all jobs (e.g. plt files).
# For this reason, this workflow is used to create the cache in batches.
# Another advantage of this method is that
# the absence of a cache does not cause jobs to take longer to run.
name: Create cache
on:
push:
branches: ["main"]
pull_request:
types: ["opened", "synchronize", "reopened"]
env:
otp: 26.0
rebar3: 3.22.1
jobs:
create-cache:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ env.otp }}
rebar3-version: ${{ env.rebar3 }}
- uses: actions/cache@v4
id: cache
with:
key: ${{ runner.os }}-otp-${{ env.otp }}-rebar3-${{ env.rebar3 }}-${{ hashFiles('rebar.lock') }}
path: |
~/.cache/rebar3
_build
- name: Create cache data
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
run: |
rebar3 compile
rebar3 as test compile
rebar3 dialyzer