Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: revamp CI v0.8.25 #559

Merged
merged 3 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 90 additions & 0 deletions .github/actions/solc-build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: 'Build'
description: 'Builds solc executable.'
inputs:
release-suffix:
description: 'Release suffix.'
required: false
default: ''
zksync-version:
description: 'Release version.'
required: true
solc-version:
description: 'Solidity version.'
required: true
extra-args:
description: 'Extra arguments for cmake.'
required: false
default: ''
runs:
using: "composite"
steps:

- name: Install Boost (MacOS ARM64)
if: runner.os == 'macOS'
shell: bash
env:
BOOST_DOWNLOAD_URL: "https://boostorg.jfrog.io/artifactory/main/release/1.71.0/source"
BOOST_FILENAME: "boost_1_71_0"
run: |
curl -L -o ${BOOST_FILENAME}.tar.gz "${BOOST_DOWNLOAD_URL}/${BOOST_FILENAME}.tar.gz"
tar xzf "${BOOST_FILENAME}.tar.gz" && cd ${BOOST_FILENAME}
if [ ${RUNNER_ARCH} = ARM64 ]; then
./bootstrap.sh --prefix=${PWD}/boost
else
./bootstrap.sh --prefix=/usr/local --with-python-version=2.7
fi
./b2 link=static runtime-link=static -j$(sysctl -n hw.ncpu)
./b2 install -j$(sysctl -n hw.ncpu)
- name: Build solc
shell: ${{ runner.os == 'Windows' && 'msys2 {0}' || 'bash' }}
env:
CXXFLAGS: "-Wno-narrowing"
run: |
mkdir -p ./build
cd ./build
[ ${RUNNER_OS} = macOS ] && PARALLEL=$(sysctl -n hw.ncpu) || PARALLEL=$(nproc)
cmake .. \
-DCMAKE_BUILD_TYPE="Release" \
-DSOL_VERSION_ZKSYNC="${{ inputs.zksync-version }}" \
-DSOLC_VERSION_ZKEVM="${{ inputs.zksync-version }}" \
-DSOL_VERSION_ZKEVM="${{ inputs.zksync-version }}" \
abinavpp marked this conversation as resolved.
Show resolved Hide resolved
-DUSE_Z3=OFF \
-DUSE_CVC4=OFF \
-DTESTS=0 \
-DBoost_NO_BOOST_CMAKE=TRUE \
-DSOLC_LINK_STATIC=1 \
-DSTATIC_LINKING=1 \
-DPEDANTIC=OFF ${{ inputs.extra-args}}
if [[ ${{ inputs.solc-version}} == "0.4"* ]]; then
cmake --build . --config Release --parallel ${PARALLEL} --target jsoncpp-project
cmake --build . --config Release --parallel ${PARALLEL} --target range-v3-project
fi
cmake --build . --config Release --parallel ${PARALLEL} --target solc
[ "$RUNNER_OS" = "Windows" ] && WIN_SUFFIX=".exe"
cp ./solc/solc${WIN_SUFFIX} ./solc/solc-${{ inputs.solc-version }}${WIN_SUFFIX}
- name: Upload binary for testing
if: inputs.release-suffix == ''
uses: actions/upload-artifact@v4
with:
name: solc-${{ inputs.solc-version }}
path: ./build/solc/solc-${{ inputs.solc-version }}

- name: Prepare binary
if: inputs.release-suffix != ''
shell: ${{ runner.os == 'Windows' && 'msys2 {0}' || 'bash' }}
run: |
[ "$RUNNER_OS" = "Windows" ] && WIN_SUFFIX=".exe"
SOLC_BIN="./build/solc/solc${WIN_SUFFIX}"
mkdir -p ./releases/${{ inputs.release-suffix }}
strip "${SOLC_BIN}"
${SOLC_BIN} --version
mv ${SOLC_BIN} ./releases/${{ inputs.release-suffix }}/solc-${{ inputs.release-suffix }}-${{ inputs.solc-version}}-${{ inputs.zksync-version }}${WIN_SUFFIX}
- name: Upload binary for release
if: inputs.release-suffix != ''
uses: actions/upload-artifact@v4
with:
name: release-${{ inputs.release-suffix }}
path: releases
142 changes: 0 additions & 142 deletions .github/workflows/benchmarks.yml

This file was deleted.

Loading
Loading