Add CI job to build C sources with various compiler versions and fix array-bounds error with GCC 9 #2084
Workflow file for this run
This file contains hidden or 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
| name: C++ bindings | |
| on: | |
| push: | |
| paths: | |
| - ".github/workflows/cpp-bindings.yml" | |
| - "include/" | |
| - "src/" | |
| - "cpp/" | |
| - "*akefile*" | |
| branches: | |
| - main | |
| - ruby-4.0 | |
| pull_request: | |
| jobs: | |
| test: | |
| name: test | |
| strategy: | |
| fail-fast: false | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: head | |
| bundler-cache: true | |
| - name: Compile prism | |
| run: bundle exec rake compile | |
| - name: Compile C++ | |
| run: g++ -o ./cpp_test cpp/test.cpp build/static/*.o -Iinclude | |
| - name: Run C++ | |
| run: ./cpp_test |