Skip to content

Commit

Permalink
Merge commit '1db13d7' into elmato/merge-bump_0_2_0-to-main
Browse files Browse the repository at this point in the history
  • Loading branch information
elmato committed Aug 16, 2024
2 parents d342384 + 1db13d7 commit 431eaa6
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 33 deletions.
4 changes: 2 additions & 2 deletions .cicd/defaults.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"leap-dev":{
"target":"5",
"antelope-spring-dev":{
"target":"main",
"prerelease":false
},
"cdt":{
Expand Down
38 changes: 11 additions & 27 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}}
Expand All @@ -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
Expand Down Expand Up @@ -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: |
Expand Down
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion antelope_contracts/tests/erc20/erc20_tester.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
14 changes: 11 additions & 3 deletions antelope_contracts/tests/erc20/erc20_tester.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 431eaa6

Please sign in to comment.