Skip to content

Commit 8daf5c3

Browse files
authored
Improve artifacts' stripping (#1286)
* add ton build on mac-15 gh action * rename action titles * fix #1246 * improve artifacts' stripping * improve artifacts' stripping * use strip -xSX on mac on github runner * use strip -xSX on mac on github runner + sudo
1 parent c1ee18c commit 8daf5c3

12 files changed

+128
-40
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: MacOS-15 TON build (shared, arm64)
2+
3+
on: [push,workflow_dispatch,workflow_call]
4+
5+
jobs:
6+
build:
7+
runs-on: macos-15
8+
9+
steps:
10+
- name: Check out repository
11+
uses: actions/checkout@v3
12+
with:
13+
submodules: 'recursive'
14+
15+
- name: Build TON
16+
run: |
17+
cp assembly/native/build-macos-shared.sh .
18+
chmod +x build-macos-shared.sh
19+
./build-macos-shared.sh -t -a
20+
21+
- name: Upload artifacts
22+
uses: actions/upload-artifact@master
23+
with:
24+
name: ton-binaries-macos-15
25+
path: artifacts

.github/workflows/build-ton-macos-arm64-shared.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: MacOS TON build (shared, arm64)
1+
name: MacOS-14 TON build (shared, arm64)
22

33
on: [push,workflow_dispatch,workflow_call]
44

CMake/FindSodium.cmake

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,16 @@ elseif (WIN32)
127127
endif()
128128
string(APPEND _PLATFORM_PATH "/$$CONFIG$$")
129129

130+
message(STATUS "MSVC_VERSION ${MSVC_VERSION}")
130131
if (MSVC_VERSION LESS 1900)
131132
math(EXPR _VS_VERSION "${MSVC_VERSION} / 10 - 60")
132133
else()
133-
math(EXPR _VS_VERSION "${MSVC_VERSION} / 10 - 50")
134+
if (MSVC_VERSION EQUAL 1941)
135+
math(EXPR _VS_VERSION "${MSVC_VERSION} / 10 - 51")
136+
else()
137+
math(EXPR _VS_VERSION "${MSVC_VERSION} / 10 - 50")
138+
endif()
139+
134140
endif()
135141
string(APPEND _PLATFORM_PATH "/v${_VS_VERSION}")
136142

assembly/native/build-macos-portable.sh

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -168,23 +168,23 @@ else
168168
test $? -eq 0 || { echo "Can't compile ton"; exit 1; }
169169
fi
170170

171-
strip storage/storage-daemon/storage-daemon
172-
strip storage/storage-daemon/storage-daemon-cli
173-
strip blockchain-explorer/blockchain-explorer
174-
strip crypto/fift
175-
strip crypto/func
176-
strip crypto/create-state
177-
strip crypto/tlbc
178-
strip validator-engine-console/validator-engine-console
179-
strip tonlib/tonlib-cli
180-
strip http/http-proxy
181-
strip rldp-http-proxy/rldp-http-proxy
182-
strip dht-server/dht-server
183-
strip lite-client/lite-client
184-
strip validator-engine/validator-engine
185-
strip utils/generate-random-id
186-
strip utils/json2tlo
187-
strip adnl/adnl-proxy
171+
strip -s storage/storage-daemon/storage-daemon
172+
strip -s storage/storage-daemon/storage-daemon-cli
173+
strip -s blockchain-explorer/blockchain-explorer
174+
strip -s crypto/fift
175+
strip -s crypto/func
176+
strip -s crypto/create-state
177+
strip -s crypto/tlbc
178+
strip -s validator-engine-console/validator-engine-console
179+
strip -s tonlib/tonlib-cli
180+
strip -s http/http-proxy
181+
strip -s rldp-http-proxy/rldp-http-proxy
182+
strip -s dht-server/dht-server
183+
strip -s lite-client/lite-client
184+
strip -s validator-engine/validator-engine
185+
strip -s utils/generate-random-id
186+
strip -s utils/json2tlo
187+
strip -s adnl/adnl-proxy
188188

189189
cd ..
190190

assembly/native/build-macos-shared.sh

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -97,23 +97,23 @@ else
9797
fi
9898

9999

