ci: major overhaul
- Simplify some workflow steps and auxiliary scripts - Build library using cmake when not cross-compiling - Try to fetch fixtures from cache first - Use `actions-rust-lang/setup-rust-toolchain`
This commit is contained in:
parent
7715001692
commit
e8e56255bd
11 changed files with 268 additions and 255 deletions
23
.github/actions/cache/action.yml
vendored
23
.github/actions/cache/action.yml
vendored
|
|
@ -1,24 +1,23 @@
|
|||
name: 'Cache'
|
||||
description: "This action caches fixtures"
|
||||
name: Cache
|
||||
|
||||
description: This action caches fixtures
|
||||
|
||||
outputs:
|
||||
cache-hit:
|
||||
description: 'Cache hit'
|
||||
value: ${{ steps.cache_output.outputs.cache-hit }}
|
||||
description: Cache hit
|
||||
value: ${{ steps.cache.outputs.cache-hit }}
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
using: composite
|
||||
steps:
|
||||
- uses: actions/cache@v4
|
||||
id: cache_fixtures
|
||||
id: cache
|
||||
with:
|
||||
path: |
|
||||
test/fixtures/grammars
|
||||
target/release/tree-sitter-*.wasm
|
||||
key: fixtures-${{ join(matrix.*, '_') }}-${{ hashFiles(
|
||||
'cli/src/generate/**',
|
||||
'script/generate-fixtures*',
|
||||
'cli/generate/src/**',
|
||||
'xtask/src/*',
|
||||
'test/fixtures/grammars/*/**/src/*.c',
|
||||
'.github/actions/cache/action.yml') }}
|
||||
|
||||
- run: echo "cache-hit=${{ steps.cache_fixtures.outputs.cache-hit }}" >> $GITHUB_OUTPUT
|
||||
shell: bash
|
||||
id: cache_output
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue