Skip to content

Commit

Permalink
Merge pull request #671 from ethereum/ci
Browse files Browse the repository at this point in the history
ci: Upgrade and clean up builds, add macOS
  • Loading branch information
chfast authored Aug 24, 2022
2 parents 184b08a + 9855bc7 commit b682b5a
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 10 deletions.
22 changes: 17 additions & 5 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ orbs:
executors:
linux-gcc-latest:
docker:
- image: ethereum/cpp-build-env:17-gcc-11
- image: ethereum/cpp-build-env:18-gcc-12
linux-clang-latest:
docker:
- image: ethereum/cpp-build-env:17-clang-13
- image: ethereum/cpp-build-env:18-clang-14


commands:
Expand Down Expand Up @@ -271,7 +271,7 @@ jobs:

build-gcc-32bit:
docker:
- image: ethereum/cpp-build-env:14-gcc-10-multilib
- image: ethereum/cpp-build-env:17-gcc-11-multilib
steps:
- checkout
- build:
Expand All @@ -280,7 +280,7 @@ jobs:

build-cmake-min:
docker:
- image: circleci/buildpack-deps:bionic
- image: cimg/base:stable-18.04
steps:
- run:
name: "Install default CMake"
Expand All @@ -289,9 +289,20 @@ jobs:
- build
- test

build-macos:
macos:
xcode: 14.0.0
steps:
- run:
name: "Install System Dependencies"
command: HOMEBREW_NO_AUTO_UPDATE=1 brew install cmake
- checkout
- build
- test

bindings-go-latest:
docker:
- image: circleci/golang
- image: cimg/go:1.19
steps:
- go_test

Expand Down Expand Up @@ -411,6 +422,7 @@ workflows:
- build-clang-min
- build-gcc-32bit
- build-cmake-min
- build-macos
- bindings-go-latest:
filters:
tags:
Expand Down
14 changes: 10 additions & 4 deletions test/unittests/cpp_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,10 @@ TEST(cpp, status_code_to_string)

// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
#define TEST_CASE(NAME) \
TestCase { NAME, #NAME }
TestCase \
{ \
NAME, #NAME \
}
constexpr TestCase test_cases[]{
TEST_CASE(EVMC_SUCCESS),
TEST_CASE(EVMC_FAILURE),
Expand Down Expand Up @@ -880,7 +883,10 @@ TEST(cpp, revision_to_string)

// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
#define TEST_CASE(NAME) \
TestCase { NAME, #NAME }
TestCase \
{ \
NAME, #NAME \
}
constexpr TestCase test_cases[]{
TEST_CASE(EVMC_FRONTIER),
TEST_CASE(EVMC_HOMESTEAD),
Expand Down Expand Up @@ -928,13 +934,13 @@ TEST(cpp, revision_to_string)
}


#ifdef __GNUC__
#if defined(__GNUC__) && !defined(__APPLE__)
extern "C" [[gnu::weak]] void __ubsan_handle_builtin_unreachable(void*); // NOLINT
#endif

static bool has_ubsan() noexcept
{
#ifdef __GNUC__
#if defined(__GNUC__) && !defined(__APPLE__)
return (__ubsan_handle_builtin_unreachable != nullptr);
#else
return false;
Expand Down
2 changes: 1 addition & 1 deletion test/vmtester/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ add_test(NAME ${prefix}/help COMMAND evmc::evmc-vmtester --version --help)
set_tests_properties(${prefix}/help PROPERTIES PASS_REGULAR_EXPRESSION "Usage:")

add_test(NAME ${prefix}/nonexistingvm COMMAND evmc::evmc-vmtester nonexistingvm)
set_tests_properties(${prefix}/nonexistingvm PROPERTIES PASS_REGULAR_EXPRESSION "[Cc]annot open")
set_tests_properties(${prefix}/nonexistingvm PROPERTIES PASS_REGULAR_EXPRESSION "[Cc]annot open|no such file")

add_test(NAME ${prefix}/noarg COMMAND evmc::evmc-vmtester)
set_tests_properties(${prefix}/noarg PROPERTIES PASS_REGULAR_EXPRESSION "is required")
Expand Down

0 comments on commit b682b5a

Please sign in to comment.