100-
strip storage/storage-daemon/storage-daemon
101-
strip storage/storage-daemon/storage-daemon-cli
102-
strip blockchain-explorer/blockchain-explorer
103-
strip crypto/fift
104-
strip crypto/func
105-
strip crypto/create-state
106-
strip crypto/tlbc
107-
strip validator-engine-console/validator-engine-console
108-
strip tonlib/tonlib-cli
109-
strip http/http-proxy
110-
strip rldp-http-proxy/rldp-http-proxy
111-
strip dht-server/dht-server
112-
strip lite-client/lite-client
113-
strip validator-engine/validator-engine
114-
strip utils/generate-random-id
115-
strip utils/json2tlo
116-
strip adnl/adnl-proxy
100+
strip -s storage/storage-daemon/storage-daemon
101+
strip -s storage/storage-daemon/storage-daemon-cli
102+
strip -s blockchain-explorer/blockchain-explorer
103+
strip -s crypto/fift
104+
strip -s crypto/func
105+
strip -s crypto/create-state
106+
strip -s crypto/tlbc
107+
strip -s validator-engine-console/validator-engine-console
108+
strip -s tonlib/tonlib-cli
109+
strip -s http/http-proxy
110+
strip -s rldp-http-proxy/rldp-http-proxy
111+
strip -s dht-server/dht-server
112+
strip -s lite-client/lite-client
113+
strip -s validator-engine/validator-engine
114+
strip -s utils/generate-random-id
115+
strip -s utils/json2tlo
116+
strip -s adnl/adnl-proxy
117117

118118
cd ..
119119

assembly/native/build-ubuntu-portable.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ ninja storage-daemon storage-daemon-cli fift func tonlib tonlibjson tonlib-cli \
160160
test $? -eq 0 || { echo "Can't compile ton"; exit 1; }
161161
fi
162162

163-
strip -g storage/storage-daemon/storage-daemon \
163+
strip -s storage/storage-daemon/storage-daemon \
164164
storage/storage-daemon/storage-daemon-cli \
165165
blockchain-explorer/blockchain-explorer \
166166
crypto/fift \

assembly/native/build-ubuntu-shared.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ ninja storage-daemon storage-daemon-cli fift func tonlib tonlibjson tonlib-cli \
6868
test $? -eq 0 || { echo "Can't compile ton"; exit 1; }
6969
fi
7070

71-
strip -g storage/storage-daemon/storage-daemon \
71+
strip -s storage/storage-daemon/storage-daemon \
7272
storage/storage-daemon/storage-daemon-cli \
7373
blockchain-explorer/blockchain-explorer \
7474
crypto/fift \

assembly/native/build-windows-2019.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,6 @@ build\validator-engine\validator-engine.exe ^
216216
build\utils\generate-random-id.exe ^
217217
build\utils\json2tlo.exe ^
218218
build\adnl\adnl-proxy.exe ^
219-
build\emulator\emulator.dll) do (strip -g %%I & copy %%I artifacts\)
219+
build\emulator\emulator.dll) do (strip -s %%I & copy %%I artifacts\)
220220
xcopy /e /k /h /i crypto\smartcont artifacts\smartcont
221221
xcopy /e /k /h /i crypto\fift\lib artifacts\lib

assembly/native/build-windows.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,6 @@ build\validator-engine\validator-engine.exe ^
217217
build\utils\generate-random-id.exe ^
218218
build\utils\json2tlo.exe ^
219219
build\adnl\adnl-proxy.exe ^
220-
build\emulator\emulator.dll) do (strip -g %%I & copy %%I artifacts\)
220+
build\emulator\emulator.dll) do (strip -s %%I & copy %%I artifacts\)
221221
xcopy /e /k /h /i crypto\smartcont artifacts\smartcont
222222
xcopy /e /k /h /i crypto\fift\lib artifacts\lib

assembly/nix/build-linux-arm64-nix.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,22 @@ cp ./result/lib/libemulator.so artifacts/
3636
cp ./result/lib/fift/* artifacts/lib/
3737
cp -r ./result/share/ton/smartcont artifacts/
3838
chmod -R +x artifacts
39+
cd artifacts
40+
sudo strip -s storage-daemon \
41+
storage-daemon-cli \
42+
blockchain-explorer \
43+
fift \
44+
tlbc \
45+
func \
46+
create-state \
47+
validator-engine-console \
48+
tonlib-cli \
49+
http-proxy \
50+
rldp-http-proxy \
51+
dht-server \
52+
lite-client \
53+
validator-engine \
54+
generate-random-id \
55+
adnl-proxy \
56+
libemulator.so \
57+
libtonlibjson.so

0 commit comments

Comments
 (0)