Skip to content
This repository was archived by the owner on Jun 8, 2025. It is now read-only.

Commit 3f74b37

Browse files
authored
Merge PR #235: ci: Upgrade compilers
- Upgrade clang-tidy config for version 16 - Upgrade Python build config at CI - Upgrade compilers to GCC 13 and Clang 16 at CI
2 parents 8e18c3d + 55a2109 commit 3f74b37

File tree

3 files changed

+52
-29
lines changed

3 files changed

+52
-29
lines changed

.clang-tidy

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ Checks: >
2020
cert-oop57-cpp,
2121
cert-oop58-cpp,
2222
clang-analyzer-*,
23+
-clang-analyzer-deadcode.DeadStores,
2324
cppcoreguidelines-*,
2425
-cppcoreguidelines-avoid-c-arrays,
26+
-cppcoreguidelines-avoid-const-or-ref-data-members,
2527
-cppcoreguidelines-avoid-magic-numbers,
2628
-cppcoreguidelines-avoid-non-const-global-variables,
2729
-cppcoreguidelines-init-variables,
@@ -43,9 +45,12 @@ Checks: >
4345
misc-*,
4446
-misc-const-correctness,
4547
-misc-non-private-member-variables-in-classes,
48+
-misc-use-anonymous-namespace,
4649
modernize-*,
4750
-modernize-avoid-c-arrays,
51+
-modernize-unary-static-assert,
4852
-modernize-use-auto,
53+
-modernize-use-nodiscard,
4954
-modernize-use-trailing-return-type,
5055
performance-*,
5156
portability-*,

circle.yml

Lines changed: 36 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ commands:
2121
name: "Install powerpc64 toolchain"
2222
command: |
2323
sudo apt -q update
24-
sudo apt -qy install g++-powerpc64-linux-gnu qemu-user-static
24+
sudo apt -qy install g++-powerpc64-linux-gnu lcov qemu-user-static
2525
2626
configure:
2727
steps:
@@ -86,8 +86,18 @@ commands:
8686
type: string
8787
steps:
8888
- run:
89-
name: "Upgrade codecov"
90-
command: sudo pip3 install --break-system-packages --upgrade --quiet --no-cache-dir codecov
89+
name: "Install codecov"
90+
command: |
91+
export CODECOV_VERSION=v0.6.2
92+
curl -Os https://uploader.codecov.io/$CODECOV_VERSION/linux/codecov
93+
curl -Os https://uploader.codecov.io/$CODECOV_VERSION/linux/codecov.SHA256SUM
94+
curl -Os https://uploader.codecov.io/$CODECOV_VERSION/linux/codecov.SHA256SUM.sig
95+
96+
gpgv codecov.SHA256SUM.sig codecov.SHA256SUM
97+
shasum -c codecov.SHA256SUM
98+
99+
chmod +x codecov
100+
sudo mv codecov /usr/local/bin
91101
- run:
92102
name: "Upload to Codecov"
93103
command: |
@@ -117,7 +127,7 @@ jobs:
117127

118128
linux-gcc-coverage:
119129
docker:
120-
- image: ethereum/cpp-build-env:19-gcc-12
130+
- image: ethereum/cpp-build-env:20-gcc-13
121131
environment:
122132
- BUILD_TYPE: Coverage
123133
steps:
@@ -145,7 +155,7 @@ jobs:
145155

146156
linux-clang-sanitizers:
147157
docker:
148-
- image: ethereum/cpp-build-env:19-clang-15
158+
- image: ethereum/cpp-build-env:20-clang-16
149159
environment:
150160
- CMAKE_OPTIONS: -DSANITIZE=address,undefined,unsigned-integer-overflow,shift-exponent,implicit-conversion,nullability -DCMAKE_CXX_CLANG_TIDY=clang-tidy
151161
- ASAN_OPTIONS: allocator_may_return_null=1
@@ -159,7 +169,7 @@ jobs:
159169

160170
linux-32bit-asan:
161171
docker:
162-
- image: ethereum/cpp-build-env:19-gcc-12-multilib
172+
- image: ethereum/cpp-build-env:20-gcc-13-multilib
163173
environment:
164174
- BUILD_TYPE: RelWithDebInfo
165175
- CMAKE_OPTIONS: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/32bit.cmake -DSANITIZE=address
@@ -173,13 +183,16 @@ jobs:
173183

174184
powerpc64:
175185
docker:
176-
- image: ethereum/cpp-build-env:19-gcc-12
186+
- image: cimg/base:current-22.04
177187
environment:
178188
- TESTS_EXCLUDE: _oom|_multithreaded
179189
- BUILD_TYPE: Coverage
180190
- CMAKE_OPTIONS: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/powerpc64.cmake -DCMAKE_EXE_LINKER_FLAGS=-static
181191
steps:
182192
- checkout
193+
- run:
194+
name: Install codecov GPG key
195+
command: curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import
183196
- install-powerpc64
184197
- configure
185198
- build-tests
@@ -193,9 +206,9 @@ jobs:
193206

