Simplify GitHub Actions workflow (#3)

This commit is contained in:
Sami Samhuri 2026-01-02 13:31:21 -08:00 committed by GitHub
parent 0e19e57734
commit 3ab4f4c3f1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 12 deletions

View file

@ -9,9 +9,6 @@ on:
jobs: jobs:
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
defaults:
run:
working-directory: ruby
steps: steps:
- uses: actions/checkout@v6 - uses: actions/checkout@v6
- name: Set up Ruby - name: Set up Ruby
@ -21,13 +18,7 @@ jobs:
with: with:
ruby-version: 4.0.0 ruby-version: 4.0.0
bundler-cache: true bundler-cache: true
- name: Bootstrap
run: make bootstrap
- name: Run tests - name: Run tests
run: bundle exec rake test run: make
- 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

View file

@ -1,6 +1,13 @@
default: c ruby default: c ruby
bootstrap: 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 cd ruby && bundle install --jobs 8
c: c: