Skip to content

Commit

Permalink
Merge pull request #499 from ydah/add-ci-job-for-cc-and-clang
Browse files Browse the repository at this point in the history
Add test job for multiple compilers for C
  • Loading branch information
ydah authored Jan 4, 2025
2 parents ff41029 + 7db3770 commit dc992b9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
19 changes: 19 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,25 @@ jobs:
- run: flex --help
- run: bundle install
- run: bundle exec rspec
test-c:
needs: ruby-versions
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
ruby: ['head']
compiler: ['cc', 'gcc', 'clang']
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: flex --help
- run: bundle install
- run: bundle exec rspec
env:
COMPILER: ${{ matrix.compiler }}
test-cpp:
needs: ruby-versions
runs-on: ubuntu-20.04
Expand Down
2 changes: 1 addition & 1 deletion spec/lrama/integration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def compiler
end

def file_extension
ENV['COMPILER'] == "gcc" ? ".c" : ".cpp"
['cc', 'gcc', 'clang'].include?(ENV['COMPILER']) ? ".c" : ".cpp"
end

def test_parser(parser_name, input, expected, expect_success: true, lrama_command_args: [], debug: false)
Expand Down

0 comments on commit dc992b9

Please sign in to comment.