Skip to content

Commit

Permalink
ci: Remove sed hacks from build_and_release_binary.yaml (#540)
Browse files Browse the repository at this point in the history
  • Loading branch information
abinavpp committed Jan 14, 2024
1 parent a2ac995 commit e15359a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 43 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ jobs:
run: echo "BRANCH_NAME=$(echo ${GITHUB_BASE_REF} | tr / -)" >> $GITHUB_ENV

- name: Checking out the Solidity repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@v4
with:
submodules: recursive
path: solidity

- name: Checking out the compiler-tester candidate
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@v4
with:
repository: matter-labs/era-compiler-tester
submodules: recursive
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
--benchmark='candidate.json' \
--solc-bin-config-path="configs/solc-bin-zkevm-candidate-${BRANCH_NAME}.json"
- uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3
- uses: actions/upload-artifact@v4
with:
name: candidate-benchmark
path: compiler-tester/candidate.json
Expand All @@ -100,13 +100,13 @@ jobs:
run: echo "BRANCH_NAME=$(echo ${GITHUB_BASE_REF} | tr / -)" >> $GITHUB_ENV

- name: Checking out the Solidity repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@v4
with:
submodules: recursive
path: solidity

- name: Checking out the compiler-tester reference
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@v4
with:
repository: matter-labs/era-compiler-tester
ref: main
Expand Down Expand Up @@ -134,7 +134,7 @@ jobs:
--benchmark='reference.json' \
--solc-bin-config-path="configs/solc-bin-zkevm-reference-${BRANCH_NAME}.json"
- uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3
- uses: actions/upload-artifact@v4
with:
name: reference-benchmark
path: compiler-tester/reference.json
Expand All @@ -155,18 +155,18 @@ jobs:
run: echo "BRANCH_NAME=$(echo ${GITHUB_BASE_REF} | tr / -)" >> $GITHUB_ENV

- name: Checking out the compiler-tester repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@v4
with:
repository: matter-labs/era-compiler-tester
submodules: recursive
path: compiler-tester

- uses: actions/download-artifact@master
- uses: actions/download-artifact@v4
with:
name: candidate-benchmark
path: compiler-tester

- uses: actions/download-artifact@master
- uses: actions/download-artifact@v4
with:
name: reference-benchmark
path: compiler-tester
Expand All @@ -192,11 +192,11 @@ jobs:
- name: Posting the benchmark results to a PR comment
if: github.event_name == 'pull_request'
uses: machine-learning-apps/pr-comment@master
uses: mshick/add-pr-comment@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
path: ./compiler-tester/result.txt
message-path: ./compiler-tester/result.txt

- uses: 8398a7/action-slack@v3
with:
Expand Down
36 changes: 6 additions & 30 deletions .github/workflows/build_and_release_binary.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Build and release binaries

on:
workflow_dispatch:
pull_request:
push:
tags:
Expand Down Expand Up @@ -56,6 +57,7 @@ jobs:
- name: Prepare binary file name
run: |
mkdir -p releases/linux-amd64
./build/solc/solc --version
mv ./build/solc/solc releases/linux-amd64/solc-linux-amd64-${{ needs.setup.outputs.release_version }}
- uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3
Expand Down Expand Up @@ -91,6 +93,7 @@ jobs:
- name: Prepare binary file name
run: |
mkdir -p releases/linux-arm64
./build/solc/solc --version
mv ./build/solc/solc releases/linux-arm64/solc-linux-arm64-${{ needs.setup.outputs.release_version }}
- uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3
Expand Down Expand Up @@ -119,12 +122,6 @@ jobs:
./b2 -j$(sysctl -n hw.ncpu)
./b2 install -j$(sysctl -n hw.ncpu)
- name: Warns not errs
run: |
sed -i '' -e '/option(PEDANTIC \"Enable extra warnings and pedantic build flags. Treat all warnings as errors.\" ON)/d' CMakeLists.txt
sed -i '' -e '/add_compile_options(-Werror)/d' ./cmake/EthCompilerSettings.cmake
sed -i '' -e '/add_compile_options(-pedantic)/d' ./cmake/EthCompilerSettings.cmake
- name: Cmake gen
shell: zsh {0}
env:
Expand All @@ -144,6 +141,7 @@ jobs:
shell: zsh {0}
run: |
mkdir -p ./releases/macosx-amd64
./build/solc/solc --version
mv ./build/solc/solc ./releases/macosx-amd64/solc-macosx-amd64-${{ needs.setup.outputs.release_version }}
- uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3
Expand Down Expand Up @@ -177,12 +175,6 @@ jobs:
./b2 -j12
./b2 install -j12
- name: Warns not errs
run: |
sed -i '' -e '/option(PEDANTIC \"Enable extra warnings and pedantic build flags. Treat all warnings as errors.\" ON)/d' CMakeLists.txt
sed -i '' -e '/add_compile_options(-Werror)/d' ./cmake/EthCompilerSettings.cmake
sed -i '' -e '/add_compile_options(-pedantic)/d' ./cmake/EthCompilerSettings.cmake
- name: Cmake gen
shell: zsh {0}
env:
Expand All @@ -203,6 +195,7 @@ jobs:
shell: zsh {0}
run: |
mkdir -p ./releases/macosx-arm64
./build/solc/solc --version
mv ./build/solc/solc ./releases/macosx-arm64/solc-macosx-arm64-${{ needs.setup.outputs.release_version }}
- uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3
Expand Down Expand Up @@ -261,18 +254,6 @@ jobs:
# latest llvm for MSVC
git clone -q --depth=1 --branch=main https://github.com/zufuliu/llvm-utils.git c:\projects\llvm-utils
Invoke-Item "c:\projects\llvm-utils\VS2017\install.bat"
# Patch specific versions with include
$tag = git rev-parse --abbrev-ref HEAD
echo $tag
if ($tag -eq "0.8.5" -or $tag -eq "0.8.6" -or $tag -eq "0.8.7") {
sed -i '/^#pragma once/a #include <optional>' ./libevmasm/AssemblyItem.h
}
if ($tag -eq "0.8.7") {
sed -i '/^#pragma once/a #include <optional>' ./libyul/Object.h
}
if ($tag -eq "0.5.9" -or $tag -eq "0.5.10" -or $tag -eq "0.5.11") {
sed -i '/^#pragma once/a #include <memory>' ./libyul/backends/wasm/EWasmAST.h
}
clang --version
Expand Down Expand Up @@ -302,12 +283,6 @@ jobs:
if: steps.compare_version.outputs.result != 'true'
run: |
$env:path += ";deps\cmake\bin\"
# remove warning-as-erro flag in cmake
sed -i '/option(PEDANTIC \"Enable extra warnings and pedantic build flags. Treat all warnings as errors.\" ON)/d' CMakeLists.txt
sed -i '/add_compile_options(-Werror)/d' ./cmake/EthCompilerSettings.cmake
sed -i '/add_compile_options(-pedantic)/d' ./cmake/EthCompilerSettings.cmake
sed -i '/add_compile_options(\\/WX)/d' ./cmake/EthCompilerSettings.cmake
sed -i '/elseif (DEFINED MSVC)/d' ./cmake/EthCompilerSettings.cmake
$env:CXXFLAGS="-Wno-narrowing -Qunused-arguments -Wno-everything -DBOOST_REGEX_NO_LIB -D_REGEX_MAX_STACK_COUNT=200000L -DJSON_USE_INT64_DOUBLE_CONVERSION -std=c++17 -stdlib=libc++"
mkdir build
cd build
Expand All @@ -320,6 +295,7 @@ jobs:
run: |
mkdir -p releases\windows-amd64
ls .\build\solc\Release\
.\build\solc\Release\solc.exe --version
mv .\build\solc\Release\solc.exe releases\windows-amd64\solc-windows-amd64-${{ needs.setup.outputs.release_version }}.exe
- uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ jobs:
run: echo "BRANCH_NAME=$(echo ${GITHUB_BASE_REF} | tr / -)" >> $GITHUB_ENV

- name: Checking out the Solidity repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@v4
with:
submodules: recursive
path: solidity

- name: Checking out the compiler-tester repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@v4
with:
repository: matter-labs/era-compiler-tester
path: compiler-tester
Expand Down

0 comments on commit e15359a

Please sign in to comment.