1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Cache downloaded files

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.
This commit is contained in:
Nobuyoshi Nakada 2021-12-02 22:21:20 +09:00 committed by GitHub
parent 60fc8dda64
commit 3f1dcd7fff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
Notes: git 2021-12-02 22:21:50 +09:00
Merged: https://github.com/ruby/ruby/pull/5201

Merged-By: nobu <nobu@ruby-lang.org>
10 changed files with 42 additions and 0 deletions

View file

@ -33,6 +33,10 @@ jobs:
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: .downloaded-cache
key: downloaded-cache
- uses: ruby/setup-ruby@v1 - uses: ruby/setup-ruby@v1
with: with:
ruby-version: ${{ matrix.ruby }} ruby-version: ${{ matrix.ruby }}

View file

@ -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 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' }} if: ${{ steps.diff.outcome == 'failure' }}
- uses: actions/cache@v2
with:
path: .downloaded-cache
key: downloaded-cache
- name: Build - name: Build
run: | run: |
./autogen.sh ./autogen.sh

View file

@ -39,6 +39,10 @@ jobs:
git config --global advice.detachedHead 0 git config --global advice.detachedHead 0
git config --global init.defaultBranch garbage git config --global init.defaultBranch garbage
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: .downloaded-cache
key: downloaded-cache
- run: ./autogen.sh - run: ./autogen.sh
- name: Run configure - name: Run configure
run: ./configure -C --disable-install-doc --disable-rubygems --with-gcc 'optflags=-O0' 'debugflags=-save-temps=obj -g' run: ./configure -C --disable-install-doc --disable-rubygems --with-gcc 'optflags=-O0' 'debugflags=-save-temps=obj -g'

View file

@ -37,6 +37,11 @@ jobs:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v2 uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: .downloaded-cache
key: downloaded-cache
- name: Remove an obsolete rubygems vendored file - name: Remove an obsolete rubygems vendored file
run: sudo rm /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb run: sudo rm /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb

View file

@ -200,6 +200,10 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
path: src path: src
- uses: actions/cache@v2
with:
path: src/.downloaded-cache
key: downloaded-cache
- run: ./autogen.sh - run: ./autogen.sh
working-directory: src working-directory: src
- name: Run configure - name: Run configure

View file

@ -54,6 +54,10 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
path: src path: src
- uses: actions/cache@v2
with:
path: src/.downloaded-cache
key: downloaded-cache
- name: Set up Ruby & MSYS2 - name: Set up Ruby & MSYS2
uses: MSP-Greg/ruby-setup-ruby@win-ucrt-1 uses: MSP-Greg/ruby-setup-ruby@win-ucrt-1
with: with:

View file

@ -42,6 +42,10 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
path: src path: src
- uses: actions/cache@v2
with:
path: src/.downloaded-cache
key: downloaded-cache
- name: Fixed world writable dirs - name: Fixed world writable dirs
run: | run: |
chmod -v go-w $HOME $HOME/.config chmod -v go-w $HOME $HOME/.config

View file

@ -66,6 +66,10 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
path: src path: src
- uses: actions/cache@v2
with:
path: src/.downloaded-cache
key: downloaded-cache
- name: Fixed world writable dirs - name: Fixed world writable dirs
run: | run: |
chmod -v go-w $HOME $HOME/.config chmod -v go-w $HOME $HOME/.config

View file

@ -80,6 +80,10 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
path: src path: src
- uses: actions/cache@v2
with:
path: src/.downloaded-cache
key: downloaded-cache
- name: setup env - name: setup env
# %TEMP% is inconsistent with %TMP% and test-all expects they are consistent. # %TEMP% is inconsistent with %TMP% and test-all expects they are consistent.
# https://github.com/actions/virtual-environments/issues/712#issuecomment-613004302 # https://github.com/actions/virtual-environments/issues/712#issuecomment-613004302

View file

@ -58,6 +58,10 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
path: src path: src
- uses: actions/cache@v2
with:
path: src/.downloaded-cache
key: downloaded-cache
- name: Fixed world writable dirs - name: Fixed world writable dirs
run: | run: |
chmod -v go-w $HOME $HOME/.config chmod -v go-w $HOME $HOME/.config