Skip to content

Commit

Permalink
Merge pull request #99 from aut0/dev/lukas-tsan
Browse files Browse the repository at this point in the history
add tsan CI
  • Loading branch information
lmailletcontoz authored Oct 22, 2024
2 parents ddb9920 + ee8e8ad commit ed0d219
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 1 deletion.
59 changes: 59 additions & 0 deletions .github/workflows/tsan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: tsan

on:
push:
pull_request:

jobs:
ubuntu:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version: [20.04, 22.04]
platform: [linux/amd64, linux/arm64]
target: [clang-shared-regression-tsan]
steps:
- name: Install qemu-user-static
run: |
if [[ "${{ matrix.platform }}" == "linux/arm64" ]]; then
sudo apt-get update && sudo apt-get install -y qemu-user-static
fi
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: |
docker buildx build --platform ${{ matrix.platform }} -t systemc_test --build-arg UBUNTU_VERSION=${{ matrix.version }} -f docker/ubuntu.dockerfile .
docker run -e SYSTEMC_CI_TARGET=${{ matrix.target }} systemc_test
almalinux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version: [8, 9]
platform: [linux/amd64, linux/arm64]
target: [clang-shared-regression-tsan]
steps:
- name: Install qemu-user-static
run: |
if [[ "${{ matrix.platform }}" == "linux/arm64" ]]; then
sudo apt-get update && sudo apt-get install -y qemu-user-static
fi
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: |
docker buildx build --platform ${{ matrix.platform }} -t systemc_test --build-arg ALMA_VERSION=${{ matrix.version }} -f docker/alma.dockerfile .
docker run -e SYSTEMC_CI_TARGET=${{ matrix.target }} systemc_test
macos:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
target: [clang-shared-regression-tsan]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: |
SYSTEMC_CI_TARGET=${{ matrix.target }} SYSTEMC_SRC_PATH=$PWD docker/entrypoint.sh
9 changes: 8 additions & 1 deletion docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,14 @@ case "$SYSTEMC_CI_TARGET" in
BUILD_REGRESSIONS=true
CXX_FLAGS="$CXX_FLAGS -fsanitize=undefined"
;;
*)
clang-shared-regression-tsan)
CC=clang
CXX=clang++
BUILD_SHARED_LIBRARY=true
BUILD_REGRESSIONS=true
CXX_FLAGS="$CXX_FLAGS -fsanitize=thread"
;;
*)
echo "Error: Unknown SYSTEMC_CI_TARGET '$SYSTEMC_CI_TARGET'"
exit 1
;;
Expand Down

0 comments on commit ed0d219

Please sign in to comment.