Skip to content

Commit

Permalink
Cache downloaded files
Browse files Browse the repository at this point in the history
Cache downloaded external libraries/gems, which are expected not
changed so frequently.

Also sometimes downloading from zlib returns the current time as
the date header in unexpected format, and checksums mismatch at
that time.
  • Loading branch information
nobu committed Dec 2, 2021
1 parent 60fc8dd commit 3f1dcd7
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/baseruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: .downloaded-cache
key: downloaded-cache
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/bundled_gems.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ jobs:
sudo apt-get install --no-install-recommends -q -y build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev bison autoconf ruby
if: ${{ steps.diff.outcome == 'failure' }}

- uses: actions/cache@v2
with:
path: .downloaded-cache
key: downloaded-cache

- name: Build
run: |
./autogen.sh
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/check_dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ jobs:
git config --global advice.detachedHead 0
git config --global init.defaultBranch garbage
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: .downloaded-cache
key: downloaded-cache
- run: ./autogen.sh
- name: Run configure
run: ./configure -C --disable-install-doc --disable-rubygems --with-gcc 'optflags=-O0' 'debugflags=-save-temps=obj -g'
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- uses: actions/cache@v2
with:
path: .downloaded-cache
key: downloaded-cache

- name: Remove an obsolete rubygems vendored file
run: sudo rm /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/compilers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,10 @@ jobs:
- uses: actions/checkout@v2
with:
path: src
- uses: actions/cache@v2
with:
path: src/.downloaded-cache
key: downloaded-cache
- run: ./autogen.sh
working-directory: src
- name: Run configure
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/mingw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ jobs:
- uses: actions/checkout@v2
with:
path: src
- uses: actions/cache@v2
with:
path: src/.downloaded-cache
key: downloaded-cache
- name: Set up Ruby & MSYS2
uses: MSP-Greg/ruby-setup-ruby@win-ucrt-1
with:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/mjit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ jobs:
- uses: actions/checkout@v2
with:
path: src
- uses: actions/cache@v2
with:
path: src/.downloaded-cache
key: downloaded-cache
- name: Fixed world writable dirs
run: |
chmod -v go-w $HOME $HOME/.config
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ jobs:
- uses: actions/checkout@v2
with:
path: src
- uses: actions/cache@v2
with:
path: src/.downloaded-cache
key: downloaded-cache
- name: Fixed world writable dirs
run: |
chmod -v go-w $HOME $HOME/.config
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ jobs:
- uses: actions/checkout@v2
with:
path: src
- uses: actions/cache@v2
with:
path: src/.downloaded-cache
key: downloaded-cache
- name: setup env
# %TEMP% is inconsistent with %TMP% and test-all expects they are consistent.
# https://github.com/actions/virtual-environments/issues/712#issuecomment-613004302
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/yjit-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ jobs:
- uses: actions/checkout@v2
with:
path: src
- uses: actions/cache@v2
with:
path: src/.downloaded-cache
key: downloaded-cache
- name: Fixed world writable dirs
run: |
chmod -v go-w $HOME $HOME/.config
Expand Down

0 comments on commit 3f1dcd7

Please sign in to comment.