Skip to content

Workaround for PTP message overflow #2411

Workaround for PTP message overflow

Workaround for PTP message overflow #2411

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
jobs:
# Cancel previous running actions for the same PR
cancel_previous:
runs-on: ubuntu-latest
steps:
- name: Cancel Workflow Action
uses: styfle/cancel-workflow-action@0.11.0
conan-cache:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
container:
image: faasm.azurecr.io/faabric:0.5.0
credentials:
username: ${{ secrets.ACR_SERVICE_PRINCIPAL_ID }}
password: ${{ secrets.ACR_SERVICE_PRINCIPAL_PASSWORD }}
steps:
- uses: faasm/conan-cache-action@v1
- 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.5.0
credentials:
username: ${{ secrets.ACR_SERVICE_PRINCIPAL_ID }}
password: ${{ secrets.ACR_SERVICE_PRINCIPAL_PASSWORD }}
steps:
- name: "Check out code"
uses: actions/checkout@v3
- 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.5.0
credentials:
username: ${{ secrets.ACR_SERVICE_PRINCIPAL_ID }}
password: ${{ secrets.ACR_SERVICE_PRINCIPAL_PASSWORD }}
steps:
- name: "Check out code"
uses: actions/checkout@v3
# 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.5.0
credentials:
username: ${{ secrets.ACR_SERVICE_PRINCIPAL_ID }}
password: ${{ secrets.ACR_SERVICE_PRINCIPAL_PASSWORD }}
options: --privileged
services:
redis:
image: redis
steps:
- uses: faasm/conan-cache-action@v1
- 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@v3
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.5.0
credentials:
username: ${{ secrets.ACR_SERVICE_PRINCIPAL_ID }}
password: ${{ secrets.ACR_SERVICE_PRINCIPAL_PASSWORD }}
options: --privileged
services:
redis:
image: redis
steps:
- uses: faasm/conan-cache-action@v1
- 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:
- name: "Log in to ACR"
uses: docker/login-action@v2
with:
registry: faasm.azurecr.io
username: ${{ secrets.ACR_SERVICE_PRINCIPAL_ID }}
password: ${{ secrets.ACR_SERVICE_PRINCIPAL_PASSWORD }}
# --- Code update ---
- name: "Check out code"
uses: actions/checkout@v3
- name: "Conan cache"
uses: faasm/conan-cache-action@v1
- 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.5.0
credentials:
username: ${{ secrets.ACR_SERVICE_PRINCIPAL_ID }}
password: ${{ secrets.ACR_SERVICE_PRINCIPAL_PASSWORD }}
services:
redis:
image: redis
steps:
- uses: faasm/conan-cache-action@v1
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