Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop to v4.0 #2086

Merged
merged 28 commits into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
175cd68
#2031 run all tests nightly for open prs
olehnikolaiev Jan 15, 2025
94d9b12
#2031 run nightly tests for open prs
olehnikolaiev Jan 15, 2025
f291087
#2031 update nightly job
olehnikolaiev Jan 16, 2025
a12b847
Merge pull request #2078 from skalenetwork/feature/2031-run-all-tests…
DmytroNazarenko Jan 16, 2025
4edc50c
remove parallel options for liblzma
olehnikolaiev Jan 17, 2025
4fe3e2f
fix --all tests
olehnikolaiev Jan 20, 2025
fa9f469
disable old test
olehnikolaiev Jan 21, 2025
620f392
disable old test
olehnikolaiev Jan 22, 2025
c474423
fix unstable test
olehnikolaiev Jan 23, 2025
77c9caf
fix build deps
olehnikolaiev Jan 23, 2025
1dd8738
rollback patch timeout
olehnikolaiev Jan 23, 2025
df4852c
cleanup deps build
olehnikolaiev Jan 24, 2025
bbf78b3
cleanup build
olehnikolaiev Jan 24, 2025
8ecc918
cleanup build
olehnikolaiev Jan 24, 2025
ac6bae8
cleanup build
olehnikolaiev Jan 24, 2025
2e77abd
debug
olehnikolaiev Jan 24, 2025
cd42b13
use correct openssl
olehnikolaiev Jan 24, 2025
c82235e
trigger build
olehnikolaiev Jan 25, 2025
a9c2f41
Merge branch 'fix-testeth-all' of github.com:skalenetwork/skaled into…
olehnikolaiev Jan 25, 2025
a2ed279
trigger build
olehnikolaiev Jan 25, 2025
ccba238
trigger build
olehnikolaiev Jan 25, 2025
6f9e954
cleanup
olehnikolaiev Jan 25, 2025
97c2276
Merge pull request #2082 from skalenetwork/fix-testeth-all
olehnikolaiev Jan 28, 2025
30b50f3
Merge branch 'develop' into fix-build-deps
olehnikolaiev Jan 28, 2025
ec2a775
Merge pull request #2083 from skalenetwork/fix-build-deps
DmytroNazarenko Jan 28, 2025
9437e3c
Merge branch 'v4.0.0' into develop-to-v4.0
DmytroNazarenko Jan 28, 2025
8333c5c
Merge branch 'v4.0.0' into develop-to-v4.0
olehnikolaiev Jan 30, 2025
934a181
Merge branch 'v4.0.0' into develop-to-v4.0
olehnikolaiev Feb 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Run nightly tests

on:
schedule:
- cron: '0 0 * * *'

workflow_dispatch:

defaults:
run:
shell: bash
jobs:
identify-prs:
runs-on: ubuntu-latest
outputs:
pr-data: ${{ steps.get-prs.outputs.pr-data }}
steps:
- name: Identify Open Non-Draft PRs with Recent Commits
id: get-prs
uses: actions/github-script@v6
with:
script: |
const oneDayAgo = new Date();
oneDayAgo.setDate(oneDayAgo.getDate() - 1);

const prs = await github.rest.pulls.list({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open',
});

const filteredPRs = [];
for (const pr of prs.data) {
if (pr.draft) continue;

const commits = await github.rest.pulls.listCommits({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: pr.number,
});

const recentCommits = commits.data.filter(commit => {
const commitDate = new Date(commit.commit.author.date);
return commitDate >= oneDayAgo;
});

if (recentCommits.length > 0) {
filteredPRs.push({ branch: pr.head.ref, sha: pr.head.sha, number: pr.number });
}
}

console.log("Filtered PRs:", filteredPRs);
core.setOutput('pr-data', JSON.stringify(filteredPRs));

