Skip to content

Commit 775d671

Browse files
authored
Merge pull request #293 from AntelopeIO/antelope-spring-dev.deb
[4.1 -> main] use `antelope-spring-dev.deb` instead of `spring-dev.deb`; fix finality test
2 parents 9ecdca0 + c250347 commit 775d671

File tree

4 files changed

+32
-31
lines changed

4 files changed

+32
-31
lines changed

.cicd/defaults.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"spring-dev":{
2+
"antelope-spring-dev":{
33
"target":"main",
44
"prerelease":false
55
}

.github/workflows/build.yaml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ on:
88
pull_request:
99
workflow_dispatch:
1010
inputs:
11-
override-spring-dev:
12-
description: Override spring-dev target
11+
override-antelope-spring-dev:
12+
description: Override antelope-spring-dev target
1313
type: string
14-
override-spring-dev-prerelease:
14+
override-antelope-spring-dev-prerelease:
1515
type: choice
16-
description: Override spring-dev prelease
16+
description: Override antelope-spring-dev prelease
1717
options:
1818
- default
1919
- true
@@ -69,23 +69,23 @@ jobs:
6969
name: Determine Versions
7070
runs-on: ubuntu-latest
7171
outputs:
72-
spring-dev-target: ${{steps.versions.outputs.spring-dev-target}}
73-
spring-dev-prerelease: ${{steps.versions.outputs.spring-dev-prerelease}}
72+
antelope-spring-dev-target: ${{steps.versions.outputs.antelope-spring-dev-target}}
73+
antelope-spring-dev-prerelease: ${{steps.versions.outputs.antelope-spring-dev-prerelease}}
7474
steps:
7575
- name: Setup versions from input or defaults
7676
id: versions
7777
env:
7878
GH_TOKEN: ${{github.token}}
7979
run: |
8080
DEFAULTS_JSON=$(curl -sSfL $(gh api https://api.github.com/repos/${{github.repository}}/contents/.cicd/defaults.json?ref=${{github.sha}} --jq .download_url))
81-
echo spring-dev-target=$(echo "$DEFAULTS_JSON" | jq -r '."spring-dev".target') >> $GITHUB_OUTPUT
82-
echo spring-dev-prerelease=$(echo "$DEFAULTS_JSON" | jq -r '."spring-dev".prerelease') >> $GITHUB_OUTPUT
81+
echo antelope-spring-dev-target=$(echo "$DEFAULTS_JSON" | jq -r '."antelope-spring-dev".target') >> $GITHUB_OUTPUT
82+
echo antelope-spring-dev-prerelease=$(echo "$DEFAULTS_JSON" | jq -r '."antelope-spring-dev".prerelease') >> $GITHUB_OUTPUT
8383
84-
if [[ "${{inputs.override-spring-dev}}" != "" ]]; then
85-
echo spring-dev-target=${{inputs.override-spring-dev}} >> $GITHUB_OUTPUT
84+
if [[ "${{inputs.override-antelope-spring-dev}}" != "" ]]; then
85+
echo antelope-spring-dev-target=${{inputs.override-antelope-spring-dev}} >> $GITHUB_OUTPUT
8686
fi
87-
if [[ "${{inputs.override-spring-dev-prerelease}}" == +(true|false) ]]; then
88-
echo spring-dev-prerelease=${{inputs.override-spring-dev-prerelease}} >> $GITHUB_OUTPUT
87+
if [[ "${{inputs.override-antelope-spring-dev-prerelease}}" == +(true|false) ]]; then
88+
echo antelope-spring-dev-prerelease=${{inputs.override-antelope-spring-dev-prerelease}} >> $GITHUB_OUTPUT
8989
fi
9090
9191
Build:
@@ -102,23 +102,23 @@ jobs:
102102
- uses: actions/checkout@v3
103103
with:
104104
submodules: recursive
105-
- name: Download spring-dev.deb (Ubuntu 22 only)
105+
- name: Download antelope-spring-dev.deb (Ubuntu 22 only)
106106
if: matrix.platform == 'ubuntu22'
107107
uses: AntelopeIO/asset-artifact-download-action@v3
108108
with:
109109
owner: AntelopeIO
110110
repo: spring
111-
file: 'spring-dev.*ubuntu22\.04_amd64.deb'
112-
target: '${{needs.versions.outputs.spring-dev-target}}'
113-
prereleases: ${{fromJSON(needs.versions.outputs.spring-dev-prerelease)}}
114-
artifact-name: spring-dev-ubuntu22-amd64
115-
container-package: experimental-binaries
116-
- name: Install spring-dev.deb (Ubuntu 22 only)
111+
file: 'antelope-spring-dev.*ubuntu22\.04_amd64.deb'
112+
target: '${{needs.versions.outputs.antelope-spring-dev-target}}'
113+
prereleases: ${{fromJSON(needs.versions.outputs.antelope-spring-dev-prerelease)}}
114+
artifact-name: antelope-spring-dev-ubuntu22-amd64
115+
container-package: antelope-spring-experimental-binaries
116+
- name: Install antelope-spring-dev.deb (Ubuntu 22 only)
117117
if: matrix.platform == 'ubuntu22'
118118
run: |
119119
apt-get update && apt-get upgrade -y
120-
apt install -y ./spring-dev*.deb
121-
rm ./spring-dev*.deb
120+
apt install -y ./antelope-spring-dev*.deb
121+
rm ./antelope-spring-dev*.deb
122122
- name: Build & Test
123123
run: |
124124
mkdir build

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ sudo apt remove cdt
2828

2929
## Building from source
3030

31-
Recent Ubuntu LTS releases are the only Linux distributions that we fully support. Other Linux distros and other POSIX operating systems (such as macOS) are tended to on a best-effort basis and may not be full featured.
31+
Recent Ubuntu LTS releases are the only Linux distributions that we fully support. Other Linux distros and other POSIX operating systems (such as macOS) are tended to on a best-effort basis and may not be full featured.
3232

33-
The instructions below assume that you are building on Ubuntu 20.04.
33+
The instructions below assume that you are building on Ubuntu 20.04.
3434

3535
### Install dependencies
3636

@@ -136,7 +136,7 @@ Installing CDT globally on your system will install the following tools in a loc
136136
* cdt-strip
137137
* eosio-pp
138138
* eosio-wasm2wast
139-
* eosio-wast2wasm
139+
* eosio-wast2wasm
140140

141141
It will also install CMake files for CDT accessible within a `cmake/cdt` directory located within your system's `lib` directory.
142142
#### Manual installation

tests/integration/instant_finality_tests.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,13 @@ BOOST_FIXTURE_TEST_CASE(instant_finality_test, tester) try {
3434
abi_serializer::to_variant( *cur_block, pretty_output, get_resolver(), fc::microseconds::maximum() );
3535
std::cout << fc::json::to_string(pretty_output, fc::time_point::now() + abi_serializer_max_time) << std::endl;
3636
BOOST_REQUIRE(pretty_output.get_object().contains("instant_finality_extension"));
37-
BOOST_REQUIRE_EQUAL(pretty_output["instant_finality_extension"]["new_finalizer_policy"]["generation"], 1);
38-
BOOST_REQUIRE_EQUAL(pretty_output["instant_finality_extension"]["new_finalizer_policy"]["threshold"], 1);
39-
BOOST_REQUIRE_EQUAL(pretty_output["instant_finality_extension"]["new_finalizer_policy"]["finalizers"].size(), 1u);
40-
BOOST_REQUIRE_EQUAL(pretty_output["instant_finality_extension"]["new_finalizer_policy"]["finalizers"][size_t(0)]["description"], "test_desc");
41-
BOOST_REQUIRE_EQUAL(pretty_output["instant_finality_extension"]["new_finalizer_policy"]["finalizers"][size_t(0)]["weight"], 1);
42-
BOOST_REQUIRE_EQUAL(pretty_output["instant_finality_extension"]["new_finalizer_policy"]["finalizers"][size_t(0)]["public_key"], "PUB_BLS_dEvut0ydHevDGP6Ef3O4Iq6QXf9jUcMUT1nCJRX-JRYlFYrO_qKt_x439vUJ2DkZ32Od6AdJZ-S9dWRE9Sy-7Q6bNjpoIOP0cWzkKC1DqmhfE3paW-KThA3noLkV8SsILcfxpQ");
37+
38+
std::string output_json = fc::json::to_pretty_string(pretty_output);
39+
BOOST_TEST(output_json.find("\"generation\": 2") != std::string::npos);
40+
BOOST_TEST(output_json.find("\"threshold\": 1") != std::string::npos);
41+
BOOST_TEST(output_json.find("\"description\": \"test_desc\"") != std::string::npos);
42+
BOOST_TEST(output_json.find("\"weight\": 1") != std::string::npos);
43+
BOOST_TEST(output_json.find("PUB_BLS_dEvut0ydHevDGP6Ef3O4Iq6QXf9jUcMUT1nCJRX-JRYlFYrO_qKt_x439vUJ2DkZ32Od6AdJZ-S9dWRE9Sy-7Q6bNjpoIOP0cWzkKC1DqmhfE3paW-KThA3noLkV8SsILcfxpQ") != std::string::npos);
4344

4445
// testing wrong public key size
4546
BOOST_CHECK_THROW(push_action(config::system_account_name, "setfinalizer"_n, "test"_n, mvo()

0 commit comments

Comments
 (0)