Skip to content

Commit

Permalink
Experiment: Look for libstdc++ packages in debian:testing
Browse files Browse the repository at this point in the history
  • Loading branch information
dgreatwood committed Oct 17, 2024
1 parent cf3ba36 commit 94146e7
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions .github/workflows/linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,10 @@ jobs:
strategy:
fail-fast: false
matrix:
# !!!!!!!!
os: [ 'debian:testing' ]
compiler: [ 'clang' ]
sanitizer: [ 'none' ] # ThreadSanitizer reports errors
tls: [ 'true' ]
os: [ 'debian:stable', 'debian:testing', 'registry.access.redhat.com/ubi8/ubi-minimal', 'registry.access.redhat.com/ubi9/ubi-minimal' ]
compiler: [ 'gcc', 'clang' ]
sanitizer: [ 'address', 'undefined', 'none' ] # ThreadSanitizer reports errors
tls: [ 'true', 'false' ]
exclude:
- os: 'registry.access.redhat.com/ubi8/ubi-minimal'
sanitizer: 'address'
Expand Down Expand Up @@ -58,10 +57,24 @@ jobs:
if: contains(matrix.os, 'debian')
run: |
if [ ${{ matrix.compiler }} = gcc ]; then compiler=g++; else compiler="clang lld ?exact-name(libclang-rt-dev)"; fi
# apt -y update # !!!!!!!!
apt -y update
apt -y install $compiler meson pkg-config cmake rapidjson-dev libssl-dev netbase '?exact-name(libhowardhinnant-date-dev)' '?exact-name(libgmock-dev) (?version([1-9]\.[1-9][1-9]) | ?version([1-9]\.[2-9][0-9]))' '?exact-name(libcpp-httplib-dev)' libcurl4-openssl-dev git ca-certificates curl gpg gpgv gpg-agent lcov llvm-dev --no-install-recommends
# if [ ${{ matrix.compiler }} = clang ] && [ ${{ matrix.os == 'debian:testing' }} ]; then libstdcpp_latest=$(apt-cache search "libstdc++" | grep "libstdc++-..-dev " | sort -r | head -c 16); libstdcpp_latest_fst9=$(echo "${libstdcpp_latest}" | head -c 9); libstdcpp_latest_lst3=$(echo "${libstdcpp_latest}" | tail -c 4 | head -c 3); if [ ${libstdcpp_latest_fst9} = "libstdc++" ] && [ ${libstdcpp_latest_lst3} = "dev" ]; then apt -y install ${libstdcpp_latest} --no-install-recommends; fi; fi
# Periodically, debian:testing fails with clang, saying that
# libstdc++ cannot be found. In debian:testing/clang, normally
# libstdc++-dev is installed as a dependency of meson. In the
# situation where the build breaks, the meson dependency is
# different to the latest available libstdc++; for instance,
# installing meson dependencies might install
# libstdc++-13-dev, whereas apt has access to
# libstdc++-14-dev. In other situations, the meson dependency
# libstdc++-..-dev may be the same as the latest
# libstdc++-..-dev to which apt has access.
#
# To prevent the build breaking, we need to install the latest
# libstdc++-..-dev to which apt has access - not the N-1
# version which may be installed as a meson dependency.
if [ ${{ matrix.compiler }} = clang ] && [ ${{ matrix.os == 'debian:testing' }} ]; then libstdcpp_latest=$(apt-cache search "libstdc++" | grep "libstdc++-..-dev " | sort -r | head -c 16); libstdcpp_latest_fst9=$(echo "${libstdcpp_latest}" | head -c 9); libstdcpp_latest_lst3=$(echo "${libstdcpp_latest}" | tail -c 4 | head -c 3); if [ ${libstdcpp_latest_fst9} = "libstdc++" ] && [ ${libstdcpp_latest_lst3} = "dev" ]; then apt -y install ${libstdcpp_latest} --no-install-recommends; fi; fi
- name: Install dependencies (Red Hat)
if: contains(matrix.os, 'redhat')
Expand Down

0 comments on commit 94146e7

Please sign in to comment.