Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to clang-16 #2094

Merged
merged 6 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 24 additions & 24 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ env:
jobs:
MacOS:
runs-on: macos-14
timeout-minutes: 60
timeout-minutes: 120
steps:
- uses: actions/checkout@dc323e67f16fb5f7663d20ff7941f27f5809e9b6
- uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed
Expand All @@ -54,13 +54,13 @@ jobs:
fail-fast: false
matrix:
options:
- name: "Linux: clang-15 External Project"
run: ./housekeeping/make_external_build.sh -DCLEAR_OBJS=ON -DCMAKE_TOOLCHAIN_FILE=../../cmake/toolchain/clang-15_cxx20.cmake
- name: "Linux: clang-16 External Project"
run: ./housekeeping/make_external_build.sh -DCLEAR_OBJS=ON -DCMAKE_TOOLCHAIN_FILE=../../cmake/toolchain/clang-16_cxx20.cmake

name: "${{ matrix.options.name }}"
runs-on: ubuntu-latest
timeout-minutes: 60
container: qdrvm/kagome-dev:7-minideb
timeout-minutes: 120
container: qdrvm/kagome-dev:8-minideb
steps:
- uses: actions/checkout@dc323e67f16fb5f7663d20ff7941f27f5809e9b6
- uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed
Expand Down Expand Up @@ -90,15 +90,15 @@ jobs:
run: ./housekeeping/make_build.sh -DCLEAR_OBJS=ON -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain/gcc-12_cxx20.cmake -DASAN=ON
- name: "Self-hosted: Linux: gcc-12 TSAN WAVM"
run: ./housekeeping/make_build.sh -DCLEAR_OBJS=ON -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain/gcc-12_cxx20.cmake -DTSAN=ON -DWASM_COMPILER=WAVM
- name: "Self-hosted: Linux: clang-15 UBSAN"
run: ./housekeeping/make_build.sh -DCLEAR_OBJS=ON -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain/clang-15_cxx20.cmake -DUBSAN=ON
- name: "Self-hosted: Linux: clang-15 External Project"
run: ./housekeeping/make_external_build.sh -DCLEAR_OBJS=ON -DCMAKE_TOOLCHAIN_FILE=../../cmake/toolchain/clang-15_cxx20.cmake
- name: "Self-hosted: Linux: clang-16 UBSAN"
run: ./housekeeping/make_build.sh -DCLEAR_OBJS=ON -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain/clang-16_cxx20.cmake -DUBSAN=ON
- name: "Self-hosted: Linux: clang-16 External Project"
run: ./housekeeping/make_external_build.sh -DCLEAR_OBJS=ON -DCMAKE_TOOLCHAIN_FILE=../../cmake/toolchain/clang-16_cxx20.cmake

