Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: get sanitizer results #2926

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 22 additions & 41 deletions .github/workflows/spread.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,50 +17,31 @@ concurrency:
cancel-in-progress: true

jobs:
GetMatrix:
runs-on: ubuntu-latest

outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}

steps:
- id: set-matrix
name: Determine BuildAndTest matrix
run: |
set -euo pipefail

if ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}; then
TASKS='"lxd:ubuntu-22.04:spread/build/ubuntu:asan"
"lxd:ubuntu-22.04:spread/build/ubuntu:tsan"
"lxd:ubuntu-22.04:spread/build/ubuntu:asan_clang"
"lxd:ubuntu-22.04:spread/build/ubuntu:tsan_clang"'
fi

TASKS+='"lxd:alpine-3.18:spread/build/alpine:amd64"
"lxd:alpine-edge:spread/build/alpine:amd64"
"lxd:ubuntu-22.04:spread/build/sbuild:debian_sid"
"lxd:ubuntu-22.04:spread/build/sbuild:ubuntu"
"lxd:ubuntu-22.04:spread/build/sbuild:ubuntu_lunar"
"lxd:ubuntu-22.04:spread/build/sbuild:ubuntu_mantic"
"lxd:ubuntu-22.04:spread/build/sbuild:ubuntu_arm64"
"lxd:ubuntu-22.04:spread/build/sbuild:ubuntu_armhf"
"lxd:ubuntu-22.04:spread/build/ubuntu:clang"
"lxd:fedora-37:spread/build/fedora:amd64"
"lxd:fedora-38:spread/build/fedora:amd64"
"lxd:fedora-rawhide:spread/build/fedora:amd64"
"lxd:ubuntu-22.04:spread/build/sbuild:ubuntu_devel"
"lxd:ubuntu-22.04:spread/build/sbuild:ubuntu_proposed"
"lxd:ubuntu-22.04:spread/build/ubuntu:ubsan"
"lxd:ubuntu-22.04:spread/build/ubuntu:ubsan_clang"'

echo ${TASKS:-} | jq -cs '{ "spread-task": . }' | awk '{ print "matrix=" $0 }' >> $GITHUB_OUTPUT

BuildAndTest:
needs: GetMatrix

strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.GetMatrix.outputs.matrix) }}
matrix:
spread-task:
- lxd:alpine-3.18:spread/build/alpine:amd64
- lxd:alpine-edge:spread/build/alpine:amd64
- lxd:ubuntu-22.04:spread/build/sbuild:debian_sid
- lxd:ubuntu-22.04:spread/build/sbuild:ubuntu
- lxd:ubuntu-22.04:spread/build/sbuild:ubuntu_lunar
- lxd:ubuntu-22.04:spread/build/sbuild:ubuntu_mantic
- lxd:ubuntu-22.04:spread/build/sbuild:ubuntu_arm64
- lxd:ubuntu-22.04:spread/build/sbuild:ubuntu_armhf
- lxd:ubuntu-22.04:spread/build/ubuntu:clang
- lxd:fedora-37:spread/build/fedora:amd64
- lxd:fedora-38:spread/build/fedora:amd64
- lxd:fedora-rawhide:spread/build/fedora:amd64
- lxd:ubuntu-22.04:spread/build/sbuild:ubuntu_devel
- lxd:ubuntu-22.04:spread/build/sbuild:ubuntu_proposed
- lxd:ubuntu-22.04:spread/build/ubuntu:asan
- lxd:ubuntu-22.04:spread/build/ubuntu:asan_clang
- lxd:ubuntu-22.04:spread/build/ubuntu:tsan
- lxd:ubuntu-22.04:spread/build/ubuntu:tsan_clang
- lxd:ubuntu-22.04:spread/build/ubuntu:ubsan
- lxd:ubuntu-22.04:spread/build/ubuntu:ubsan_clang

runs-on: ubuntu-latest

Expand Down
3 changes: 1 addition & 2 deletions spread.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ environment:
BUILD_TYPE/tsan,tsan_clang: ThreadSanitizer
BUILD_TYPE/ubsan,ubsan_clang: UBSanitizer
DEB_BUILD_EXTRA:
DEB_BUILD_EXTRA/ubsan,ubsan_clang: nostrip
DEB_BUILD_EXTRA/asan,asan_clang,tsan,tsan_clang: nostrip nocheck
DEB_BUILD_EXTRA/asan,asan_clang,tsan,tsan_clang,ubsan,ubsan_clang: nostrip
CTEST_OUTPUT_ON_FAILURE: 1
CCACHE_DIR: /root/.ccache
# Needed for precompiled headers (https://ccache.dev/manual/latest.html#_precompiled_headers)
Expand Down
2 changes: 1 addition & 1 deletion spread/build/ubuntu/task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,6 @@ execute: |
echo "OVERRIDE_CONFIGURE_OPTIONS += -DCMAKE_CXX_COMPILER_LAUNCHER=ccache" >> debian/opts.mk

# build and run tests
UBSAN_OPTIONS=halt_on_error=1 debian/rules build
UBSAN_OPTIONS=halt_on_error=1 ASAN_OPTIONS=detect_leaks=0,verify_asan_link_order=0 debian/rules build

ccache --show-stats --zero-stats > ${CCACHE_DIR}/ccache.stats
Loading