Skip to content

Commit

Permalink
Remove gem cache for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
pocke committed Jan 31, 2025
1 parent 88aa628 commit 7ca28f0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ jobs:
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}

# ucrt and mswin have the dev version Ruby.
# It introduce checksum mismatches for bundled gems. So remove them before `bundle install`
- name: Purge gem caches
run: |
ruby -e '
exit if "${{ matrix.ruby }}" != "ucrt" && "${{ matrix.ruby }}" != "mswin"
bundled_gems = Dir.glob("D:/ruby-${{ matrix.ruby }}/lib/ruby/gems/*/cache/*.gem")
.map { |path| File.basename(path, ".gem")[/^(.+)-[^-]+$/, 1] }
system "gem uninstall #{bundled_gems.join(" ")}", exception: true
'
- name: bundle install
run: |
bundle config set without profilers libs
Expand Down

0 comments on commit 7ca28f0

Please sign in to comment.