From c3a0484ade846897972819fa1119dd21b59eb546 Mon Sep 17 00:00:00 2001 From: Matias Romeo Date: Tue, 13 Aug 2024 21:52:47 -0300 Subject: [PATCH 1/2] Bump 0.2.0 version --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index c779481..cac6eb7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,6 +8,8 @@ endif() set(EXTERNAL_DIR ${CMAKE_SOURCE_DIR}/external) set(SOLIDITY_BYTECODES_DIR ${CMAKE_BINARY_DIR}/solidity_contracts/bytecodes) +add_compile_definitions(PROJECT_VERSION="0.2.0") + add_subdirectory (solidity_contracts) enable_testing() From 0d7c963f59b9bce09f6e7bb4b21ae16e47182dcb Mon Sep 17 00:00:00 2001 From: kayan Date: Wed, 14 Aug 2024 16:38:12 +0800 Subject: [PATCH 2/2] use spring in cicd --- .cicd/defaults.json | 4 +- .github/workflows/build.yaml | 38 ++++++------------- .../tests/erc20/erc20_tester.cpp | 2 +- .../tests/erc20/erc20_tester.hpp | 14 +++++-- 4 files changed, 25 insertions(+), 33 deletions(-) diff --git a/.cicd/defaults.json b/.cicd/defaults.json index eb1f75f..18ffcc5 100644 --- a/.cicd/defaults.json +++ b/.cicd/defaults.json @@ -1,6 +1,6 @@ { - "leap-dev":{ - "target":"5", + "antelope-spring-dev":{ + "target":"main", "prerelease":false }, "cdt":{ diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 61ffa40..6bdc872 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -8,16 +8,6 @@ on: pull_request: workflow_dispatch: inputs: - override-leap-dev: - description: Override leap-dev target - type: string - override-leap-dev-prerelease: - type: choice - description: Override leap-dev prelease - options: - - default - - true - - false override-cdt: description: 'Override cdt target' type: string @@ -89,8 +79,8 @@ jobs: name: Determine Versions runs-on: ubuntu-latest outputs: - leap-dev-target: ${{steps.versions.outputs.leap-dev-target}} - leap-dev-prerelease: ${{steps.versions.outputs.leap-dev-prerelease}} + antelope-spring-dev-target: ${{steps.versions.outputs.antelope-spring-dev-target}} + antelope-spring-dev-prerelease: ${{steps.versions.outputs.antelope-spring-dev-prerelease}} cdt-target: ${{steps.versions.outputs.cdt-target}} cdt-prerelease: ${{steps.versions.outputs.cdt-prerelease}} eos-evm-contract-target: ${{steps.versions.outputs.eos-evm-contract-target}} @@ -102,19 +92,13 @@ jobs: GH_TOKEN: ${{secrets.GITHUB_TOKEN}} run: | DEFAULTS_JSON=$(curl -sSfL $(gh api https://api.github.com/repos/${{github.repository}}/contents/.cicd/defaults.json?ref=${{github.sha}} --jq .download_url)) - echo leap-dev-target=$(echo "$DEFAULTS_JSON" | jq -r '."leap-dev".target') >> $GITHUB_OUTPUT - echo leap-dev-prerelease=$(echo "$DEFAULTS_JSON" | jq -r '."leap-dev".prerelease') >> $GITHUB_OUTPUT + echo antelope-spring-dev-target=$(echo "$DEFAULTS_JSON" | jq -r '."antelope-spring-dev".target') >> $GITHUB_OUTPUT + echo antelope-spring-dev-prerelease=$(echo "$DEFAULTS_JSON" | jq -r '."antelope-spring-dev".prerelease') >> $GITHUB_OUTPUT echo cdt-target=$(echo "$DEFAULTS_JSON" | jq -r '."cdt".target') >> $GITHUB_OUTPUT echo cdt-prerelease=$(echo "$DEFAULTS_JSON" | jq -r '."cdt".prerelease') >> $GITHUB_OUTPUT echo eos-evm-contract-target=$(echo "$DEFAULTS_JSON" | jq -r '."eos-evm-contract".target') >> $GITHUB_OUTPUT echo eos-evm-contract-prerelease=$(echo "$DEFAULTS_JSON" | jq -r '."eos-evm-contract".prerelease') >> $GITHUB_OUTPUT - if [[ "${{inputs.override-leap-dev}}" != "" ]]; then - echo leap-dev-target=${{inputs.override-leap-dev}} >> $GITHUB_OUTPUT - fi - if [[ "${{inputs.override-leap-dev-prerelease}}" == +(true|false) ]]; then - echo leap-dev-prerelease=${{inputs.override-leap-dev-prerelease}} >> $GITHUB_OUTPUT - fi if [[ "${{inputs.override-cdt}}" != "" ]]; then echo cdt-target=${{inputs.override-cdt}} >> $GITHUB_OUTPUT fi @@ -156,16 +140,16 @@ jobs: prereleases: ${{fromJSON(needs.versions.outputs.cdt-prerelease)}} file: 'cdt_.*amd64.deb' - - name: Download leap-dev.deb + - name: Download antelope-spring-dev uses: AntelopeIO/asset-artifact-download-action@v3 with: owner: AntelopeIO - repo: leap - file: 'leap-dev.*ubuntu22.*amd64.deb' - target: ${{needs.versions.outputs.leap-dev-target}} - prereleases: ${{fromJSON(needs.versions.outputs.leap-dev-prerelease)}} - artifact-name: leap-dev-ubuntu22-amd64 - container-package: experimental-binaries + repo: spring + file: 'antelope-spring-dev.*ubuntu22\.04_amd64.deb' + target: '${{needs.versions.outputs.antelope-spring-dev-target}}' + prereleases: ${{fromJSON(needs.versions.outputs.antelope-spring-dev-prerelease)}} + artifact-name: antelope-spring-dev-ubuntu22-amd64 + container-package: antelope-spring-experimental-binaries - name: Install .deb packages run: | diff --git a/antelope_contracts/tests/erc20/erc20_tester.cpp b/antelope_contracts/tests/erc20/erc20_tester.cpp index 287c2f8..9e0c0ea 100644 --- a/antelope_contracts/tests/erc20/erc20_tester.cpp +++ b/antelope_contracts/tests/erc20/erc20_tester.cpp @@ -118,7 +118,7 @@ erc20_tester::erc20_tester(bool use_real_evm, eosio::chain::name evm_account_, s auto def_conf = default_config(tempdir, 4096); cfg = def_conf.first; - init(def_conf.first, def_conf.second); + init(def_conf.first, def_conf.second, testing::call_startup_t::yes); const auto& pfm = control->get_protocol_feature_manager(); diff --git a/antelope_contracts/tests/erc20/erc20_tester.hpp b/antelope_contracts/tests/erc20/erc20_tester.hpp index 18d07d3..f9cc812 100644 --- a/antelope_contracts/tests/erc20/erc20_tester.hpp +++ b/antelope_contracts/tests/erc20/erc20_tester.hpp @@ -170,13 +170,21 @@ class erc20_tester : public eosio::testing::base_tester { using base_tester::produce_block; - signed_block_ptr produce_block( fc::microseconds skip_time = fc::milliseconds(config::block_interval_ms) )override { - return _produce_block(skip_time, false); + signed_block_ptr produce_block( fc::microseconds skip_time = fc::milliseconds(config::block_interval_ms), bool no_throw = false )override { + auto produce_block_result = _produce_block(skip_time, false, no_throw); + auto sb = produce_block_result.block; + return sb; } signed_block_ptr produce_empty_block( fc::microseconds skip_time = fc::milliseconds(config::block_interval_ms) )override { unapplied_transactions.add_aborted( control->abort_block() ); - return _produce_block(skip_time, true); + auto sb = _produce_block(skip_time, true); + return sb; + } + + testing::produce_block_result_t produce_block_ex( fc::microseconds skip_time = default_skip_time, bool no_throw = false ) override { + auto produce_block_result = _produce_block(skip_time, false, no_throw); + return produce_block_result; } signed_block_ptr finish_block()override {