diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 66193455..2f4c7989 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,9 +31,9 @@ jobs: set -x cat /etc/lsb-release # Remove existing Clang installations. - sudo apt-get remove clang-${{matrix.config.installed_clang_version}} \ - lldb-${{matrix.config.installed_clang_version}} \ - lld-${{matrix.config.installed_clang_version}} \ + sudo apt-get remove \ + clang-${{matrix.config.installed_clang_version}} \ + clang++-${{matrix.config.installed_clang_version}} \ clangd-${{matrix.config.installed_clang_version}} \ clang-tidy-${{matrix.config.installed_clang_version}} \ clang-format-${{matrix.config.installed_clang_version}} \ @@ -42,20 +42,25 @@ jobs: lld-${{matrix.config.installed_clang_version}} \ lldb-${{matrix.config.installed_clang_version}} \ llvm-${{matrix.config.installed_clang_version}}-tools \ - libomp-${{matrix.config.installed_clang_version}}-dev \ libc++-${{matrix.config.installed_clang_version}}-dev \ libc++abi-${{matrix.config.installed_clang_version}}-dev \ libclang-common-${{matrix.config.installed_clang_version}}-dev \ libclang-${{matrix.config.installed_clang_version}}-dev \ libclang-cpp${{matrix.config.installed_clang_version}}-dev \ - libunwind-${{matrix.config.installed_clang_version}}-dev + libomp-${{matrix.config.installed_clang_version}}-dev \ + libunwind-${{matrix.config.installed_clang_version}}-dev \ + libc++-dev libc++1 libc++abi-dev libc++abi1 # Install LLVM+Clang. + CLANG_VERSION=$(echo ${{matrix.config.toolchain}} | cut -d '-' -f2) wget https://apt.llvm.org/llvm.sh chmod +x llvm.sh - sudo ./llvm.sh ${{matrix.config.clang_version}} all - sudo apt-get install libc++-dev libc++1 libc++abi-dev libc++abi1 - find /usr/lib -name libc++.so* - ${{matrix.config.toolchain}} --version + sudo ./llvm.sh ${CLANG_VERSION} all + # Link Clang libraries (if not done by llvm.sh - some links are already set). + sudo ln -fs /usr/lib/llvm-${CLANG_VERSION}/lib/lib* /usr/lib/x86_64-linux-gnu/ || true + # If Clang 17, install a newer version of libc++ and libc++abi. + [[ ${CLANG_VERSION} = 17 ]] && sudo apt-get install libc++-dev libc++1 libc++abi-dev libc++abi1 + find /usr/lib/x86_64-linux-gnu/ -name libc++.so* || true + clang++-${CLANG_VERSION} --version - name: Install GCC if: startsWith(matrix.config.name, 'Ubuntu GCC') run: | @@ -67,8 +72,8 @@ jobs: GCC_VERSION=$(echo ${{matrix.config.toolchain}} | cut -d '-' -f2) echo "GCC_VERSION=$GCC_VERSION" sudo apt-get install g++-${GCC_VERSION} gcc-${GCC_VERSION} - find /usr/lib -name libstdc++.so* - ${{matrix.config.toolchain}} --version + find /usr/lib/x86_64-linux-gnu/ -name libstdc++.so* + g++-${GCC_VERSION} --version - name: CMake Configure run: | set -x @@ -82,7 +87,7 @@ jobs: run: | set -x cmake --build .build --config Asan --target all -- -k 0 - - name: CTest + - name: CMake Test run: | set -x cd .build diff --git a/Ubuntu-24.04.Dockerfile b/Ubuntu-24.04.Dockerfile deleted file mode 100644 index a905590d..00000000 --- a/Ubuntu-24.04.Dockerfile +++ /dev/null @@ -1,114 +0,0 @@ -FROM ubuntu:24.04 - -ARG TARGETPLATFORM -ARG RUNNER_VERSION -ARG RUNNER_CONTAINER_HOOKS_VERSION -# Docker and Docker Compose arguments -ARG CHANNEL=stable -ARG DOCKER_VERSION=24.0.7 -ARG DOCKER_COMPOSE_VERSION=v2.23.0 -ARG DUMB_INIT_VERSION=1.2.5 -ARG RUNNER_USER_UID=1001 -ARG DOCKER_GROUP_GID=121 - -ENV DEBIAN_FRONTEND=noninteractive -RUN apt-get update -y \ - && apt-get install -y software-properties-common \ - && add-apt-repository -y ppa:git-core/ppa \ - && apt-get update -y \ - && apt-get install -y --no-install-recommends \ - curl \ - ca-certificates \ - git \ - jq \ - sudo \ - unzip \ - zip \ - && rm -rf /var/lib/apt/lists/* - -# Download latest git-lfs version -RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash && \ - apt-get install -y --no-install-recommends git-lfs - -RUN adduser --disabled-password --gecos "" --uid $RUNNER_USER_UID runner \ - && groupadd docker --gid $DOCKER_GROUP_GID \ - && usermod -aG sudo runner \ - && usermod -aG docker runner \ - && echo "%sudo ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers \ - && echo "Defaults env_keep += \"DEBIAN_FRONTEND\"" >> /etc/sudoers - -ENV HOME=/home/runner - -RUN export ARCH=$(echo ${TARGETPLATFORM} | cut -d / -f2) \ - && if [ "$ARCH" = "arm64" ]; then export ARCH=aarch64 ; fi \ - && if [ "$ARCH" = "amd64" ] || [ "$ARCH" = "i386" ]; then export ARCH=x86_64 ; fi \ - && curl -fLo /usr/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v${DUMB_INIT_VERSION}/dumb-init_${DUMB_INIT_VERSION}_${ARCH} \ - && chmod +x /usr/bin/dumb-init - -ENV RUNNER_ASSETS_DIR=/runnertmp -RUN export ARCH=$(echo ${TARGETPLATFORM} | cut -d / -f2) \ - && if [ "$ARCH" = "amd64" ] || [ "$ARCH" = "x86_64" ] || [ "$ARCH" = "i386" ]; then export ARCH=x64 ; fi \ - && mkdir -p "$RUNNER_ASSETS_DIR" \ - && cd "$RUNNER_ASSETS_DIR" \ - && curl -fLo runner.tar.gz https://github.com/actions/runner/releases/download/v${RUNNER_VERSION}/actions-runner-linux-${ARCH}-${RUNNER_VERSION}.tar.gz \ - && tar xzf ./runner.tar.gz \ - && rm runner.tar.gz \ - && ./bin/installdependencies.sh \ - && mv ./externals ./externalstmp \ - # libyaml-dev is required for ruby/setup-ruby action. - # It is installed after installdependencies.sh and before removing /var/lib/apt/lists - # to avoid rerunning apt-update on its own. - && apt-get install -y libyaml-dev \ - && rm -rf /var/lib/apt/lists/* - -ENV RUNNER_TOOL_CACHE=/opt/hostedtoolcache -RUN mkdir /opt/hostedtoolcache \ - && chgrp docker /opt/hostedtoolcache \ - && chmod g+rwx /opt/hostedtoolcache - -RUN cd "$RUNNER_ASSETS_DIR" \ - && curl -fLo runner-container-hooks.zip https://github.com/actions/runner-container-hooks/releases/download/v${RUNNER_CONTAINER_HOOKS_VERSION}/actions-runner-hooks-k8s-${RUNNER_CONTAINER_HOOKS_VERSION}.zip \ - && unzip ./runner-container-hooks.zip -d ./k8s \ - && rm -f runner-container-hooks.zip - -RUN set -vx; \ - export ARCH=$(echo ${TARGETPLATFORM} | cut -d / -f2) \ - && if [ "$ARCH" = "arm64" ]; then export ARCH=aarch64 ; fi \ - && if [ "$ARCH" = "amd64" ] || [ "$ARCH" = "i386" ]; then export ARCH=x86_64 ; fi \ - && curl -fLo docker.tgz https://download.docker.com/linux/static/${CHANNEL}/${ARCH}/docker-${DOCKER_VERSION}.tgz \ - && tar zxvf docker.tgz \ - && install -o root -g root -m 755 docker/docker /usr/bin/docker \ - && rm -rf docker docker.tgz - -RUN export ARCH=$(echo ${TARGETPLATFORM} | cut -d / -f2) \ - && if [ "$ARCH" = "arm64" ]; then export ARCH=aarch64 ; fi \ - && if [ "$ARCH" = "amd64" ] || [ "$ARCH" = "i386" ]; then export ARCH=x86_64 ; fi \ - && mkdir -p /usr/libexec/docker/cli-plugins \ - && curl -fLo /usr/libexec/docker/cli-plugins/docker-compose https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-linux-${ARCH} \ - && chmod +x /usr/libexec/docker/cli-plugins/docker-compose \ - && ln -s /usr/libexec/docker/cli-plugins/docker-compose /usr/bin/docker-compose \ - && which docker-compose \ - && docker compose version - -# We place the scripts in `/usr/bin` so that users who extend this image can -# override them with scripts of the same name placed in `/usr/local/bin`. -COPY entrypoint.sh startup.sh logger.sh graceful-stop.sh update-status /usr/bin/ - -# Copy the docker shim which propagates the docker MTU to underlying networks -# to replace the docker binary in the PATH. -COPY docker-shim.sh /usr/local/bin/docker - -# Configure hooks folder structure. -COPY hooks /etc/arc/hooks/ - -# Add the Python "User Script Directory" to the PATH -ENV PATH="${PATH}:${HOME}/.local/bin/" -ENV ImageOS=ubuntu24 - -RUN echo "PATH=${PATH}" > /etc/environment \ - && echo "ImageOS=${ImageOS}" >> /etc/environment - -USER runner - -ENTRYPOINT ["/bin/bash", "-c"] -CMD ["entrypoint.sh"]