Skip to content

Commit ce6ae3a

Browse files
committed
Merge branch 'testnet' into collated-data-opt
2 parents 710e3b5 + efd9e8e commit ce6ae3a

File tree

975 files changed

+11293
-12841
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

975 files changed

+11293
-12841
lines changed

.clang-format

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,16 @@ DisableFormat: false
4949
ExperimentalAutoDetectBinPacking: false
5050
FixNamespaceComments: true
5151
# ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
52+
IncludeBlocks: Regroup
53+
IncludeCategories:
54+
- Regex: '>$'
55+
Priority: -3
56+
- Regex: '.h>$'
57+
Priority: -2
58+
- Regex: '^\".*/.*\"$'
59+
Priority: -1
60+
- Regex: '^\"[^/]*\"$'
61+
Priority: 0
5262
IndentCaseLabels: true
5363
IndentWidth: 2
5464
IndentWrappedFunctionNames: false
@@ -70,7 +80,7 @@ PenaltyExcessCharacter: 1000000
7080
PenaltyReturnTypeOnItsOwnLine: 200
7181
PointerAlignment: Left
7282
ReflowComments: false # true
73-
SortIncludes: false # disabled, because we need case insensitive sort
83+
SortIncludes: true
7484
SpaceAfterCStyleCast: false
7585
SpaceAfterTemplateKeyword: true
7686
SpaceBeforeAssignmentOperators: true

.gitattributes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,7 @@ third_party/** linguist-vendored
3434
*.a binary
3535
*.jar binary
3636
*.tlo binary
37+
38+
*.h merge=clang-format-driver
39+
*.cpp merge=clang-format-driver
40+
*.hpp merge=clang-format-driver

.github/workflows/build-ton-linux-x86-64-werror.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
name: Ubuntu TON -Werror build (shared, x86-64)
1+
name: Lint
22

33
on: [push, pull_request, workflow_dispatch, workflow_call]
44

55
jobs:
6-
build:
6+
lint:
77
runs-on: ubuntu-24.04
88

99
steps:
@@ -27,7 +27,7 @@ jobs:
2727
run: |
2828
wget https://apt.llvm.org/llvm.sh
2929
chmod +x llvm.sh
30-
sudo ./llvm.sh 21 clang
30+
sudo ./llvm.sh 21 all
3131
3232
# TODO: Preserve ccache cache between runs once we get rid of warning suppression mappings.
3333

@@ -41,3 +41,9 @@ jobs:
4141
-DTON_USE_LLD=On \
4242
-DTON_WERROR_BUILD=On
4343
ninja -C build
44+
45+
- name: Check C++ formatting
46+
run: |
47+
# TODO: Run clang-format only on changed files.
48+
clang-format-21 -i $(git ls-files '*.h' '*.hpp' '*.cpp' ':!^example/android/third_party' ':!^tolk/')
49+
git diff --exit-code

.github/workflows/build-ton-macos-13-x86-64-portable.yml renamed to .github/workflows/build-ton-macos-15-x86-64-portable.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
name: MacOS-13 TON build (portable, x86-64)
1+
name: MacOS-15 TON build (portable, x86-64)
22

33
on: [push, pull_request, workflow_dispatch, workflow_call]
44

55
jobs:
66
build:
7-
runs-on: macos-13
7+
runs-on: macos-15-intel
88

99
steps:
1010
- name: Check out repository
@@ -28,23 +28,23 @@ jobs:
2828
uses: actions/cache@v4
2929
with:
3030
path: 3pp
31-
key: ${{ runner.os }}-${{ runner.arch }}-13-3pp-${{ hashFiles('**/assembly/native/build-macos-portable.sh') }}
31+
key: ${{ runner.os }}-${{ runner.arch }}-15-3pp-${{ hashFiles('**/assembly/native/build-macos-portable.sh') }}
3232

3333
- name: Cache TON test
3434
id: cache-ton
3535
uses: actions/cache@v4
3636
with:
3737
path: ~/.ccache
38-
key: ${{ runner.os }}-${{ runner.arch }}-13-portable-ccache-${{ steps.date-stamp.outputs.timestamp }}
39-
restore-keys: ${{ runner.os }}-${{ runner.arch }}-13-portable-ccache
38+
key: ${{ runner.os }}-${{ runner.arch }}-15-portable-ccache-${{ steps.date-stamp.outputs.timestamp }}
39+
restore-keys: ${{ runner.os }}-${{ runner.arch }}-15-portable-ccache
4040

4141
- name: Build TON
4242
run: |
4343
git submodule sync --recursive
4444
git submodule update
4545
cp assembly/native/build-macos-portable.sh .
4646
chmod +x build-macos-portable.sh
47-
./build-macos-portable.sh -t -a -c -o 13.0
47+
./build-macos-portable.sh -t -a -c -o 15.0
4848
ccache -sp
4949
5050
- name: Run Tests
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Clear all GH cache
2+
3+
on:
4+
workflow_dispatch
5+
6+
jobs:
7+
clear-cache:
8+
env:
9+
GH_TOKEN: ${{ github.token }}
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Clear all cache
13+
run: gh cache delete --all

.github/workflows/create-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
- name: Download Mac x86-64 artifacts
5454
uses: dawidd6/action-download-artifact@v6
5555
with:
56-
workflow: build-ton-macos-13-x86-64-portable.yml
56+
workflow: build-ton-macos-15-x86-64-portable.yml
5757
path: artifacts
5858
workflow_conclusion: success
5959
branch: master
@@ -71,7 +71,7 @@ jobs:
7171
- name: Download and unzip Mac x86-64 artifacts
7272
uses: dawidd6/action-download-artifact@v6
7373
with:
74-
workflow: build-ton-macos-13-x86-64-portable.yml
74+
workflow: build-ton-macos-15-x86-64-portable.yml
7575
path: artifacts
7676
workflow_conclusion: success
7777
branch: master

.github/workflows/create-tolk-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
- name: Download and unzip Mac x86-64 artifacts
4141
uses: dawidd6/action-download-artifact@v6
4242
with:
43-
workflow: build-ton-macos-13-x86-64-portable.yml
43+
workflow: build-ton-macos-15-x86-64-portable.yml
4444
path: artifacts
4545
workflow_conclusion: success
4646
branch: master

adnl/adnl-address-list.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,13 @@
1616
1717
Copyright 2017-2020 Telegram Systems LLP
1818
*/
19-
#include "adnl-address-list.hpp"
20-
#include "adnl-peer-table.h"
2119
#include "auto/tl/ton_api.hpp"
22-
#include "td/utils/overloaded.h"
23-
#include "td/net/UdpServer.h"
2420
#include "keys/encryptor.h"
21+
#include "td/net/UdpServer.h"
22+
#include "td/utils/overloaded.h"
23+
24+
#include "adnl-address-list.hpp"
25+
#include "adnl-peer-table.h"
2526

2627
namespace ton {
2728

adnl/adnl-address-list.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@
1818
*/
1919
#pragma once
2020

21-
#include "adnl-network-manager.h"
2221
#include "crypto/common/refcnt.hpp"
2322

23+
#include "adnl-network-manager.h"
24+
2425
namespace ton {
2526

2627
namespace adnl {

adnl/adnl-address-list.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
*/
1919
#pragma once
2020

21-
#include "adnl-node-id.hpp"
2221
#include "adnl-address-list.h"
22+
#include "adnl-node-id.hpp"
2323

2424
namespace ton {
2525

0 commit comments

Comments
 (0)