194207
linux-release:
195208
docker:
196-
- image: ethereum/cpp-build-env:16-clang-11
209+
- image: ethereum/cpp-build-env:20-gcc-12
197210
environment:
198-
- CMAKE_OPTIONS: -DETHASH_TESTING=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON
211+
CMAKE_OPTIONS: -DETHASH_TESTING=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON
199212
steps:
200213
- checkout
201214
- configure
@@ -207,11 +220,17 @@ jobs:
207220

208221
linux-release-python:
209222
docker:
210-
- image: quay.io/pypa/manylinux_2_24_x86_64
223+
- image: quay.io/pypa/manylinux_2_28_x86_64
224+
environment:
225+
CMAKE_OPTIONS: >
226+
-DETHASH_TESTING=OFF
227+
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
228+
-DCMAKE_INSTALL_PREFIX=~/project/dist
229+
-DCMAKE_INSTALL_LIBDIR=lib
211230
steps:
212231
- checkout
213-
- attach_workspace:
214-
at: ~/project/dist
232+
- configure
233+
- build
215234
- run:
216235
name: "Build wheels"
217236
command: scripts/ci/python_build_wheels.sh
@@ -223,7 +242,7 @@ jobs:
223242
- run:
224243
name: "Select Python"
225244
command: |
226-
echo 'export PATH=/opt/python/cp310-cp310/bin:$PATH' >> $BASH_ENV
245+
echo 'export PATH=/opt/python/cp311-cp311/bin:$PATH' >> $BASH_ENV
227246
source $BASH_ENV
228247
python --version
229248
pip --version
@@ -233,12 +252,6 @@ jobs:
233252
- store_artifacts:
234253
path: ~/project/dist
235254
destination: dist
236-
- run:
237-
name: "Install libffi"
238-
command: apt -q update && apt -qy install libffi-dev
239-
- run:
240-
name: "Install CMake"
241-
command: pip install cmake
242255
- run:
243256
name: "Build wheel with CMake build"
244257
command: ./setup.py bdist_wheel
@@ -248,7 +261,7 @@ jobs:
248261

249262
macos-xcode-tsan:
250263
macos:
251-
xcode: "13.4.1"
264+
xcode: 14.3.1
252265
environment:
253266
- CMAKE_OPTIONS: -DSANITIZE=thread
254267
- TSAN_OPTIONS: allocator_may_return_null=1
@@ -257,13 +270,13 @@ jobs:
257270

258271
macos-xcode-old:
259272
macos:
260-
xcode: "12.5.1"
273+
xcode: 12.5.1
261274
steps:
262275
- macos-defaults
263276

264277
macos-release:
265278
macos:
266-
xcode: "13.4.1"
279+
xcode: 14.3.1
267280
environment:
268281
- CMAKE_OPTIONS: -DETHASH_TESTING=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=~/project/dist
269282
steps:
@@ -321,9 +334,7 @@ workflows:
321334
- macos-xcode-tsan
322335
- macos-xcode-old
323336
- linux-release
324-
- linux-release-python:
325-
requires:
326-
- linux-release
337+
- linux-release-python
327338
- macos-release
328339
- cmake-min
329340
- wasi

scripts/ci/python_build_wheels.sh

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@
77

88
set -eo pipefail
99

10+
ACTIVATE_DIR=bin
11+
1012
if [ -n "$APPVEYOR" ]; then
11-
PYTHON_PATHS="/c/Python310-x64:/c/Python310-x64/Scripts /c/Python39-x64:/c/Python39-x64/Scripts /c/Python38-x64:/c/Python38-x64/Scripts /c/Python37-x64:/c/Python37-x64/Scripts"
13+
ACTIVATE_DIR=Scripts
14+
PYTHON_PATHS="/c/Python311-x64:/c/Python311-x64/Scripts /c/Python310-x64:/c/Python310-x64/Scripts /c/Python39-x64:/c/Python39-x64/Scripts /c/Python38-x64:/c/Python38-x64/Scripts"
1215
elif [ -n "$CIRCLECI" ]; then
1316
if [ "$OSTYPE" = "linux-gnu" ]; then
14-
PYTHON_PATHS="/opt/python/cp310-cp310/bin /opt/python/cp39-cp39/bin /opt/python/cp38-cp38/bin /opt/python/cp37-cp37m/bin /opt/python/cp36-cp36m/bin"
17+
PYTHON_PATHS="/opt/python/cp311-cp311/bin /opt/python/cp310-cp310/bin /opt/python/cp39-cp39/bin /opt/python/cp38-cp38/bin"
1518
else
1619
# The continuation of the script expects "python" executable name,
1720
# so make link python -> python3.
@@ -25,12 +28,16 @@ PATH_ORIG=$PATH
2528
for p in $PYTHON_PATHS
2629
do
2730
PATH="$p:$PATH_ORIG"
31+
python -m venv venv
32+
source venv/$ACTIVATE_DIR/activate
2833
echo '***'
2934
python --version
3035
which python
31-
python -m pip --version
36+
pip --version
3237
echo '***'
33-
python -m pip install wheel
38+
pip install --use-pep517 wheel
3439
python setup.py build_ext --skip-cmake-build
3540
python setup.py bdist_wheel --skip-build
41+
deactivate
42+
rm -rf venv
3643
done

0 commit comments

Comments
 (0)