cache ruby build
Some checks failed
Book / test (pull_request) Has been cancelled
Rust / build (pull_request) Has been cancelled

This commit is contained in:
Jaroslaw Konik 2025-05-27 18:09:59 +02:00
parent 2621e1ef53
commit f404ee91f2
2 changed files with 21 additions and 0 deletions

View file

@ -17,7 +17,14 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Cache Ruby
id: cache-ruby
uses: actions/cache@v4
with:
path: rubies
key: ${{ runner.os }}-ruby
- name: Install Ruby
if: steps.cache-ruby.outputs.cache-hit != 'true'
env:
CC: clang
run: |
@ -32,6 +39,10 @@ jobs:
../configure --without-shared --prefix=$prefix
make install
echo $prefix/bin >> $GITHUB_PATH
- name: Add Ruby to PATH
run: |
prefix=`pwd`/rubies/ruby-3.4
echo $prefix/bin >> $GITHUB_PATH
- name: Install latest mdbook
run: |
tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name')

View file

@ -16,7 +16,14 @@ jobs:
RUSTFLAGS: -D warnings
steps:
- uses: actions/checkout@v3
- name: Cache Ruby
id: cache-ruby
uses: actions/cache@v4
with:
path: rubies
key: ${{ runner.os }}-ruby
- name: Install Ruby
if: steps.cache-ruby.outputs.cache-hit != 'true'
env:
CC: clang
run: |
@ -30,6 +37,9 @@ jobs:
cd build
../configure --without-shared --prefix=$prefix
make install
- name: Add Ruby to PATH
run: |
prefix=`pwd`/rubies/ruby-3.4
echo $prefix/bin >> $GITHUB_PATH
- name: Clippy
run: cargo clippy --all-features --verbose -- -D warnings