run-all-tests:
needs: [identify-prs]
if: ${{ needs.identify-prs.outputs.pr-data != '[]' && needs.identify-prs.outputs.pr-data != '' }}
strategy:
matrix:
pr: ${{fromJson(needs.identify-prs.outputs.pr-data)}}
uses: ./.github/workflows/test-all.yml
with:
branch_name: ${{ matrix.pr.branch }}
sha: ${{ matrix.pr.sha }}
secrets:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
276 changes: 276 additions & 0 deletions .github/workflows/test-all.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,276 @@
name: Build skaled and run all tests
on:
workflow_call:
inputs:
branch_name:
type: string
description: 'Branch name'
required: true
sha:
type: string
description: 'SHA'
required: true
secrets:
DOCKER_USERNAME:
required: true
DOCKER_PASSWORD:
required: true
defaults:
run:
shell: bash
jobs:
testAll:
runs-on: self-hosted
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
NO_ULIMIT_CHECK: 1
ccache_compress: 'true'
ccache_compresslevel: 9
steps:
- name: Extract repo name
run: echo ::set-env name=REPOSITORY_NAME::$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}')
shell: bash
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
- name: checkout
uses: actions/checkout@v2
with:
ref: ${{ inputs.branch_name }}
- name: Cache apt packages
uses: actions/cache@v2
with:
path: |
/var/cache/apt/archives
key: ${{ runner.os }}-apt-cache
ttl: 1000000 # purge cache every 1000000 seconds (10 days). This is to pull updated packages
- name: update apt
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test || true
sudo apt-get update || true
- name: install packages
run: |
sudo apt-get -y remove libzmq* || true
sudo apt-get -y install software-properties-common gcc-11 g++-11 || true
- name: Use g++-11 and gcov-11 by default
run: |
echo "Updating all needed alternatives"
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 11
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 11
sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-11 11
sudo update-alternatives --install /usr/bin/gcov-dump gcov-dump /usr/bin/gcov-dump-11 11
sudo update-alternatives --install /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-tool-11 11
echo "Checking alternative for gcc"
which gcc
gcc --version
echo "Checking alternative for g++"
which g++
g++ --version
echo "Checking alternative for gcov"
which gcov
gcov --version
echo "Checking alternative for gcov-dump"
which gcov-dump
gcov-dump --version
echo "Checking alternative for gcov-tool"
which gcov-tool
gcov-tool --version

- name: Get newest lcov
run: |
# sudo apt-get install libcapture-tiny-perl
echo "Removing previous lcov version..."
sudo apt-get remove lcov || true
echo "Installing newest lcov version..."
rm -rf newer_lcov || true
mkdir newer_lcov
cd newer_lcov
git clone https://github.com/linux-test-project/lcov --recursive --recurse-submodules
cd lcov
git checkout 92e2121
sudo make install
cd ..
cd ..
echo "Checking installed lcov version..."
which lcov
lcov --version

- name: Submodule update
run: |
rm -rf ./libconsensus || true
ls -1
git submodule update --init --recursive

- name: Prepare ccache timestamp
id: ccache_cache_timestamp
shell: cmake -P {0}
run: |
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
message("::set-output name=timestamp::${current_date}")
- name: Ccache cache files
uses: actions/cache@v1.1.0
with:
path: .ccache
key: ${ { matrix.config.name } }-ccache-${ { steps.ccache_cache_timestamp.outputs.timestamp } }
restore-keys: |
${ { matrix.config.name } }-ccache-
- name: Update gcc-11
run: |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 11
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 11
- name: Configure ccache cache size, zero ccache counters and print ccache stats before start
run: |
ccache --max-size=15G
ccache -z
ccache --show-stats
- name: Build dependencies
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
export CC=gcc-11
export CXX=g++-11
export TARGET=all
export CMAKE_BUILD_TYPE=Debug
cd deps
#######################################./clean.sh
rm -f ./libwebsockets-from-git.tar.gz
./build.sh DEBUG=1 PARALLEL_COUNT=$(nproc)
cd ..

