Skip to content

Commit

Permalink
Merge branch 'v3.16.1' into 1477-reenable-unit-tests-in-skaled
Browse files Browse the repository at this point in the history
  • Loading branch information
olehnikolaiev authored Mar 24, 2023
2 parents 897c57a + c00c0c6 commit 772804e
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 23 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
pull_request:
types: [closed]
branches:
- 'v*.*.*'
- master
- develop
- beta
Expand Down Expand Up @@ -120,7 +121,6 @@ jobs:
strip skaled/skaled
cd ..
- name: Configure historic state build
if: contains(github.ref, 'develop') || contains(github.ref, 'beta') || contains(github.ref, 'master') || contains(github.ref, 'stable')
run: |
export CC=gcc-9
export CXX=g++-9
Expand All @@ -133,7 +133,6 @@ jobs:
cmake -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DHISTORIC_STATE=1 ..
cd ..
- name: Build historic state version
if: contains(github.ref, 'develop') || contains(github.ref, 'beta') || contains(github.ref, 'master') || contains(github.ref, 'stable')
run: |
export CC=gcc-9
export CXX=g++-9
Expand All @@ -146,7 +145,6 @@ jobs:
strip skaled/skaled
cd ..
- name: Build and publish container
if: contains(github.ref, 'develop') || contains(github.ref, 'beta') || contains(github.ref, 'master') || contains(github.ref, 'stable')
run: |
cp build/skaled/skaled scripts/skale_build/executable/
export BRANCH=${GITHUB_REF##*/}
Expand All @@ -155,22 +153,22 @@ jobs:
export VERSION=$(bash ./scripts/calculate_version.sh $BRANCH $VERSION)
echo "::set-env name=VERSION::$VERSION"
echo "Version $VERSION"
( test $BRANCH = "stable" && export PRERELEASE=false ) || export PRERELEASE=true
echo "PRERELEASE=$PRERELEASE" >> $GITHUB_ENV
export RELEASE=true
echo "::set-env name=RELEASE::$RELEASE"
bash ./scripts/build_and_publish.sh
- name: Create Release
if: contains(github.ref, 'develop') || contains(github.ref, 'beta') || contains(github.ref, 'master') || contains(github.ref, 'stable')
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.VERSION }}
release_name: ${{ env.VERSION }}
draft: false
prerelease: true
prerelease: ${{ env.PRERELEASE }}
- name: Upload skaled binary to Release
if: contains(github.ref, 'develop') || contains(github.ref, 'beta') || contains(github.ref, 'master') || contains(github.ref, 'stable')
uses: actions/upload-release-asset@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -180,7 +178,6 @@ jobs:
asset_name: skaled
asset_content_type: application/octet-stream
- name: Build and publish historic-state container
if: contains(github.ref, 'develop') || contains(github.ref, 'beta') || contains(github.ref, 'master') || contains(github.ref, 'stable')
run: |
cp build-historic/skaled/skaled scripts/skale_build/executable/
export BRANCH=${GITHUB_REF##*/}
Expand All @@ -192,7 +189,6 @@ jobs:
echo "::set-env name=RELEASE::$RELEASE"
bash ./scripts/build_and_publish.sh
- name: Upload historic-state skaled binary to Release
if: contains(github.ref, 'develop') || contains(github.ref, 'beta') || contains(github.ref, 'master') || contains(github.ref, 'stable')
uses: actions/upload-release-asset@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Historically skaled started by forking [Aleth](https://github.com/ethereum/aleth

### OS requirements

Skaled builds and runs on Ubuntu 16.04 and 18.04
Skaled builds and runs on Ubuntu 20.04 and 22.04

### Clone repository

Expand All @@ -59,12 +59,12 @@ If you have already cloned the repo and forgot to pass `--recurse-submodules`, e
```
sudo apt update
sudo apt install autoconf build-essential cmake libprocps-dev libtool texinfo wget yasm flex bison btrfs-progs
sudo apt install make build-essential cmake pkg-config libgnutls28-dev libssl-dev unzip zlib1g-dev libgcrypt20-dev docker.io gprof gcc-9 g++-9
sudo apt install make build-essential cmake pkg-config libgnutls28-dev libssl-dev unzip zlib1g-dev libgcrypt20-dev docker.io gcc-9 g++-9 gperf
```

NB cmake needs to be of version >=3.31, git of version >=2.18

### Set gcc-9 as default compiler
### (for Ubuntu 20.10 or later) Set gcc-9 as default compiler
```
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 9
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 9
Expand Down Expand Up @@ -92,6 +92,7 @@ cd deps
## Hunter fix

```
mkdir -p ~/.hunter/_Base/Download/crc32c/1.0.5/dc7fa8c/
cd ~/.hunter/_Base/Download/crc32c/1.0.5/dc7fa8c/
wget https://github.com/hunter-packages/crc32c/archive/refs/tags/hunter-1.0.5.tar.gz
```
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.16.0
3.16.1
10 changes: 2 additions & 8 deletions scripts/calculate_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,16 @@ fi

git fetch --tags

if [ $BRANCH = "master" ]
if [ $BRANCH = "stable" ]
then
echo $VERSION
exit 0
fi

LABEL="develop"
if [ $BRANCH = "stable" ]
then
LABEL="stable"
elif [ $BRANCH = "beta" ]
if [ $BRANCH = "beta" ]
then
LABEL="beta"
elif [ $BRANCH = "syncnode_develop" ]
then
LABEL="sync"
fi

for (( VERSION_NUMBER=0; ; VERSION_NUMBER++ ))
Expand Down
3 changes: 2 additions & 1 deletion scripts/skale_build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM ubuntu:18.04
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get -q update && \
apt-get -qy install \
Expand Down
9 changes: 8 additions & 1 deletion test/unittests/libweb3jsonrpc/jsonrpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2902,7 +2902,14 @@ BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_SUITE( FilestorageCacheSuite )

BOOST_AUTO_TEST_CASE( cached_filestorage ) {
RestrictedAddressFixture fixture( c_genesisConfigString );

auto _config = c_genesisConfigString;
Json::Value ret;
Json::Reader().parse( _config, ret );
ret["skaleConfig"]["sChain"]["revertableFSPatchTimestamp"] = 1;
Json::FastWriter fastWriter;
std::string config = fastWriter.write( ret );
RestrictedAddressFixture fixture( config );

auto senderAddress = fixture.coinbase.address();
fixture.client->setAuthor( senderAddress );
Expand Down

0 comments on commit 772804e

Please sign in to comment.