CI #548
This file contains 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: | |
branches: main | |
schedule: | |
- cron: 0 0 * * * # run every day at UTC 00:00 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
verify_flag: ["", "--vac", "--cex"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
submodules: recursive | |
# Update references | |
- name: Git Submodule Update | |
run: | | |
git pull --recurse-submodules | |
git submodule update --remote --recursive | |
- name: Commit update | |
run: | | |
git config --global user.name 'Git bot' | |
git config --global user.email '[email protected]' | |
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} | |
git commit -am "feat(bot): github actions updated submodule refs" && git push || echo "No changes to commit" | |
- name: Get type | |
id: type | |
run: echo ::set-output name=type::$(echo ${{ matrix.verify_flag }} | awk '{ print substr($1,3,5) "" substr($2,22) }') | |
- name: Get exclude test | |
id: exclude_files | |
run: (test -f ".github/workflows/blacklist.${{steps.type.outputs.type}}.txt" && echo ::set-output name=exclude_files::"($(cut -f 1 ".github/workflows/blacklist.${{steps.type.outputs.type}}.txt" | head -c -1 | tr '\n' '|'))" ) || (echo ::set-output name=exclude_files::" ") | |
- name: Docker (Build and run tests) | |
run: docker build -t verify-mbedtls . --file docker/verify-mbedtls.Dockerfile | |
- name: Get number of Cores | |
id: cores | |
run: echo "::set-output name=num_cores::$(nproc --all)" | |
- name: Run Tests | |
run: docker run -t verify-mbedtls /bin/bash -c "cd build && mkdir -p /tmp/verify-mbedtls && env VERIFY_FLAGS=\"${{ matrix.verify_flag }}\" ctest -j ${{steps.cores.outputs.num_cores}} --output-on-failure --timeout 2000 -E \"${{ steps.exclude_files.outputs.exclude_files }}\"" |