- name: Configure all
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
export CC=gcc-11
export CXX=g++-11
export TARGET=all
export CMAKE_BUILD_TYPE=Debug
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE ..
cd ..
- name: Print ccache stats for deps
run: |
ccache --show-stats
- name: Build all
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
export CC=gcc-11
export CXX=g++-11
export TARGET=all
export CMAKE_BUILD_TYPE=Debug
cd build
make testeth -j$(nproc)
cd ..
- name: Print ccache stats after full build
run : |
ccache --show-stats
- name: Testeth all verbosity 4
id: TestCore
run : |
cd build/test
export NO_NTP_CHECK=1
export NO_ULIMIT_CHECK=1
function run_test() { ./testeth --report_level=detailed -t "$1" -- --all --verbosity 4; }
run_test boostTests
run_test CommonJSTests
run_test FixedHashTests
run_test RangeMaskTest
run_test Crypto
run_test LibSnark
run_test commonjs
run_test KeyManagerTests
run_test TransitionTests
run_test TransactionTests
run_test VMTests
run_test LevelDBTests
run_test CoreLibTests
run_test RlpTests
run_test SharedSpaceTests
run_test EthashTests
run_test SealEngineTests
run_test DifficultyTests
run_test BlockSuite
run_test BlockChainMainNetworkSuite
run_test BlockChainFrontierSuite
run_test BlockQueueSuite
run_test ClientBase
run_test EstimateGas
run_test getHistoricNodesData
run_test ExtVmSuite
run_test GasPricer
run_test BasicTests
run_test InstanceMonitorSuite
run_test PrecompiledTests
run_test SkaleHostSuite
run_test StateUnitTests
run_test libethereum
run_test TransactionQueueSuite
run_test LegacyVMSuite
run_test SkaleInterpreterSuite
run_test SnapshotSigningTestSuite
run_test SkUtils
run_test BCGeneralStateTests
run_test BlockchainTests
run_test BlockChainTestSuite
run_test GeneralStateTests
run_test TestHelperSuite
run_test LevelDBHashBase
run_test memDB
run_test OverlayDBTests
run_test AccountHolderTest
run_test ClientTests
run_test JsonRpcSuite
run_test SingleConsensusTests
run_test ConsensusTests
sudo NO_ULIMIT_CHECK=1 NO_NTP_CHECK=1 ./testeth -t BtrfsTestSuite -- --all --verbosity 4
sudo NO_ULIMIT_CHECK=1 NO_NTP_CHECK=1 ./testeth -t HashSnapshotTestSuite -- --all --verbosity 4
sudo NO_ULIMIT_CHECK=1 NO_NTP_CHECK=1 ./testeth -t ClientSnapshotsSuite -- --all --verbosity 4
cd ..
continue-on-error: true

- name: Configure all as historic
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
export CC=gcc-11
export CXX=g++-11
export TARGET=all
export CMAKE_BUILD_TYPE=Debug
mkdir -p build_historic
cd build_historic
cmake -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DHISTORIC_STATE=1 ..
cd ..
- name: Build all historic
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
export CC=gcc-11
export CXX=g++-11
export TARGET=all
export CMAKE_BUILD_TYPE=Debug
cd build_historic
make testeth -j$(nproc)
cd ..
- name: Print ccache stats after full historic build
run : |
ccache --show-stats
- name: Testeth historic
id: TestHistoric
run : |
cd build_historic/test
export NO_NTP_CHECK=1
export NO_ULIMIT_CHECK=1
./testeth -t JsonRpcSuite -- --all --verbosity 4
continue-on-error: true
- name: Update PR Status
uses: actions/github-script@v6
with:
script: |
const state = '${{ steps.testCore.outcome }}' === 'success' ? ('${{ steps.testHistoric.outcome }}' === 'success' ? 'success' : 'failure') : 'failure';
await github.rest.repos.createCommitStatus({
owner: context.repo.owner,
repo: context.repo.repo,
sha: '${{ inputs.sha }}',
state,
context: 'Nightly tests',
description: state === 'success' ? 'Nightly tests passed' : 'Nightly tests failed',
target_url: `https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}`
});
Loading
Loading