[前][次][番号順一覧][スレッド一覧]

ruby-changes:70020

From: Nobuyoshi <ko1@a...>
Date: Thu, 2 Dec 2021 22:21:44 +0900 (JST)
Subject: [ruby-changes:70020] 3f1dcd7fff (master): Cache downloaded files

https://git.ruby-lang.org/ruby.git/commit/?id=3f1dcd7fff

From 3f1dcd7fffbe94538c233d4f916523b00dbc2889 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Thu, 2 Dec 2021 22:21:20 +0900
Subject: 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.
---
 .github/workflows/baseruby.yml           | 4 ++++
 .github/workflows/bundled_gems.yml       | 5 +++++
 .github/workflows/check_dependencies.yml | 4 ++++
 .github/workflows/codeql-analysis.yml    | 5 +++++
 .github/workflows/compilers.yml          | 4 ++++
 .github/workflows/mingw.yml              | 4 ++++
 .github/workflows/mjit.yml               | 4 ++++
 .github/workflows/ubuntu.yml             | 4 ++++
 .github/workflows/windows.yml            | 4 ++++
 .github/workflows/yjit-ubuntu.yml        | 4 ++++
 10 files changed, 42 insertions(+)

diff --git a/.github/workflows/baseruby.yml b/.github/workflows/baseruby.yml
index 089cc354aec..24b867c7fc0 100644
--- a/.github/workflows/baseruby.yml
+++ b/.github/workflows/baseruby.yml
@@ -33,6 +33,10 @@ jobs: https://github.com/ruby/ruby/blob/trunk/.github/workflows/baseruby.yml#L33
 
     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 }}
diff --git a/.github/workflows/bundled_gems.yml b/.github/workflows/bundled_gems.yml
index aacc08f3957..81ba5cd5b48 100644
--- a/.github/workflows/bundled_gems.yml
+++ b/.github/workflows/bundled_gems.yml
@@ -38,6 +38,11 @@ jobs: https://github.com/ruby/ruby/blob/trunk/.github/workflows/bundled_gems.yml#L38
           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
diff --git a/.github/workflows/check_dependencies.yml b/.github/workflows/check_dependencies.yml
index 4958b34cff8..c68e49a4641 100644
--- a/.github/workflows/check_dependencies.yml
+++ b/.github/workflows/check_dependencies.yml
@@ -39,6 +39,10 @@ jobs: https://github.com/ruby/ruby/blob/trunk/.github/workflows/check_dependencies.yml#L39
           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'
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 1ef2ed6fd6c..d22da8e481a 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -37,6 +37,11 @@ jobs: https://github.com/ruby/ruby/blob/trunk/.github/workflows/codeql-analysis.yml#L37
     - 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
 
diff --git a/.github/workflows/compilers.yml b/.github/workflows/compilers.yml
index 880eb2b588c..2c2b6598f76 100644
--- a/.github/workflows/compilers.yml
+++ b/.github/workflows/compilers.yml
@@ -200,6 +200,10 @@ jobs: https://github.com/ruby/ruby/blob/trunk/.github/workflows/compilers.yml#L200
       - 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
diff --git a/.github/workflows/mingw.yml b/.github/workflows/mingw.yml
index eb87f66ad88..c2db3df1ade 100644
--- a/.github/workflows/mingw.yml
+++ b/.github/workflows/mingw.yml
@@ -54,6 +54,10 @@ jobs: https://github.com/ruby/ruby/blob/trunk/.github/workflows/mingw.yml#L54
       - 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:
diff --git a/.github/workflows/mjit.yml b/.github/workflows/mjit.yml
index a160e0a24ae..8b0011ec378 100644
--- a/.github/workflows/mjit.yml
+++ b/.github/workflows/mjit.yml
@@ -42,6 +42,10 @@ jobs: https://github.com/ruby/ruby/blob/trunk/.github/workflows/mjit.yml#L42
       - 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
diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml
index 0cb4b0e3b02..e63e12ac0ed 100644
--- a/.github/workflows/ubuntu.yml
+++ b/.github/workflows/ubuntu.yml
@@ -66,6 +66,10 @@ jobs: https://github.com/ruby/ruby/blob/trunk/.github/workflows/ubuntu.yml#L66
       - 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
diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
index aba192fdda4..60f9b760eca 100644
--- a/.github/workflows/windows.yml
+++ b/.github/workflows/windows.yml
@@ -80,6 +80,10 @@ jobs: https://github.com/ruby/ruby/blob/trunk/.github/workflows/windows.yml#L80
       - 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
diff --git a/.github/workflows/yjit-ubuntu.yml b/.github/workflows/yjit-ubuntu.yml
index 56cdb75ae32..966f9fd1c70 100644
--- a/.github/workflows/yjit-ubuntu.yml
+++ b/.github/workflows/yjit-ubuntu.yml
@@ -58,6 +58,10 @@ jobs: https://github.com/ruby/ruby/blob/trunk/.github/workflows/yjit-ubuntu.yml#L58
       - 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
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]