name: "${{ matrix.options.name }}"
runs-on: [ actions-runner-controller ]
timeout-minutes: 60
container: qdrvm/kagome-dev:7-minideb
timeout-minutes: 120
container: qdrvm/kagome-dev:8-minideb
steps:
- uses: actions/checkout@dc323e67f16fb5f7663d20ff7941f27f5809e9b6
- uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed
Expand All @@ -113,8 +113,8 @@ jobs:
clang-tidy:
name: "Linux: clang-tidy"
runs-on: ubuntu-latest
timeout-minutes: 60
container: qdrvm/kagome-dev:7-minideb
timeout-minutes: 120
container: qdrvm/kagome-dev:8-minideb
steps:
- uses: actions/checkout@dc323e67f16fb5f7663d20ff7941f27f5809e9b6
with:
Expand All @@ -137,8 +137,8 @@ jobs:
if: false # ${{ github.ref == 'refs/heads/master' || startsWith( github.ref, 'refs/tags/') || contains( github.event.pull_request.labels.*.name, 'Non-master self-hosted') }}
name: "Self-hosted: Linux: gcc-12 coverage/sonar"
runs-on: [ actions-runner-controller ]
timeout-minutes: 60
container: qdrvm/kagome-dev:7-minideb
timeout-minutes: 120
container: qdrvm/kagome-dev:8-minideb
steps:
- uses: actions/checkout@dc323e67f16fb5f7663d20ff7941f27f5809e9b6
- uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed
Expand Down Expand Up @@ -177,8 +177,8 @@ jobs:
build-type: "Release"
name: "${{ matrix.options.name }}"
runs-on: ubuntu-latest
timeout-minutes: 60
container: qdrvm/kagome-dev:7-minideb
timeout-minutes: 120
container: qdrvm/kagome-dev:8-minideb
steps:
- uses: actions/checkout@dc323e67f16fb5f7663d20ff7941f27f5809e9b6
- uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed
Expand All @@ -202,8 +202,8 @@ jobs:
build-type: "Release"
name: "${{ matrix.options.name }}"
runs-on: [ actions-runner-controller ]
timeout-minutes: 60
container: qdrvm/kagome-dev:7-minideb
timeout-minutes: 120
container: qdrvm/kagome-dev:8-minideb
steps:
- uses: actions/checkout@dc323e67f16fb5f7663d20ff7941f27f5809e9b6
- uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed
Expand All @@ -229,8 +229,8 @@ jobs:
- name: "Self-hosted: Push RelWithDebInfo Docker image"
build-type: "RelWithDebInfo"
runs-on: [ actions-runner-controller ]
timeout-minutes: 60
container: qdrvm/kagome-dev@sha256:14d5aa92c971073e82ba9bbac9b615701e99c71f64e58bdd45e5b3dbc09944bd
timeout-minutes: 120
container: qdrvm/kagome-dev:8-minideb
steps:
- uses: actions/checkout@dc323e67f16fb5f7663d20ff7941f27f5809e9b6
- uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed
Expand Down Expand Up @@ -267,8 +267,8 @@ jobs:
- name: "Self-hosted: Push RelWithDebInfo Docker image"
build-type: "RelWithDebInfo"
runs-on: [ actions-runner-controller ]
timeout-minutes: 60
container: qdrvm/kagome-dev@sha256:14d5aa92c971073e82ba9bbac9b615701e99c71f64e58bdd45e5b3dbc09944bd
timeout-minutes: 120
container: qdrvm/kagome-dev:8-minideb
steps:
- uses: actions/checkout@dc323e67f16fb5f7663d20ff7941f27f5809e9b6
with:
Expand Down Expand Up @@ -329,7 +329,7 @@ jobs:
- name: "Block building warp sync"
test: "test0011"
runs-on: [ actions-runner-controller ]
timeout-minutes: 60
timeout-minutes: 120
needs: [Push-self-hosted]
steps:
- name: Set owner of working dir recurively
Expand Down
2 changes: 0 additions & 2 deletions cmake/toolchain/clang-15_cxx20.cmake

This file was deleted.

2 changes: 2 additions & 0 deletions cmake/toolchain/clang-16_cxx20.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include(${CMAKE_CURRENT_LIST_DIR}/compiler/clang-16.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/cxx20.cmake)
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
include(${CMAKE_CURRENT_LIST_DIR}/compiler/clang-15.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/compiler/clang-16.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/cxx20.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/linker/mold.cmake)
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
if(DEFINED POLLY_COMPILER_CLANG_15_CMAKE)
if(DEFINED POLLY_COMPILER_CLANG_16_CMAKE)
return()
else()
set(POLLY_COMPILER_CLANG_15_CMAKE 1)
set(POLLY_COMPILER_CLANG_16_CMAKE 1)
endif()

include(${CMAKE_CURRENT_LIST_DIR}/../../print.cmake)
Expand All @@ -13,29 +13,29 @@ if(XCODE_VERSION)
fatal_error(${_err})
endif()

find_program(CMAKE_C_COMPILER clang-15 REQUIRED)
find_program(CMAKE_CXX_COMPILER clang++-15)
find_program(CMAKE_C_COMPILER clang-16 REQUIRED)
find_program(CMAKE_CXX_COMPILER clang++-16)

