Skip to content

Commit

Permalink
add test-emulator (#1048)
Browse files Browse the repository at this point in the history
* add github action for macOS 14 (arm64, M1)

* add github action (portable) for macOS 14 (arm64, M1)

* rename macOS arm64 output artifact

* Update libsodium on windows

* Compile libsodium

* Update build-windows.bat

* use upgraded libsodium 1.0.20; use compiled static libsodium for Windows instead of precompiled;

* revert libsodium 1.0.20; use compiled static libsodium for Windows instead of precompiled;

* use upgraded libsodium 1.0.20; use compiled static libsodium for Windows instead of precompiled;

* fix libsodium version 1.0.19; use compiled static libsodium for Windows instead of precompiled;

* try 1.0.20 libsodium precompiled on github

* try 1.0.18 libsodium precompiled on github

* try windows build on win server 2019

* and use PlatformToolset=v142

* use cmake -G "Visual Studio 16 2019"

* fix path to msvc 2019 on github

* separate github windows build on win server 2019 and build on win server 2022

* Update assembly/native/build-windows-2019.bat

add retry mechanism

Co-authored-by: Dr. Awesome Doge <doge@ton.org>

* add test-emulator; disable test groovy pipeline

* trigger all gh actions

* fix win build

* call test-emulator

* fix test-emulator

---------

Co-authored-by: neodiX <neodix42@ton.org>
Co-authored-by: Dr. Awesome Doge <doge@ton.org>
Co-authored-by: ms <dungeon666master@protonmail.com>
  • Loading branch information
4 people authored Jul 10, 2024
1 parent 2792fc2 commit 5380e6f
Show file tree
Hide file tree
Showing 9 changed files with 164 additions and 19 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,7 @@ add_test(test-cells test-cells ${TEST_OPTIONS})
add_test(test-smartcont test-smartcont)
add_test(test-net test-net)
add_test(test-actors test-tdactor)
add_test(test-emulator test-emulator)

#BEGIN tonlib
add_test(test-tdutils test-tdutils)
Expand Down
21 changes: 11 additions & 10 deletions assembly/cicd/jenkins/test-builds.groovy
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
pipeline {

agent none
stages {
stage('Run Builds') {
Expand All @@ -12,7 +13,7 @@ pipeline {
sh '''
cp assembly/native/build-ubuntu-shared.sh .
chmod +x build-ubuntu-shared.sh
./build-ubuntu-shared.sh -t -a
./build-ubuntu-shared.sh -a
'''
sh '''
cd artifacts
Expand All @@ -31,7 +32,7 @@ pipeline {
sh '''
cp assembly/nix/build-linux-x86-64-nix.sh .
chmod +x build-linux-x86-64-nix.sh
./build-linux-x86-64-nix.sh -t
./build-linux-x86-64-nix.sh
'''
sh '''
cd artifacts
Expand All @@ -50,7 +51,7 @@ pipeline {
sh '''
cp assembly/native/build-ubuntu-shared.sh .
chmod +x build-ubuntu-shared.sh
./build-ubuntu-shared.sh -t -a
./build-ubuntu-shared.sh -a
'''
sh '''
cd artifacts
Expand All @@ -69,7 +70,7 @@ pipeline {
sh '''
cp assembly/nix/build-linux-arm64-nix.sh .
chmod +x build-linux-arm64-nix.sh
./build-linux-arm64-nix.sh -t
./build-linux-arm64-nix.sh
'''
sh '''
cd artifacts
Expand All @@ -88,7 +89,7 @@ pipeline {
sh '''
cp assembly/native/build-macos-shared.sh .
chmod +x build-macos-shared.sh
./build-macos-shared.sh -t -a
./build-macos-shared.sh -a
'''
sh '''
cd artifacts
Expand All @@ -107,7 +108,7 @@ pipeline {
sh '''
cp assembly/nix/build-macos-nix.sh .
chmod +x build-macos-nix.sh
./build-macos-nix.sh -t
./build-macos-nix.sh
'''
sh '''
cd artifacts
Expand All @@ -126,7 +127,7 @@ pipeline {
sh '''
cp assembly/native/build-macos-shared.sh .
chmod +x build-macos-shared.sh
./build-macos-shared.sh -t -a
./build-macos-shared.sh -a
'''
sh '''
cd artifacts
Expand All @@ -145,7 +146,7 @@ pipeline {
sh '''
cp assembly/nix/build-macos-nix.sh .
chmod +x build-macos-nix.sh
./build-macos-nix.sh -t
./build-macos-nix.sh
'''
sh '''
cd artifacts
Expand All @@ -164,7 +165,7 @@ pipeline {
sh '''
cp assembly/native/build-macos-shared.sh .
chmod +x build-macos-shared.sh
./build-macos-shared.sh -t -a
./build-macos-shared.sh -a
'''
sh '''
cd artifacts
Expand All @@ -182,7 +183,7 @@ pipeline {
timeout(time: 180, unit: 'MINUTES') {
bat '''
copy assembly\\native\\build-windows.bat .
build-windows.bat -t
build-windows.bat
'''
bat '''
cd artifacts
Expand Down
2 changes: 1 addition & 1 deletion assembly/native/build-macos-portable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ if [ "$with_tests" = true ]; then
http-proxy rldp-http-proxy adnl-proxy create-state create-hardfork tlbc emulator \
test-ed25519 test-ed25519-crypto test-bigint test-vm test-fift test-cells test-smartcont \
test-net test-tdactor test-tdutils test-tonlib-offline test-adnl test-dht test-rldp \
test-rldp2 test-catchain test-fec test-tddb test-db test-validator-session-state
test-rldp2 test-catchain test-fec test-tddb test-db test-validator-session-state test-emulator
test $? -eq 0 || { echo "Can't compile ton"; exit 1; }
else
ninja storage-daemon storage-daemon-cli blockchain-explorer \
Expand Down
2 changes: 1 addition & 1 deletion assembly/native/build-macos-shared.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ if [ "$with_tests" = true ]; then
http-proxy rldp-http-proxy adnl-proxy create-state create-hardfork tlbc emulator \
test-ed25519 test-ed25519-crypto test-bigint test-vm test-fift test-cells test-smartcont \
test-net test-tdactor test-tdutils test-tonlib-offline test-adnl test-dht test-rldp \
test-rldp2 test-catchain test-fec test-tddb test-db test-validator-session-state
test-rldp2 test-catchain test-fec test-tddb test-db test-validator-session-state test-emulator
test $? -eq 0 || { echo "Can't compile ton"; exit 1; }
else
ninja storage-daemon storage-daemon-cli blockchain-explorer \
Expand Down
2 changes: 1 addition & 1 deletion assembly/native/build-ubuntu-portable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ ninja storage-daemon storage-daemon-cli fift func tonlib tonlibjson tonlib-cli \
adnl-proxy create-state emulator test-ed25519 test-ed25519-crypto test-bigint \
test-vm test-fift test-cells test-smartcont test-net test-tdactor test-tdutils \
test-tonlib-offline test-adnl test-dht test-rldp test-rldp2 test-catchain \
test-fec test-tddb test-db test-validator-session-state
test-fec test-tddb test-db test-validator-session-state test-emulator
test $? -eq 0 || { echo "Can't compile ton"; exit 1; }
else
ninja storage-daemon storage-daemon-cli fift func tonlib tonlibjson tonlib-cli \
Expand Down
2 changes: 1 addition & 1 deletion assembly/native/build-ubuntu-shared.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ ninja storage-daemon storage-daemon-cli fift func tonlib tonlibjson tonlib-cli \
adnl-proxy create-state emulator test-ed25519 test-ed25519-crypto test-bigint \
test-vm test-fift test-cells test-smartcont test-net test-tdactor test-tdutils \
test-tonlib-offline test-adnl test-dht test-rldp test-rldp2 test-catchain \
test-fec test-tddb test-db test-validator-session-state
test-fec test-tddb test-db test-validator-session-state test-emulator
test $? -eq 0 || { echo "Can't compile ton"; exit 1; }
else
ninja storage-daemon storage-daemon-cli fift func tonlib tonlibjson tonlib-cli \
Expand Down
2 changes: 1 addition & 1 deletion assembly/native/build-windows-2019.bat
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ tonlib-cli validator-engine lite-client pow-miner validator-engine-console gener
json2tlo dht-server http-proxy rldp-http-proxy adnl-proxy create-state create-hardfork emulator ^
test-ed25519 test-ed25519-crypto test-bigint test-vm test-fift test-cells test-smartcont test-net ^
test-tdactor test-tdutils test-tonlib-offline test-adnl test-dht test-rldp test-rldp2 test-catchain ^
test-fec test-tddb test-db test-validator-session-state
test-fec test-tddb test-db test-validator-session-state test-emulator
IF %errorlevel% NEQ 0 (
echo Can't compile TON
exit /b %errorlevel%
Expand Down
2 changes: 1 addition & 1 deletion assembly/native/build-windows.bat
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ tonlib-cli validator-engine lite-client pow-miner validator-engine-console gener
json2tlo dht-server http-proxy rldp-http-proxy adnl-proxy create-state create-hardfork emulator ^
test-ed25519 test-ed25519-crypto test-bigint test-vm test-fift test-cells test-smartcont test-net ^
test-tdactor test-tdutils test-tonlib-offline test-adnl test-dht test-rldp test-rldp2 test-catchain ^
test-fec test-tddb test-db test-validator-session-state
test-fec test-tddb test-db test-validator-session-state test-emulator
IF %errorlevel% NEQ 0 (
echo Can't compile TON
exit /b %errorlevel%
Expand Down
149 changes: 146 additions & 3 deletions emulator/test/emulator-tests.cpp

Large diffs are not rendered by default.

0 comments on commit 5380e6f

Please sign in to comment.