Skip to content

Adds fuzzing to POST entries endpoint (#251) #206

Adds fuzzing to POST entries endpoint (#251)

Adds fuzzing to POST entries endpoint (#251) #206

Workflow file for this run

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-dev8
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: 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
runs-on: ${{ matrix.platform.nodes }}
container:
image: ghcr.io/microsoft/ccf/app/dev/${{ matrix.platform.image }}:ccf-6.0.0-dev8
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
# 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: |
/tmp/pytest-of-root/*current/*current/*.{out,err}
/tmp/pytest-of-root/*current/*current/config.json
if-no-files-found: warn