Skip to content

transport(ptp): move from protobuf to fixed-size c-struct #2712

transport(ptp): move from protobuf to fixed-size c-struct

transport(ptp): move from protobuf to fixed-size c-struct #2712

Workflow file for this run

name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
types: [opened, synchronize, reopened, ready_for_review]
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
conan-cache:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
container:
image: faasm.azurecr.io/faabric:0.15.0
steps:
- name: "Check-out code"
uses: actions/checkout@v4
- uses: faasm/conan-cache-action@v3
- name: "Build Conan CMake deps to be shared by all runs"
run: ./bin/inv_wrapper.sh dev.cmake --build Debug --clean
docs:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
container:
image: faasm.azurecr.io/faabric:0.15.0
steps:
- name: "Check out code"
uses: actions/checkout@v4
- name: "Build docs"
run: ./bin/inv_wrapper.sh docs
formatting:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
container:
image: faasm.azurecr.io/faabric:0.15.0
steps:
- name: "Check out code"
uses: actions/checkout@v4
# We need to set the safe git directory as formatting relies on git-ls
# See actions/checkout#766
- name: "Set the GH workspace as a safe git directory"
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: "Code formatting checks"
run: ./bin/inv_wrapper.sh format-code --check
code-coverage:
if: github.event.pull_request.draft == false
needs: [conan-cache]
runs-on: ubuntu-latest
env:
HOST_TYPE: ci
REDIS_QUEUE_HOST: redis
REDIS_STATE_HOST: redis
container:
image: faasm.azurecr.io/faabric:0.15.0
options: --privileged
services:
redis:
image: redis
steps:
- name: "Check-out code"
uses: actions/checkout@v4
- uses: faasm/conan-cache-action@v3
- name: "Ping redis"
run: redis-cli -h redis ping
- name: "Run cmake for tests"
run: ./bin/inv_wrapper.sh dev.cmake --clean --build=Debug --coverage
- name: "Build tests"
run: ./bin/inv_wrapper.sh dev.cc faabric_tests
- name: "Run tests with profiling"
run: ./bin/inv_wrapper.sh tests
env:
LLVM_PROFILE_FILE: faabric.profraw
- name: "Generate code coverage report"
run: ./bin/inv_wrapper.sh dev.coverage-report --file-in faabric.profraw --file-out coverage.txt
- name: "Upload coverage report to CodeCov"
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
tests:
if: github.event.pull_request.draft == false
needs: [conan-cache]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sanitiser: [None, Address, Thread, Undefined]
env:
HOST_TYPE: ci
REDIS_QUEUE_HOST: redis
REDIS_STATE_HOST: redis
container:
image: faasm.azurecr.io/faabric:0.15.0
options: --privileged
services:
redis:
image: redis
steps:
- name: "Check-out code"
uses: actions/checkout@v4
- uses: faasm/conan-cache-action@v3
- name: "Ping redis"
run: redis-cli -h redis ping
- name: "Run cmake for tests"
run: ./bin/inv_wrapper.sh dev.cmake --clean --build=Debug --sanitiser ${{ matrix.sanitiser }}
- name: "Build tests"
run: ./bin/inv_wrapper.sh dev.cc faabric_tests
- name: "Run tests"
run: ./bin/inv_wrapper.sh tests
dist-tests:
if: github.event.pull_request.draft == false
needs: [conan-cache]
runs-on: ubuntu-latest
env:
CONAN_CACHE_MOUNT_SOURCE: ~/.conan/
steps:
# --- Code update ---
- name: "Check out code"
uses: actions/checkout@v4
- name: "Conan cache"
uses: faasm/conan-cache-action@v3
- name: "Build distributed tests"
run: ./dist-test/build.sh
- name: "Run the distributed tests"
run: ./dist-test/run.sh
- name: "Print planner logs"
if: always()
run: docker compose logs planner
examples:
if: github.event.pull_request.draft == false
needs: [conan-cache]
runs-on: ubuntu-latest
env:
HOST_TYPE: ci
REDIS_QUEUE_HOST: redis
REDIS_STATE_HOST: redis
container:
image: faasm.azurecr.io/faabric:0.15.0
services:
redis:
image: redis
steps:
- name: "Check-out code"
uses: actions/checkout@v4
- uses: faasm/conan-cache-action@v3
with:
build-type: "release"
- name: "Run cmake shared"
run: ./bin/inv_wrapper.sh dev.cmake --clean --shared --build=Release
- name: "Build Faabric shared library"
run: ./bin/inv_wrapper.sh dev.cc faabric --shared
- name: "Install Faabric shared library"
run: ./bin/inv_wrapper.sh dev.install faabric --shared
- name: "Build examples"
run: ./bin/inv_wrapper.sh examples
- name: "Run example to check"
run: ./bin/inv_wrapper.sh examples.execute check