Skip to content

Commit

Permalink
Update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ChillerDragon committed Oct 10, 2024
1 parent a72d0cd commit 5637101
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 18 deletions.
35 changes: 25 additions & 10 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,34 @@ on:

jobs:
run-tests:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
# Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
ruby: ['3.0', '3.1', '3.2', '3.3', head, jruby, jruby-head, truffleruby, truffleruby-head]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

runs-on: ubuntu-latest
- name: Prepare Linux
if: contains(matrix.os, 'ubuntu')
run: |
sudo apt-get update -y
sudo apt-get install git libfontconfig1-dev libsndfile1-dev libsdl2-dev libmpg123-dev libopenal1 libopenal-dev
steps:
- uses: actions/checkout@v2
- name: Set up Ruby 3.1
uses: actions/setup-ruby@v1
- name: Prepare macOS
if: contains(matrix.os, 'macOS')
run: |
brew update || true
brew install pkg-config sdl2 || true
sudo rm -rf /Library/Developer/CommandLineTools
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1.x
ruby-version: ${{ matrix.ruby }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically

- name: Build and test with rspec
run: |
sudo apt-get update
sudo apt-get install git libfontconfig1-dev libsndfile1-dev libsdl2-dev libmpg123-dev libopenal1 libopenal-dev
gem install bundler
bundle install --jobs 4 --retry 3
bundle exec rspec
10 changes: 5 additions & 5 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Ruby 3.1
uses: actions/setup-ruby@v1
- uses: actions/checkout@v4
- name: Set up Ruby 3.3.5
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1.x
ruby-version: '3.3.5'
- name: Prepare
run: |
sudo apt-get update
sudo apt-get install git libfontconfig1-dev libsndfile1-dev libsdl2-dev libmpg123-dev libopenal1 libopenal-dev shellcheck
gem install bundler
gem install rubocop:1.31.2
gem install rubocop:1.66.1
bundle install --jobs 4 --retry 3
- name: Check ruby with rubocop
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Ruby 3.1
- uses: actions/checkout@v4
- name: Set up Ruby 3.3
uses: actions/setup-ruby@v1
with:
ruby-version: 3.1.x
ruby-version: 3.3.x
- name: Prepare
run: |
sudo apt-get update
Expand Down
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@

source 'https://rubygems.org'

gem "rake"

gemspec
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ GEM
fileutils (1.6.0)
gosu (1.4.6)
os (1.0.1)
rake (13.2.1)
rspec (3.9.0)
rspec-core (~> 3.9.0)
rspec-expectations (~> 3.9.0)
Expand All @@ -35,6 +36,7 @@ PLATFORMS

DEPENDENCIES
chichilku3!
rake

BUNDLED WITH
2.3.7

0 comments on commit 5637101

Please sign in to comment.