if (CMAKE_CXX_COMPILER STREQUAL "CMAKE_CXX_COMPILER-NOTFOUND")
message(STATUS "clang++-15 not found, checking clang++")
message(STATUS "clang++-16 not found, checking clang++")
cmake_path(GET CMAKE_C_COMPILER PARENT_PATH compiler_path)
message(STATUS "Assumed compiler path: ${compiler_path}")
# clang++-15 doesn't always exist
# clang++-16 doesn't always exist
find_program(CMAKE_CXX_COMPILER clang++ PATHS "${compiler_path}" NO_DEFAULT_PATH REQUIRED)

execute_process(COMMAND "${CMAKE_CXX_COMPILER}" --version OUTPUT_VARIABLE compiler_version_output)
string(REGEX MATCH "clang version ([0-9]+)\\.[0-9]+\\.[0-9]+" compiler_version "${compiler_version_output}")
if (NOT CMAKE_MATCH_1 STREQUAL "15")
message(FATAL_ERROR "Found clang++ version ${CMAKE_MATCH_1}, 15 is required")
if (NOT CMAKE_MATCH_1 STREQUAL "16")
message(FATAL_ERROR "Found clang++ version ${CMAKE_MATCH_1}, 16 is required")
endif()
endif()

if(NOT CMAKE_C_COMPILER)
fatal_error("clang-15 not found")
fatal_error("clang-16 not found")
endif()

if(NOT CMAKE_CXX_COMPILER)
fatal_error("clang++-15 not found")
fatal_error("clang++-16 not found")
endif()

set(
Expand Down
24 changes: 12 additions & 12 deletions housekeeping/docker/kagome-dev/minideb.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM bitnami/minideb@sha256:1cc3df6a4098088cc6d750ad3ce39ea2d169a19a619f82f49dbcf3ad55ab7b4b
FROM bitnami/minideb@sha256:a0dd12fa3f8b98f82f6d9e71cf1b81d8fd50a03e44f152f0b2b876e544639ca5
MAINTAINER Vladimir Shcherba <[email protected]>

SHELL ["/bin/bash", "-c"]
Expand Down Expand Up @@ -36,10 +36,10 @@ RUN curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /
build-essential \
gcc-12 \
g++-12 \
llvm-15-dev \
clang-tidy-15 \
clang-format-15 \
libclang-rt-15-dev \
llvm-16-dev \
clang-tidy-16 \
clang-format-16 \
libclang-rt-16-dev \
make \
git \
ccache \
Expand All @@ -52,7 +52,7 @@ RUN curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /
rm -rf /var/lib/apt/lists/*

# install rustc
ENV RUST_VERSION=1.75.0
ENV RUST_VERSION=1.77.0
ENV RUSTUP_HOME=/root/.rustup
ENV CARGO_HOME=/root/.cargo
ENV PATH="${CARGO_HOME}/bin:${PATH}"
Expand All @@ -73,8 +73,8 @@ RUN /venv/bin/pip install --no-cache-dir cmake==3.25 scikit-build requests gitpy
ENV HUNTER_PYTHON_LOCATION=/venv/bin/python3

# set env
ENV LLVM_ROOT=/usr/lib/llvm-15
ENV LLVM_DIR=/usr/lib/llvm-15/lib/cmake/llvm/
ENV LLVM_ROOT=/usr/lib/llvm-16
ENV LLVM_DIR=/usr/lib/llvm-16/lib/cmake/llvm/
ENV PATH=${LLVM_ROOT}/bin:${LLVM_ROOT}/share/clang:${PATH}
ENV CC=gcc-12
ENV CXX=g++-12
Expand All @@ -84,10 +84,10 @@ ENV CXX=g++-12
RUN update-alternatives --install /usr/bin/python python /venv/bin/python3 90 && \
update-alternatives --install /usr/bin/python python /usr/bin/python3 80 && \
\
update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-15 50 && \
update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-15 50 && \
update-alternatives --install /usr/bin/clang clang /usr/lib/llvm-15/bin/clang-15 50 && \
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-15 50 && \
update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-16 50 && \
update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-16 50 && \
update-alternatives --install /usr/bin/clang clang /usr/lib/llvm-16/bin/clang-16 50 && \
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-16 50 && \
\
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 90 && \
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 90 && \
Expand Down
Loading