Merge pull request #2 from chapel-lang/fix-asan #11
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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| jobs: | |
| tests: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| version: [2.7.0, 2.8.0, latest] | |
| runs-on: ubuntu-latest | |
| container: | |
| image: chapel/chapel:${{ matrix.version }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install openssl | |
| run: | | |
| apt-get update | |
| apt-get install -y libssl-dev | |
| - name: Check the project builds | |
| run: | | |
| mason build | |
| - name: Check the examples build and run | |
| run: | | |
| mason build --example | |
| for example in $(ls example/*.chpl); do | |
| mason run --example $(basename $example); | |
| done | |
| - name: Run mason tests | |
| run: | | |
| mason test --show --parallel | |
| - name: Run chplcheck | |
| # chplcheck has a bug on 2.7 | |
| if: matrix.version != '2.7.0' | |
| run: | | |
| chplcheck src/**/*.chpl | |
| - name: Check chpl version | |
| id: chpl_version | |
| shell: bash | |
| run: | | |
| ver=$(chpl --version | head -n 1 | awk '{print $3}') | |
| echo "CHPL_VERSION=$ver" >> $GITHUB_OUTPUT | |
| major=$(echo "$ver" | cut -d. -f1) | |
| minor=$(echo "$ver" | cut -d. -f2) | |
| if [[ "$major" -gt 2 ]] || { [[ "$major" -eq 2 ]] && [[ "$minor" -ge 9 ]]; }; then | |
| echo "HAS_FIND_UNDOCUMENTED=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "HAS_FIND_UNDOCUMENTED=false" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Check undocumented symbols | |
| if: steps.chpl_version.outputs.HAS_FIND_UNDOCUMENTED == 'true' | |
| shell: bash | |
| run: | | |
| shopt -s globstar | |
| chpl_home=$(chpl --print-chpl-home) | |
| CHPL_HOME=$chpl_home $chpl_home/tools/chpldoc/findUndocumentedSymbols --ci src/**/*.chpl --ignore-enum-elements |