-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (62 loc) · 1.92 KB
/
Copy pathci.yml
File metadata and controls
65 lines (62 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
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