diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index eda3f246..381e0a8d 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -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 diff --git a/spec/lrama/integration_spec.rb b/spec/lrama/integration_spec.rb index 59feb261..4551d967 100644 --- a/spec/lrama/integration_spec.rb +++ b/spec/lrama/integration_spec.rb @@ -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)