Skip to content

ci: streamline cache flow #713

ci: streamline cache flow

ci: streamline cache flow #713

Workflow file for this run

name: ci
on:
pull_request:
workflow_dispatch:
push:
branches: main
jobs:
Test:
strategy:
matrix:
lua-version: ["5.4", "5.3", "5.2", "5.1", "luajit"]
os: ["ubuntu-latest"]
include:
- os: "macos-latest"
lua-version: "5.4"
- os: "windows-latest"
lua-version: "luajit"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@master
- uses: luarocks/gh-actions-lua@master
with:
luaVersion: ${{ matrix.lua-version }}
- uses: luarocks/gh-actions-luarocks@master
- name: Cache LuaRocks packages
id: cache
uses: actions/cache@v4
with:
path: ${{ runner.os == 'Windows' && 'C:\\Users\\runneradmin\\AppData\\Roaming\\luarocks' || format('{0}/.luarocks', github.workspace) }}
key: ${{ runner.os }}-luarocks-${{ matrix.lua-version }}-${{ hashFiles('**/luarocks.lock') }}
- name: Build
run: |
luarocks make --only-deps
- name: Test
run: |
luarocks lint tl-dev-1.rockspec
make selfbuild
luarocks test