1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-22 07:42:37 +00:00

ci: re-enable ubuntu tests (#6715)

* re-enabling ubuntu tests

* official GitHub workaround
This commit is contained in:
Cœur 2024-04-01 04:32:58 +08:00 committed by GitHub
parent e619718a1e
commit 764f2ad85a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -116,67 +116,72 @@ jobs:
echo "When CI is done, the above patch will be uploaded as 'code-style.diff' to https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}/ ."
exit 1
# sanitizer-tests-ubuntu:
# runs-on: ubuntu-22.04
# needs: [ what-to-make ]
# if: ${{ needs.what-to-make.outputs.make-tests == 'true' }}
# env:
# NODE_PATH: /usr/lib/nodejs:/usr/share/nodejs
# steps:
# - name: Show Configuration
# run: |
# echo '${{ toJSON(needs) }}'
# echo '${{ toJSON(runner) }}'
# cat /etc/os-release
# - name: Get Dependencies
# run: |
# set -ex
# sudo apt-get update
# sudo apt-get install -y --no-install-recommends \
# ca-certificates \
# clang \
# cmake \
# gettext \
# libcurl4-openssl-dev \
# libdeflate-dev \
# libevent-dev \
# libfmt-dev \
# libminiupnpc-dev \
# libnatpmp-dev \
# libpsl-dev \
# libssl-dev \
# ninja-build \
# npm
# - name: Get Source
# uses: actions/checkout@v4
# with:
# submodules: recursive
# path: src
# - name: Configure
# run: |
# cmake \
# -S src \
# -B obj \
# -G Ninja \
# -DCMAKE_BUILD_TYPE=Debug \
# -DCMAKE_CXX_COMPILER='clang++' \
# -DCMAKE_CXX_FLAGS='-gdwarf-4 -fno-omit-frame-pointer -fsanitize=address,leak,undefined' \
# -DCMAKE_C_COMPILER='clang' \
# -DCMAKE_C_FLAGS='-gdwarf-4 -fno-omit-frame-pointer -fsanitize=address,leak,undefined' \
# -DCMAKE_INSTALL_PREFIX=pfx \
# -DENABLE_CLI=OFF \
# -DENABLE_DAEMON=OFF \
# -DENABLE_GTK=OFF \
# -DENABLE_MAC=OFF \
# -DENABLE_QT=OFF \
# -DENABLE_TESTS=ON \
# -DENABLE_UTILS=ON \
# -DREBUILD_WEB=OFF \
# -DRUN_CLANG_TIDY=OFF
# - name: Make
# run: cmake --build obj --config Debug --target libtransmission-test transmission-show
# - name: Test with sanitizers
# run: cmake -E chdir obj ctest -j $(nproc) --build-config Debug --output-on-failure
sanitizer-tests-ubuntu:
runs-on: ubuntu-22.04
needs: [ what-to-make ]
if: ${{ needs.what-to-make.outputs.make-tests == 'true' }}
env:
NODE_PATH: /usr/lib/nodejs:/usr/share/nodejs
steps:
- name: Show Configuration
run: |
echo '${{ toJSON(needs) }}'
echo '${{ toJSON(runner) }}'
cat /etc/os-release
- name: Get Dependencies
run: |
set -ex
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
ca-certificates \
clang \
cmake \
gettext \
libcurl4-openssl-dev \
libdeflate-dev \
libevent-dev \
libfmt-dev \
libminiupnpc-dev \
libnatpmp-dev \
libpsl-dev \
libssl-dev \
ninja-build \
npm
- name: Temporary workaround for sanitizer crashes
# https://bugs.launchpad.net/ubuntu/+source/llvm-toolchain-14/+bug/2048768
# https://github.com/actions/runner-images/issues/9491
# https://github.com/actions/runner-images/pull/9513
run: sudo sysctl vm.mmap_rnd_bits=28
- name: Get Source
uses: actions/checkout@v4
with:
submodules: recursive
path: src
- name: Configure
run: |
cmake \
-S src \
-B obj \
-G Ninja \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_CXX_COMPILER='clang++' \
-DCMAKE_CXX_FLAGS='-gdwarf-4 -fno-omit-frame-pointer -fsanitize=address,leak,undefined' \
-DCMAKE_C_COMPILER='clang' \
-DCMAKE_C_FLAGS='-gdwarf-4 -fno-omit-frame-pointer -fsanitize=address,leak,undefined' \
-DCMAKE_INSTALL_PREFIX=pfx \
-DENABLE_CLI=OFF \
-DENABLE_DAEMON=OFF \
-DENABLE_GTK=OFF \
-DENABLE_MAC=OFF \
-DENABLE_QT=OFF \
-DENABLE_TESTS=ON \
-DENABLE_UTILS=ON \
-DREBUILD_WEB=OFF \
-DRUN_CLANG_TIDY=OFF
- name: Make
run: cmake --build obj --config Debug --target libtransmission-test transmission-show
- name: Test with sanitizers
run: cmake -E chdir obj ctest -j $(nproc) --build-config Debug --output-on-failure
sanitizer-tests-macos:
runs-on: macos-14
@ -311,7 +316,7 @@ jobs:
-DENABLE_GTK=${{ (needs.what-to-make.outputs.make-gtk == 'true') && 'ON' || 'OFF' }} \
-DENABLE_MAC=${{ (needs.what-to-make.outputs.make-mac == 'true') && 'ON' || 'OFF' }} \
-DENABLE_QT=${{ (needs.what-to-make.outputs.make-qt == 'true') && 'ON' || 'OFF' }} \
-DENABLE_TESTS=ON \
-DENABLE_TESTS=${{ (needs.what-to-make.outputs.make-tests == 'true') && 'ON' || 'OFF' }} \
-DENABLE_UTILS=${{ (needs.what-to-make.outputs.make-utils == 'true') && 'ON' || 'OFF' }} \
-DREBUILD_WEB=${{ (needs.what-to-make.outputs.make-web == 'true') && 'ON' || 'OFF' }} \
-DENABLE_WERROR=ON \
@ -514,7 +519,7 @@ jobs:
-DENABLE_GTK=OFF `
-DENABLE_MAC=OFF `
-DENABLE_QT=${{ (needs.what-to-make.outputs.make-dist == 'true' || needs.what-to-make.outputs.make-qt == 'true') && 'ON' || 'OFF' }} `
-DENABLE_TESTS=ON `
-DENABLE_TESTS=${{ (needs.what-to-make.outputs.make-tests == 'true') && 'ON' || 'OFF' }} `
-DENABLE_UTILS=ON `
-DREBUILD_WEB=${{ (needs.what-to-make.outputs.make-web == 'true') && 'ON' || 'OFF' }} `
-DENABLE_WERROR=ON `