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 bd53865
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 22 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
6 changes: 2 additions & 4 deletions chichilku3.gemspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# frozen_string_literal: true

require 'rake'

Gem::Specification.new do |s|
s.name = 'chichilku3'
s.version = '15.0.3'
Expand All @@ -13,7 +11,7 @@ Gem::Specification.new do |s|
DESC
s.authors = ['ChillerDragon']
s.email = '[email protected]'
s.files = FileList[
s.files = [
'lib/client/*.rb',
'lib/server/*.rb',
'lib/share/*.rb',
Expand All @@ -28,7 +26,7 @@ Gem::Specification.new do |s|
'client.json',
'server.json',
'maps'
]
].map { |glob| Dir[glob] }.flatten
s.required_ruby_version = '>= 3.3.5'
s.add_dependency 'fileutils', '~> 1.6.0'
s.add_dependency 'gosu', '~> 1.4.3'
Expand Down

0 comments on commit bd53865

Please sign in to comment.