-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Mikhail Sherstennikov <[email protected]>
- Loading branch information
Showing
7 changed files
with
94 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: EVM compiler testing | ||
|
||
on: | ||
pull_request: | ||
branches: [ evm-compiler ] | ||
|
||
jobs: | ||
common_tests: | ||
runs-on: [self-hosted, tests-runner] | ||
name: Common tests | ||
|
||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
token: ${{ secrets.SUBMODULE_CHECKOUT_SECRET || github.token }} | ||
- name: Set up cmake 3.22 | ||
uses: jwlawson/[email protected] | ||
with: | ||
cmake-version: '3.22.x' | ||
- name: Setup Ninja | ||
uses: ashutoshvarma/setup-ninja@master | ||
- name: Run regression EVM tests | ||
run: | | ||
bash llvm/projects/evm-tests/run_evm_tests.sh | ||
# - name: Run LLVM codegen tests | ||
# run: | | ||
# ./bin/llvm-lit llvm/test/CodeGen/EVM/*.ll |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
include(ExternalProject) | ||
|
||
set(EVM_TEST_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/evm_test.rb) | ||
set(EVMONE_BUILD_DIR ${CMAKE_BINARY_DIR}/evmone-build) | ||
set(EVMONE_SOURCE_DIR ${CMAKE_BINARY_DIR}/evmone-source) | ||
|
||
set(EVMONE_CMAKE_ARGS | ||
-DCMAKE_BUILD_TYPE=Debug | ||
-DEVMC_TOOLS=ON | ||
-DEVMONE_TESTING=OFF | ||
-DCMAKE_INSTALL_PREFIX=${EVMONE_BUILD_DIR}/install | ||
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} | ||
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} | ||
) | ||
|
||
ExternalProject_Add(evmone | ||
GIT_REPOSITORY [email protected]:NilFoundation/evmone.git | ||
GIT_TAG 2de80207495b3a05304962f6517691e979326ddc | ||
CONFIGURE_COMMAND ${CMAKE_COMMAND} <SOURCE_DIR> -G ${CMAKE_GENERATOR} ${EVMONE_CMAKE_ARGS} | ||
SOURCE_DIR ${EVMONE_SOURCE_DIR} | ||
BINARY_DIR ${EVMONE_BUILD_DIR} | ||
BUILD_COMMAND ${CMAKE_COMMAND} --build ${EVMONE_BUILD_DIR} --target evmone evmc-tool | ||
) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash -e | ||
|
||
set -x | ||
|
||
SOURCE_DIR=$(realpath `dirname -- "$0"`) | ||
NPROC=$(nproc) | ||
|
||
pwd | ||
ls | ||
|
||
cmake --version | ||
c++ --version | ||
|
||
cmake ${SOURCE_DIR}/../../ -DCMAKE_BUILD_TYPE=Debug \ | ||
-G Ninja \ | ||
-DLLVM_ENABLE_PROJECTS="clang" \ | ||
-DLLVM_TARGETS_TO_BUILD="EVM" \ | ||
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=EVM \ | ||
-DCMAKE_INSTALL_PREFIX=./install \ | ||
-DLLVM_INSTALL_TOOLCHAIN_ONLY=ON \ | ||
-DDEFAULT_SYSROOT=/usr \ | ||
-DEVM_HOST=ON \ | ||
-DLLVM_DISTRIBUTION_COMPONENTS="clang;evm-stdlib;zkllvm-cxx-headers;zkllvm-c-headers" | ||
|
||
cmake --build . --target install-distribution evmone -j${NPROC} | ||
#ninja install-distribution -j${NPROC} | ||
#ninja evmone -j${NPROC} | ||
|
||
ruby ${SOURCE_DIR}/evm_test.rb \ | ||
--bin-dir ./bin \ | ||
--glob "${SOURCE_DIR}/common_tests/*.{s,cpp}" \ | ||
--no-ctor --clang-args "--sysroot=./install" --evmone evmone-build |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
|
||
set(CLANG_ARGS --sysroot=${CMAKE_BINARY_DIR}) | ||
set(CLANG_ARGS "${CLANG_ARGS} -I${CMAKE_SOURCE_DIR}/projects/evm-sdk/cpp-stdlib/libcpp") | ||
set(CLANG_ARGS "${CLANG_ARGS} -I${CMAKE_SOURCE_DIR}/projects/evm-sdk/cpp-stdlib/libc/include") | ||
set(CLANG_ARGS "${CLANG_ARGS} -I${CMAKE_SOURCE_DIR}/projects/evm-sdk/evm-stdlib/include") | ||
|
||
add_custom_target(evm-tests | ||
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/evm_test.rb --bin-dir ${CMAKE_BINARY_DIR}/bin --glob \"${CMAKE_SOURCE_DIR}/test/CodeGen/EVM/runtime_tests/**/*.{c,cpp}\" --no-ctor --clang-args ${CLANG_ARGS} | ||
DEPENDS clang evm-linker evm_test.rb evm-stdlib | ||
) | ||
#set(CLANG_ARGS --sysroot=${CMAKE_BINARY_DIR}) | ||
#set(CLANG_ARGS "${CLANG_ARGS} -I${CMAKE_SOURCE_DIR}/projects/evm-sdk/cpp-stdlib/libcpp") | ||
#set(CLANG_ARGS "${CLANG_ARGS} -I${CMAKE_SOURCE_DIR}/projects/evm-sdk/cpp-stdlib/libc/include") | ||
#set(CLANG_ARGS "${CLANG_ARGS} -I${CMAKE_SOURCE_DIR}/projects/evm-sdk/evm-stdlib/include") | ||
# | ||
#add_custom_target(evm-tests | ||
# COMMAND ../../projects/evm-tests/evm_test.rb --bin-dir ${CMAKE_BINARY_DIR}/bin --glob \"${CMAKE_SOURCE_DIR}/test/CodeGen/EVM/runtime_tests/**/*.{c,cpp}\" --no-ctor --clang-args ${CLANG_ARGS} | ||
# DEPENDS clang evm-linker ../../projects/evm-tests/evm_test.rb evm-stdlib | ||
#) |