Skip to content

Commit

Permalink
Add CI step
Browse files Browse the repository at this point in the history
  • Loading branch information
ianks committed Jun 30, 2023
1 parent ac83709 commit d84309e
Showing 1 changed file with 89 additions and 75 deletions.
164 changes: 89 additions & 75 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,107 +15,121 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: head
bundler-cache: true
- name: Lint config.yml
run: bundle exec rake lint
shell: bash
- name: Run Ruby tests
run: bundle exec rake
shell: bash
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: head
bundler-cache: true
- name: Lint config.yml
run: bundle exec rake lint
shell: bash
- name: Run Ruby tests
run: bundle exec rake
shell: bash

build-debug-mode:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: head
bundler-cache: true
- name: Run Ruby tests
run: bundle exec rake
env:
YARP_DEBUG_MODE_BUILD: "1"
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: head
bundler-cache: true
- name: Run Ruby tests
run: bundle exec rake
env:
YARP_DEBUG_MODE_BUILD: "1"

build-without-assertions:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: head
bundler-cache: true
- name: Run Ruby tests
run: bundle exec rake compile_no_debug
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: head
bundler-cache: true
- name: Run Ruby tests
run: bundle exec rake compile_no_debug

lex-ruby:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: head
bundler-cache: true
- name: Lex ruby/ruby
run: bundle exec rake lex:ruby
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: head
bundler-cache: true
- name: Lex ruby/ruby
run: bundle exec rake lex:ruby

lex-discourse:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: head
bundler-cache: true
- name: Lex discourse/discourse
run: bundle exec rake lex:discourse
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: head
bundler-cache: true
- name: Lex discourse/discourse
run: bundle exec rake lex:discourse

lex-top-100:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: head
bundler-cache: true
- name: Lex Top 100 Gems
run: bundle exec rake lex:topgems
- name: Parse Top 100 Gems
run: bundle exec rake parse:topgems
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: head
bundler-cache: true
- name: Lex Top 100 Gems
run: bundle exec rake lex:topgems
- name: Parse Top 100 Gems
run: bundle exec rake parse:topgems

memcheck:
runs-on: ubuntu-latest
steps:
- name: Install valgrind from source
run: |
sudo apt-get install -y libc6-dbg
wget https://sourceware.org/pub/valgrind/valgrind-3.20.0.tar.bz2
tar xvf valgrind-3.20.0.tar.bz2
cd valgrind-3.20.0
./configure
make
sudo make install
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: head
bundler-cache: true
- name: Run Ruby tests with valgrind
run: bundle exec rake test:valgrind
- name: Install valgrind from source
run: |
sudo apt-get install -y libc6-dbg
wget https://sourceware.org/pub/valgrind/valgrind-3.20.0.tar.bz2
tar xvf valgrind-3.20.0.tar.bz2
cd valgrind-3.20.0
./configure
make
sudo make install
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: head
bundler-cache: true
- name: Run Ruby tests with valgrind
run: bundle exec rake test:valgrind

rust:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: head
bundler-cache: true
- name: Run tests
run: bundle exec rake rust:test
- name: Ensure bindings are up to date
run: bundle exec rake rust:bindgen && git diff --exit-code

0 comments on commit d84309e

Please sign in to comment.