|
| 1 | +# This workflow performs verification checks |
| 2 | +name: test vector verification |
| 3 | + |
| 4 | +on: |
| 5 | + pull_request: |
| 6 | + push: |
| 7 | + branches: |
| 8 | + - main |
| 9 | + workflow_dispatch: |
| 10 | + # Manual trigger for this workflow, either the normal version |
| 11 | + # or the nightly build that uses the latest Dafny prerelease |
| 12 | + # (accordingly to the "nightly" parameter). |
| 13 | + inputs: |
| 14 | + nightly: |
| 15 | + description: 'Run the nightly build' |
| 16 | + required: false |
| 17 | + type: boolean |
| 18 | + schedule: |
| 19 | + # Nightly build against Dafny's nightly prereleases, |
| 20 | + # for early warning of verification issues or regressions. |
| 21 | + # Timing chosen to be adequately after Dafny's own nightly build, |
| 22 | + # but this might need to be tweaked: |
| 23 | + # https://github.com/dafny-lang/dafny/blob/master/.github/workflows/deep-tests.yml#L16 |
| 24 | + - cron: "30 16 * * *" |
| 25 | + |
| 26 | +jobs: |
| 27 | + verification: |
| 28 | + # Don't run the nightly build on forks |
| 29 | + if: github.event_name != 'schedule' || github.repository_owner == 'aws' |
| 30 | + strategy: |
| 31 | + matrix: |
| 32 | + # Break up verification between namespaces over multiple |
| 33 | + # actions to take advantage of parallelization |
| 34 | + service: [ |
| 35 | + DDBEncryption |
| 36 | + ] |
| 37 | + os: [ |
| 38 | + macos-latest, |
| 39 | + ] |
| 40 | + runs-on: ${{ matrix.os }} |
| 41 | + steps: |
| 42 | + - uses: actions/checkout@v3 |
| 43 | + with: |
| 44 | + submodules: recursive |
| 45 | + |
| 46 | + - name: Setup Dafny |
| 47 | + uses: dafny-lang/[email protected] |
| 48 | + with: |
| 49 | + # A && B || C is the closest thing to an if .. then ... else ... or ?: expression the GitHub Actions syntax supports. |
| 50 | + dafny-version: ${{ (github.event_name == 'schedule' || inputs.nightly) && 'nightly-latest' || '4.2.0' }} |
| 51 | + |
| 52 | + - name: Verify ${{ matrix.library }} Dafny code |
| 53 | + shell: bash |
| 54 | + working-directory: ./TestVectors |
| 55 | + run: | |
| 56 | + # This works because `node` is installed by default on GHA runners |
| 57 | + CORES=$(node -e 'console.log(os.cpus().length)') |
| 58 | + make verify_service CORES=$CORES SERVICE=${{ matrix.service }} |
| 59 | +
|
| 60 | + - name: Check solver resource use |
| 61 | + shell: bash |
| 62 | + working-directory: ./TestVectors |
| 63 | + run: | |
| 64 | + make dafny-reportgenerator |
0 commit comments