11name : GNATprove
22
3- on : # Run the workflow for each of the following events:
4- push : # - A branch is pushed or updated.
5- paths : # When the sources or dependencies change.
3+ on :
4+ push :
5+ paths :
66 - ' .github/workflows/prove.yml'
77 - ' src/**'
88 - ' client/src/**'
9+ - ' server/src/**'
910 - ' alire.toml'
1011 - ' client/alire.toml'
12+ - ' server/alire.toml'
1113 - ' coap_spark.gpr'
1214 - ' client/coap_client.gpr'
15+ - ' server/coap_server.gpr'
1316 - ' libs/wolfssl'
1417 pull_request : # - A pull-request is opened or updated.
1518 paths :
1619 - ' .github/workflows/prove.yml'
1720 - ' src/**'
1821 - ' client/src/**'
22+ - ' server/src/**'
1923 - ' alire.toml'
2024 - ' client/alire.toml'
25+ - ' server/alire.toml'
2126 - ' coap_spark.gpr'
2227 - ' client/coap_client.gpr'
28+ - ' server/coap_server.gpr'
2329 - ' libs/wolfssl'
2430 workflow_dispatch : # - A manual run of the workflow is requested from the GitHub web interface.
2531 release :
@@ -28,6 +34,10 @@ on: # Run the workflow for each of the following events:
2834jobs :
2935 gnatprove :
3036 runs-on : ubuntu-latest
37+ strategy :
38+ fail-fast : false
39+ matrix :
40+ target : [client, server]
3141
3242 steps :
3343 - name : Checkout repository
4353
4454 - name : Install GNAT package
4555 run : |
46- chmod +x install_package.sh && ./install_package.sh ./gnat-2021-20210519-x86_64-linux-bin $HOME/gnat-2021 com.adacore.spark2014_discovery
56+ chmod +x install_package.sh
57+ ./install_package.sh ./gnat-2021-20210519-x86_64-linux-bin $HOME/gnat-2021 com.adacore.spark2014_discovery
4758
4859 # Install and setup Alire package manager
4960 - uses : alire-project/setup-alire@v2
@@ -53,16 +64,18 @@ jobs:
5364 - name : Set up environment for Colibri
5465 run : echo "$HOME/gnat-2021/libexec/spark/bin" >> $GITHUB_PATH
5566
56- # Run GNATprove in the client to perform automatic formal verification of the SPARK code.
57- - name : Run GNATprove
67+ - name : Run GNATprove (${{ matrix.target }})
68+ working-directory : ${{ matrix.target }}
5869 run : |
59- cd client
70+ set -e
6071 alr build --stop-after=generation
6172 alr gnatprove -j0 --level=4
62- # Get a summary for the action from the first (most relevant) lines of gnatprove.out
63- echo '```' >> $GITHUB_STEP_SUMMARY
64- head -23 obj/development/gnatprove/gnatprove.out >> $GITHUB_STEP_SUMMARY
65- echo '```' >> $GITHUB_STEP_SUMMARY
73+ {
74+ echo '```'
75+ echo "# GNATprove summary for ${matrix_target:-${{ matrix.target }}}"
76+ head -23 obj/development/gnatprove/gnatprove.out || echo "No summary available"
77+ echo '```'
78+ } >> $GITHUB_STEP_SUMMARY
6679
6780
6881
0 commit comments