Get clang-tidy-15 to pass #167
Workflow file for this run
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: "Build and test" | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
checks: | |
name: Format and License Checks | |
runs-on: ubuntu-20.04 | |
container: ghcr.io/microsoft/ccf/app/dev/virtual:ccf-6.0.0-dev7 | |
steps: | |
- run: git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- run: ./scripts/ci-checks.sh | |
build-test: | |
name: CI | |
needs: checks | |
strategy: | |
matrix: | |
platform: | |
- name: virtual | |
image: virtual | |
nodes: ubuntu-20.04 | |
options: --user root --publish-all --cap-add NET_ADMIN --cap-add NET_RAW --cap-add SYS_PTRACE -v /lib/modules:/lib/modules:ro | |
unit_tests_enabled: ON | |
- name: sgx | |
image: sgx | |
nodes: [self-hosted, 1ES.Pool=gha-sgx-scitt-pool] | |
options: --user root --publish-all --cap-add NET_ADMIN --cap-add NET_RAW --device /dev/sgx_enclave:/dev/sgx_enclave --device /dev/sgx_provision:/dev/sgx_provision | |
unit_tests_enabled: OFF | |
- name: snp | |
image: snp | |
nodes: ubuntu-20.04 | |
options: --user root --publish-all --cap-add NET_ADMIN --cap-add NET_RAW --cap-add SYS_PTRACE -v /lib/modules:/lib/modules:ro | |
unit_tests_enabled: OFF | |
exclude: | |
- platform: { name: sgx } | |
runs-on: ${{ matrix.platform.nodes }} | |
container: | |
image: ghcr.io/microsoft/ccf/app/dev/${{ matrix.platform.image }}:ccf-6.0.0-dev7 | |
options: ${{ matrix.platform.options }} | |
env: | |
# Helps to distinguish between CI and local builds. | |
SCITT_CI: 1 | |
# Additional CMake flags. | |
PLATFORM: ${{ matrix.platform.name }} | |
CMAKE_BUILD_TYPE: Debug | |
ENABLE_CLANG_TIDY: ON | |
BUILD_TESTS: ${{ matrix.platform.unit_tests_enabled }} | |
# These make CI print all the errors, rather than stopping early. | |
CXXFLAGS: -ferror-limit=0 | |
NINJA_FLAGS: -k 0 | |
steps: | |
- name: Checkout repository with tags | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: "Platform SGX" | |
run: | | |
sudo groupadd -fg $(/usr/bin/stat -Lc '%g' /dev/sgx_provision) sgx_prv; | |
sudo usermod -a -G sgx_prv $(whoami); | |
cat /proc/cpuinfo | grep flags | uniq; | |
shell: bash | |
if: "${{ matrix.platform.name == 'sgx' }}" | |
# Work-around for https://github.com/actions/runner/issues/2033 | |
- name: Work around git safe.directory in container | |
run: chown -R $(id -u):$(id -g) $PWD | |
- run: apt-get update && apt-get install -y clang-tidy-15 | |
- run: ./build.sh | |
- run: ./run_unit_tests.sh | |
if: "${{ matrix.platform.name == 'virtual' }}" | |
- run: ./run_functional_tests.sh | |
if: "${{ matrix.platform.name != 'snp' }}" # Functional tests are not supported on SNP platform for the moment | |
- name: "Upload logs for ${{ matrix.platform.name }}" | |
uses: actions/upload-artifact@v4 | |
if: success() || failure() | |
with: | |
name: logs-${{ matrix.platform.name }} | |
path: | | |
out | |
if-no-files-found: ignore |