Skip to content

Commit

Permalink
Fix release build
Browse files Browse the repository at this point in the history
Also, add release build step to CI.
  • Loading branch information
shermike committed Jan 29, 2024
1 parent 6e3c28e commit 6978815
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 6 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/evm-compiler-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ jobs:
test:
runs-on: [self-hosted, tests-runner]
name: EVM compiler tests

steps:
- name: checkout
uses: actions/checkout@v3
Expand All @@ -26,6 +25,20 @@ jobs:
ruby-version: '3.3'
- run: gem install keccak256
- name: Build
run: bash llvm/projects/evm-tests/run_evm_tests.sh build
run: bash llvm/projects/evm-tests/run_evm_tests.sh build-debug
- name: Run regression EVM tests
run: bash llvm/projects/evm-tests/run_evm_tests.sh test
test:
runs-on: [self-hosted, tests-runner]
name: Release build
steps:
- name: checkout
uses: actions/checkout@v3
with:
submodules: true
- name: Setup Cmake
uses: jwlawson/actions-setup-cmake@v1.13
with:
cmake-version: '3.22.x'
- name: Build
run: bash llvm/projects/evm-tests/run_evm_tests.sh build-release
2 changes: 1 addition & 1 deletion llvm/lib/Target/EVM/EVMConvertRegToStack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ bool EVMConvertRegToStack::runOnMachineFunction(MachineFunction &MF) {
}
}
if (StackOpcode == -1) {
MI.dump();
LLVM_DEBUG(MI.dump());
report_fatal_error("Failed to convert instruction to stack version.");
}

Expand Down
10 changes: 7 additions & 3 deletions llvm/projects/evm-tests/run_evm_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ BUILD_DIR=${CWD}/build
NPROC=`nproc`

function build() {
cmake -S ${SOURCE_DIR}/../../ -B ${BUILD_DIR} -DCMAKE_BUILD_TYPE=Debug \
cmake -S ${SOURCE_DIR}/../../ -B ${BUILD_DIR} -DCMAKE_BUILD_TYPE=$1 \
-DLLVM_ENABLE_PROJECTS="clang" \
-DLLVM_TARGETS_TO_BUILD="EVM" \
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=EVM \
Expand All @@ -36,9 +36,13 @@ function run_test() {
}

case $1 in
build )
build-debug )
shift
build
build Debug
;;
build-release )
shift
build Release
;;
test )
shift
Expand Down

0 comments on commit 6978815

Please sign in to comment.