Skip to content

Commit

Permalink
Use ruby/setup-ruby action which bundles
Browse files Browse the repository at this point in the history
  • Loading branch information
parndt committed Jan 4, 2021
1 parent 940823f commit e6c0772
Showing 1 changed file with 9 additions and 31 deletions.
40 changes: 9 additions & 31 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,42 +12,22 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-ruby@v1
with:
ruby-version: '2.7'
- uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile') }}
restore-keys: |
${{ runner.os }}-gems-

- name: Set ENV
run: |
echo "MAKEFLAGS=-j$((1 + $(sysctl -n hw.activecpu)))" >> $GITHUB_ENV
echo "NOKOGIRI_USE_SYSTEM_LIBRARIES=t" >> $GITHUB_ENV
- name: Install dependencies
run: |
gem install bundler
bundle config --local path vendor/bundle
bundle config jobs $((1 + $(sysctl -n hw.activecpu)))
bundle install
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: '2.7'
- run: bundle exec rake compile
- run: bundle exec rake test

cruby-test-vendored-libraries:
runs-on: macos-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-ruby@v1
with:
ruby-version: '2.7'
- uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile') }}
restore-keys: |
${{ runner.os }}-gems-
- uses: actions/cache@v2
with:
path: ports/archives
Expand All @@ -58,11 +38,9 @@ jobs:
- name: Set ENV
run: |
echo "MAKEFLAGS=-j$((1 + $(sysctl -n hw.activecpu)))" >> $GITHUB_ENV
- name: Install dependencies
run: |
gem install bundler
bundle config --local path vendor/bundle
bundle config jobs $((1 + $(sysctl -n hw.activecpu)))
bundle install
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: '2.7'
- run: bundle exec rake compile
- run: bundle exec rake test

0 comments on commit e6c0772

Please sign in to comment.