Simplify GitHub Actions workflow

This commit is contained in:
Sami Samhuri 2026-01-02 13:20:33 -08:00
parent 0e19e57734
commit c6f33411f9
No known key found for this signature in database
2 changed files with 10 additions and 15 deletions

View file

@ -9,25 +9,13 @@ on:
jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ruby
steps:
- uses: actions/checkout@v6
- name: Set up Ruby
uses: ruby/setup-ruby@v1
env:
BUNDLE_GEMFILE: ruby/Gemfile
with:
ruby-version: 4.0.0
bundler-cache: true
- name: Bootstrap
run: make bootstrap
- name: Run tests
run: bundle exec rake test
- name: Run standard
run: bundle exec rake standard
- name: Install C dependencies
working-directory: .
run: sudo apt-get update && sudo apt-get install -y libreadline-dev
- name: Run C tests
working-directory: .
run: make c
run: make

View file

@ -1,6 +1,13 @@
default: c ruby
bootstrap:
@if command -v apt-get >/dev/null 2>&1; then \
sudo apt-get update && sudo apt-get install -y libreadline-dev; \
elif command -v brew >/dev/null 2>&1; then \
brew list readline >/dev/null 2>&1 || brew install readline; \
else \
echo "Please install readline (e.g. libreadline-dev or Homebrew readline)."; \
fi
cd ruby && bundle install --jobs 8
c: