diff options
| author | Marat Radchenko <marat@slonopotamus.org> | 2021-03-18 14:01:00 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-18 05:01:00 -0600 |
| commit | ee89a88ba1b914b772d7e310af0f84aafc11efb6 (patch) | |
| tree | abe206c3015c7b103ba7f66cb025f7231662c416 /.github | |
| parent | 537704ad6e98f06a78d3e85e9942e7f7a01533ab (diff) | |
speedup CI by using Bundler cache (PR #3901)
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/ci.yml | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d1758dee..bddc5fee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,26 +49,17 @@ jobs: runs-on: ${{ matrix.os }} env: COVERAGE: ${{ matrix.primary }} + BUNDLE_WITHOUT: docs SOURCE_DATE_EPOCH: '1521504000' steps: - name: Checkout uses: actions/checkout@v2 - - name: Install Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ matrix.ruby }} - - name: Configure Bundler - run: | - bundle config --local path .bundle/gems - bundle config --local without docs - - name: Configure Nokogiri installation (Linux) + - name: Install prerequisites for Nokogiri (Linux) if: matrix.os == 'ubuntu-latest' - run: | - bundle config --local build__nokogiri --use-system-libraries - sudo apt-get install libxslt1-dev - - name: Configure Nokogiri installation (macOS) - if: matrix.os == 'macos-latest' - run: bundle config --local build__nokogiri --use-system-libraries + run: sudo apt-get install libxslt1-dev + - name: Configure Nokogiri installation (Linux, macOS) + if: matrix.os == 'macos-latest' || matrix.os == 'ubuntu-latest' + run: echo 'BUNDLE_BUILD__NOKOGIRI=--use-system-libraries' >> $GITHUB_ENV - name: Set AsciiMath version if: matrix.asciimath-version run: echo 'ASCIIMATH_VERSION=${{ matrix.asciimath-version }}' >> $GITHUB_ENV @@ -78,8 +69,16 @@ jobs: - name: Set Rouge version if: matrix.rouge-version run: echo 'ROUGE_VERSION=${{ matrix.rouge-version }}' >> $GITHUB_ENV - - name: Install dependencies - run: bundle --jobs 3 --retry 3 + - name: Install Ruby (uses cached dependencies for non-scheduled build) + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: ${{ github.event_name != 'schedule' }} + - name: Install dependencies (scheduled build only) + if: github.event_name == 'schedule' + run: | + bundle config --local path .bundle/gems + bundle --jobs 3 --retry 3 - name: Run tests run: bundle exec ruby -w $(bundle exec ruby -e 'print File.join Gem.bindir, %q(rake)') test:all - name: Build dependents |
