cache ruby build
This commit is contained in:
parent
2621e1ef53
commit
f404ee91f2
2 changed files with 21 additions and 0 deletions
11
.github/workflows/book.yml
vendored
11
.github/workflows/book.yml
vendored
|
|
@ -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')
|
||||
|
|
|
|||
10
.github/workflows/rust.yml
vendored
10
.github/workflows/rust.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue