Skip to content

Commit

Permalink
Merge branch 'master' into fix/transaction-broadcast
Browse files Browse the repository at this point in the history
  • Loading branch information
Harrm authored Nov 15, 2022
2 parents 49bc169 + ff91cec commit 01607c7
Show file tree
Hide file tree
Showing 15 changed files with 97 additions and 43 deletions.
20 changes: 8 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env:
GITHUB_HUNTER_TOKEN: ${{ secrets.HUNTER_TOKEN }}
# Change all container: values to this variable once this feature is available
# https://github.saobby.my.eu.orgmunity/t/how-to-set-and-access-a-workflow-variable/17335/6
INDOCKER_IMAGE: soramitsu/kagome-dev:4.1-minideb
INDOCKER_IMAGE: soramitsu/kagome-dev:4-minideb
CACHE_VERSION: v07
CACHE_PATHS: |
~/Library/Caches/pip
Expand Down Expand Up @@ -53,27 +53,25 @@ jobs:
run: ./housekeeping/make_build.sh -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain/clang-11_cxx17.cmake -DUBSAN=ON
- name: "Linux: clang-11 External Project"
run: ./housekeeping/make_external_build.sh -DCMAKE_TOOLCHAIN_FILE=../../cmake/toolchain/clang-11_cxx17.cmake
- name: "Linux: clang-14 UBSAN"
run: ./housekeeping/make_build.sh -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain/clang-14_cxx17.cmake -DUBSAN=ON
- name: "Linux: clang-15 UBSAN"
run: ./housekeeping/make_build.sh -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain/clang-15_cxx17.cmake -DUBSAN=ON

name: "${{ matrix.options.name }}"
runs-on: ubuntu-latest
container: soramitsu/kagome-dev:4.1-minideb
container: soramitsu/kagome-dev:4-minideb
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ${{ env.CACHE_PATHS }}
key: ${{ github.job }}-${{ matrix.options.name }}-${{ env.CACHE_VERSION }}
- name: Install mold
run: ./housekeeping/ci_install_mold.sh --make-default
- name: "${{ matrix.options.name }}"
run: "${{ matrix.options.run }}"

clang-tidy:
name: "Linux: clang-tidy"
runs-on: ubuntu-latest
container: soramitsu/kagome-dev:4.1-minideb
container: soramitsu/kagome-dev:4-minideb
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -93,15 +91,13 @@ jobs:
coverage:
name: "Linux: gcc-10 coverage/sonar"
runs-on: ubuntu-latest
container: soramitsu/kagome-dev:4.1-minideb
container: soramitsu/kagome-dev:4-minideb
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ${{ env.CACHE_PATHS }}
key: ${{ github.job }}-${{ env.CACHE_VERSION }}
- name: Install mold
run: ./housekeeping/ci_install_mold.sh --make-default
- name: makeBuild
env:
BUILD_FINAL_TARGET: ctest_coverage
Expand Down Expand Up @@ -131,7 +127,7 @@ jobs:
build-type: "Release"
name: "${{ matrix.options.name }}"
runs-on: ubuntu-latest
container: soramitsu/kagome-dev:4.1-minideb
container: soramitsu/kagome-dev:4-minideb
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
Expand All @@ -155,7 +151,7 @@ jobs:
- name: "Push Release Docker image"
build-type: "Release"
runs-on: ubuntu-latest
container: soramitsu/kagome-dev:4.1-minideb
container: soramitsu/kagome-dev:4-minideb
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
Expand Down
2 changes: 1 addition & 1 deletion cmake/toolchain/clang-11_cxx17.cmake
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
include(${CMAKE_CURRENT_LIST_DIR}/compiler/clang-11.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/cxx17.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/cxx17.cmake)
3 changes: 3 additions & 0 deletions cmake/toolchain/clang-11_mold_cxx17.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include(${CMAKE_CURRENT_LIST_DIR}/compiler/clang-11.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/cxx17.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/linker/mold.cmake)
2 changes: 0 additions & 2 deletions cmake/toolchain/clang-14_cxx17.cmake

This file was deleted.

2 changes: 2 additions & 0 deletions cmake/toolchain/clang-15_cxx17.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include(${CMAKE_CURRENT_LIST_DIR}/compiler/clang-15.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/cxx17.cmake)
3 changes: 3 additions & 0 deletions cmake/toolchain/clang-15_mold_cxx17.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include(${CMAKE_CURRENT_LIST_DIR}/compiler/clang-15.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/cxx17.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_14_CMAKE)
if(DEFINED POLLY_COMPILER_CLANG_15_CMAKE)
return()
else()
set(POLLY_COMPILER_CLANG_14_CMAKE 1)
set(POLLY_COMPILER_CLANG_15_CMAKE 1)
endif()

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

find_program(CMAKE_C_COMPILER clang-14)
find_program(CMAKE_CXX_COMPILER clang++-14)
find_program(CMAKE_C_COMPILER clang-15)
find_program(CMAKE_CXX_COMPILER clang++-15)

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

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

set(
Expand Down
2 changes: 1 addition & 1 deletion cmake/toolchain/gcc-10_cxx17.cmake
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
include(${CMAKE_CURRENT_LIST_DIR}/compiler/gcc-10.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/cxx17.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/cxx17.cmake)
3 changes: 3 additions & 0 deletions cmake/toolchain/gcc-10_mold_cxx17.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include(${CMAKE_CURRENT_LIST_DIR}/compiler/gcc-10.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/cxx17.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/linker/mold.cmake)
2 changes: 1 addition & 1 deletion cmake/toolchain/gcc-12_cxx17.cmake
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
include(${CMAKE_CURRENT_LIST_DIR}/compiler/gcc-12.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/cxx17.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/cxx17.cmake)
3 changes: 3 additions & 0 deletions cmake/toolchain/gcc-12_mold_cxx17.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include(${CMAKE_CURRENT_LIST_DIR}/compiler/gcc-12.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/cxx17.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/linker/mold.cmake)
16 changes: 16 additions & 0 deletions cmake/toolchain/linker/mold.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright (c) 2014, Ruslan Baratov
# All rights reserved.

if (DEFINED POLLY_FLAGS_LINKER_MOLD_CMAKE_)
return()
else ()
set(POLLY_FLAGS_LINKER_MOLD_CMAKE_ 1)
endif ()

find_program(MOLD_FOUND mold)
if(NOT MOLD_FOUND)
fatal_error("mold not found")
endif()

include(${CMAKE_CURRENT_LIST_DIR}/../../add_cache_flag.cmake)
add_cache_flag(CMAKE_EXE_LINKER_FLAGS -fuse-ld=mold)
11 changes: 0 additions & 11 deletions housekeeping/ci_install_mold.sh

This file was deleted.

2 changes: 1 addition & 1 deletion housekeeping/docker/kagome-dev/build_and_push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

cd "$(dirname "$0")"

VERSION=${VERSION:-4.1}
VERSION=${VERSION:-4}
TAG=soramitsu/kagome-dev:$VERSION

docker build -t ${TAG}-minideb -f minideb.Dockerfile .
Expand Down
57 changes: 49 additions & 8 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:f643a1ae18ea62acdc1d85d1892b41a0270faeb0e127c15e6afe41209d838b33
FROM bitnami/minideb@sha256:297209ec9579cf8a5db349d5d3f3d3894e2d4281ee79df40d479c16896fdf41e

MAINTAINER Vladimir Shcherba <abrehchs@gmail.com>

Expand All @@ -23,28 +23,49 @@ RUN curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /
bullseye stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null && \
echo \
"deb http://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-11 main" | tee -a /etc/apt/sources.list.d/docker.list > /dev/null && \
echo \
"deb http://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-12 main" | tee -a /etc/apt/sources.list.d/docker.list > /dev/null && \
echo \
"deb http://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-13 main" | tee -a /etc/apt/sources.list.d/docker.list > /dev/null && \
echo \
"deb http://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-14 main" | tee -a /etc/apt/sources.list.d/docker.list > /dev/null && \
echo \
"deb http://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-15 main" | tee -a /etc/apt/sources.list.d/docker.list > /dev/null && \
echo \
"deb http://deb.debian.org/debian/ testing main" | tee -a /etc/apt/sources.list.d/docker.list > /dev/null && \
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \
wget -q -O- https://github.com/rui314/mold/releases/download/v1.5.1/mold-1.5.1-x86_64-linux.tar.gz | tar -C /usr/local --strip-components=1 -xzf - && \
apt-get update && apt-get install --no-install-recommends -y \
docker-ce \
docker-ce-cli \
containerd.io \
build-essential \
gcc-10 \
g++-10 \
gcc-11 \
g++-11 \
gcc-12 \
g++-12 \
clang-11 \
llvm-11-dev \
clang-tidy-11 \
clang-format-11 \
clang-12 \
llvm-12-dev \
clang-tidy-12 \
clang-format-12 \
clang-13 \
llvm-13-dev \
clang-tidy-13 \
clang-format-13 \
clang-14 \
llvm-14-dev \
clang-tidy-14 \
clang-format-14 \
clang-15 \
llvm-15-dev \
clang-tidy-15 \
clang-format-15 \
make \
git \
ccache \
Expand Down Expand Up @@ -84,20 +105,40 @@ ENV CXX=g++-10

# set default compilers and tools
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 90 && \

update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-11 90 && \
update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-11 90 && \
update-alternatives --install /usr/bin/clang clang /usr/lib/llvm-11/bin/clang-11 90 && \
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-11 90 && \

update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-14 80 && \
update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-14 80 && \
update-alternatives --install /usr/bin/clang clang /usr/lib/llvm-14/bin/clang-14 80 && \
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-14 80 && \
update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-12 80 && \
update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-12 80 && \
update-alternatives --install /usr/bin/clang clang /usr/lib/llvm-12/bin/clang-12 80 && \
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-12 80 && \

update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-13 70 && \
update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-13 70 && \
update-alternatives --install /usr/bin/clang clang /usr/lib/llvm-13/bin/clang-13 70 && \
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-13 70 && \

update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-14 60 && \
update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-14 60 && \
update-alternatives --install /usr/bin/clang clang /usr/lib/llvm-14/bin/clang-14 60 && \
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-14 60 && \

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/gcc gcc /usr/bin/gcc-10 90 && \
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 90 && \
update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-10 90 && \

update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 80 && \
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 80 && \
update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-12 80
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 80 && \
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 80 && \
update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-11 80 && \

update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 70 && \
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 70 && \
update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-12 70

0 comments on commit 01607c7

Please sign in to comment.