Log lexbor compilation #94
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake | |
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby | |
name: CI | |
on: [push, pull_request] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '2.6' | |
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
- name: Build gem | |
run: gem build *.gemspec | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: gem | |
path: '*.gem' | |
retention-days: 1 | |
# Check for memory leaks | |
memory-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '2.6' | |
bundler-cache: true | |
- name: Build with ASAN | |
run: bundle exec rake compile | |
env: | |
NOKOLEXBOR_ASAN: '1' | |
- name: Run tests | |
run: bundle exec rake test:asan | |
install-gem-and-test: | |
needs: ['build', 'memory-check'] | |
strategy: | |
matrix: | |
ruby-version: ['2.6', '2.7', '3.0', '3.1', '3.2', '3.3'] | |
os: ['ubuntu', 'macos', 'windows'] | |
runs-on: ${{ matrix.os }}-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby-version }} | |
# bundler-cache: true | |
- uses: actions/download-artifact@v3 | |
with: | |
name: gem | |
- name: Install gem | |
run: | | |
gem install *.gem | |
bundle install | |
- name: Run tests | |
run: rake test:gem # don't use bundle exec as it will load this library by default |