diff --git a/.github/workflows/documentation.yaml b/.github/workflows/documentation.yaml index bb709787f..afeba3bff 100644 --- a/.github/workflows/documentation.yaml +++ b/.github/workflows/documentation.yaml @@ -23,6 +23,12 @@ jobs: tar xzf swift-5.6.1-RELEASE-ubuntu20.04.tar.gz echo "$(pwd)/swift-5.6.1-RELEASE-ubuntu20.04/usr/bin" >> $GITHUB_PATH + - name: Setup clang + run: | + ./bazel/setup_clang.sh + echo "build --config=clang" >> "${GITHUB_WORKSPACE}/.bazelrc" + echo "try-import %workspace%/clang.bazelrc" >> "${GITHUB_WORKSPACE}/.bazelrc" + - name: Clean up documentation branch run: | git branch -D documentation || true diff --git a/.github/workflows/ubuntu-bazel.yaml b/.github/workflows/ubuntu-bazel.yaml index 94e2e310e..785b2bf9c 100644 --- a/.github/workflows/ubuntu-bazel.yaml +++ b/.github/workflows/ubuntu-bazel.yaml @@ -20,6 +20,12 @@ jobs: mv bazelisk-linux-amd64 "${GITHUB_WORKSPACE}/bin/bazel" chmod +x "${GITHUB_WORKSPACE}/bin/bazel" + - name: Setup clang + run: | + ./bazel/setup_clang.sh + echo "build --config=clang" >> "${GITHUB_WORKSPACE}/.bazelrc" + echo "try-import %workspace%/clang.bazelrc" >> "${GITHUB_WORKSPACE}/.bazelrc" + - name: Run tests run: | "${GITHUB_WORKSPACE}/bin/bazel" test --test_output=errors //src/tests:Tests diff --git a/bazel/setup_clang.sh b/bazel/setup_clang.sh index 0ed987b9d..973d5ac23 100755 --- a/bazel/setup_clang.sh +++ b/bazel/setup_clang.sh @@ -28,5 +28,8 @@ build:clang-asan --linkopt=-fsanitize=vptr,function build:clang-asan --linkopt='-L${RT_LIBRARY_PATH}' build:clang-asan --linkopt=-l:libclang_rt.ubsan_standalone-x86_64.a build:clang-asan --linkopt=-l:libclang_rt.ubsan_standalone_cxx-x86_64.a + +build --linkopt="-z nostart-stop-gc" +build --host_linkopt="-z nostart-stop-gc" " > ${BAZELRC_FILE}