-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
78 additions
and
64 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
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 |
---|---|---|
|
@@ -44,6 +44,8 @@ jobs: | |
prepare-targets: | ||
name: Prepare targets strings | ||
runs-on: ubuntu-22.04 | ||
if: | | ||
always() && !cancelled() | ||
outputs: | ||
evm-targets: ${{ steps.get-targets.outputs.evm-targets }} | ||
prover-targets: ${{ steps.get-targets.outputs.prover-targets }} | ||
|
@@ -65,6 +67,9 @@ jobs: | |
name: Get zkLLVM run to use artifacts from | ||
needs: | ||
- handle-syncwith | ||
if: | | ||
always() && !cancelled() && | ||
(needs.handle-syncwith.result == 'success' || needs.handle-syncwith.result == 'skipped') | ||
runs-on: ubuntu-22.04 | ||
outputs: | ||
run-id: ${{ steps.get-run-id.outputs.run-id }} | ||
|
@@ -127,10 +132,16 @@ jobs: | |
build-and-generate-proofs: | ||
name: Build prover, generate proofs for circuits | ||
runs-on: ubuntu-22.04 | ||
container: ubuntu:jammy-20240111 | ||
needs: | ||
- handle-syncwith | ||
- get-zkllvm-run | ||
- prepare-targets | ||
if: | | ||
always() && !cancelled() && | ||
(needs.handle-syncwith.result == 'success' || needs.handle-syncwith.result == 'skipped') && | ||
(needs.get-zkllvm-run.result == 'success' || needs.get-zkllvm-run.result == 'skipped') && | ||
(needs.prepare-targets.result == 'success' || needs.prepare-targets.result == 'skipped') | ||
strategy: | ||
matrix: | ||
cpp-compiler: [ g++, clang++ ] | ||
|
@@ -140,6 +151,15 @@ jobs: | |
artifact-name: ${{ steps.artifact-name.outputs.merged }} | ||
|
||
steps: | ||
# It takes centuries for GH developers to fix bugs (https://github.com/actions/runner/issues/2058), | ||
# that's why we use `/__w/proof-producer/proof-producer` instead of ${{ github.workspace }} | ||
|
||
- name: Install Git CLI for Ubuntu container | ||
# GH runner image does not need it | ||
run: | | ||
apt-get update | ||
apt-get install git -y | ||
- name: Checkout proof-producer | ||
uses: actions/checkout@v4 | ||
with: | ||
|
@@ -149,45 +169,42 @@ jobs: | |
- name: Install dependencies | ||
uses: ./.github/actions/composite-install-dependecies | ||
|
||
- name: Install fixes to GH worker | ||
run: | | ||
# https://github.com/actions/runner-images/issues/8659#issuecomment-1853177960 | ||
sudo apt-get install --allow-downgrades \ | ||
libstdc++6=12.3.0-1ubuntu1~22.04 \ | ||
libgcc-s1=12.3.0-1ubuntu1~22.04 | ||
- name: Print toolchain information | ||
run: | | ||
git --version | ||
cc --version | ||
cmake --version | ||
- name: Mark git directory as safe | ||
run: | | ||
git config --list --show-origin | ||
git config --global --add safe.directory /__w/proof-producer/proof-producer | ||
echo aaaaaaaaaaaa | ||
git config --list --show-origin | ||
echo aaaaaaaaaaaa | ||
git config --system --add safe.directory $PWD | ||
git config --list --show-origin | ||
# check if the dir is safe now | ||
/usr/bin/git config --get remote.origin.url | ||
- name: Checkout modules to specified refs | ||
if: ${{ needs.handle-syncwith.outputs.prs-refs }} != '' | ||
uses: NilFoundation/ci-cd/actions/[email protected] | ||
with: | ||
paths: | | ||
${{ github.workspace }}/** | ||
!${{ github.workspace }}/**/.git/** | ||
/__w/proof-producer/proof-producer/** | ||
!/__w/proof-producer/proof-producer/**/.git/** | ||
refs: ${{ needs.handle-syncwith.outputs.prs-refs }} | ||
|
||
- name: Set usefull strings | ||
id: strings | ||
shell: bash | ||
run: | | ||
echo "build-dir=${{ github.workspace }}/build" >> $GITHUB_OUTPUT | ||
echo "dependencies-dir=${{ github.workspace }}/../dependencies" >> $GITHUB_OUTPUT | ||
echo "artifact-dir=$(realpath ${{ github.workspace }}/../artifacts)" >> $GITHUB_OUTPUT | ||
# Get platform version | ||
if [[ ${{ runner.os }} == 'Linux' ]]; then | ||
platform_version=$(lsb_release -rs) | ||
proc_number=$(nproc) | ||
elif [[ ${{ runner.os }} == 'macOS' ]]; then | ||
platform_version=$(sw_vers -productVersion) | ||
proc_number=$(sysctl -n hw.logicalcpu) | ||
fi | ||
echo "platform-version=${platform_version}" >> $GITHUB_OUTPUT | ||
echo "build-dir=/__w/proof-producer/proof-producer/build" >> $GITHUB_OUTPUT | ||
echo "dependencies-dir=/__w/proof-producer/proof-producer/../dependencies" >> $GITHUB_OUTPUT | ||
echo "artifact-dir=$(realpath /__w/proof-producer/proof-producer/../artifacts)" >> $GITHUB_OUTPUT | ||
echo "platform-version=$(lsb_release -rs)" >> $GITHUB_OUTPUT | ||
- name: Download circuits and assignments artifact | ||
uses: dawidd6/action-download-artifact@v3 | ||
|
@@ -198,7 +215,7 @@ jobs: | |
run_id: ${{ needs.get-zkllvm-run.outputs.run-id }} | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Install boost | ||
- name: Download Boost | ||
uses: MarkusJx/[email protected] | ||
id: install-boost | ||
with: | ||
|
@@ -208,9 +225,24 @@ jobs: | |
platform_version: ${{ steps.strings.outputs.platform-version }} | ||
boost_install_dir: ${{ steps.strings.outputs.dependencies-dir }} | ||
|
||
- name: REMOVE ME | ||
env: | ||
BOOST_ROOT: "${{ steps.install-boost.outputs.BOOST_ROOT }}" | ||
# BOOST_ROOT is not enough to find the built libs if Boost is installed with MarkusJx | ||
BOOST_LIBRARYDIR: "${{ steps.install-boost.outputs.BOOST_ROOT }}/lib" | ||
run: | | ||
ls -al ${{ steps.install-boost.outputs.BOOST_ROOT }} | ||
echo aaaaaaaaaaaaaaaaaaaa | ||
ls -al ${{ steps.install-boost.outputs.BOOST_ROOT }}/.. | ||
echo aaaaaaaaaaaaaaaaaaaa | ||
ls -al ${{ steps.install-boost.outputs.BOOST_ROOT }}/lib | ||
echo aaaaaaaaaaaaaaaaaaaa | ||
- name: Configure CMake | ||
env: | ||
BOOST_ROOT: "${{ steps.install-boost.outputs.BOOST_ROOT }}" | ||
# BOOST_ROOT is not enough to find the built libs if Boost is installed with MarkusJx | ||
BOOST_LIBRARYDIR: "${{ steps.install-boost.outputs.BOOST_ROOT }}/lib" | ||
run: | | ||
cmake \ | ||
-G "Unix Makefiles" \ | ||
|
@@ -236,7 +268,7 @@ jobs: | |
fi | ||
targets_str=$(echo "${{ needs.prepare-targets.outputs.prover-targets }}" | awk '{$1=$1};1' | sed '/^$/d' | tr '\n' ' ' | sed 's/ $//') | ||
echo "targets from input: ${targets_str}" | ||
${{ github.workspace }}/tests/make_proof_for_pairs.sh ${extra_args} ${targets_str} | ||
/__w/proof-producer/proof-producer/tests/make_proof_for_pairs.sh ${extra_args} ${targets_str} | ||
- name: Download transpiler output artifact | ||
id: download-to-artifact | ||
|
@@ -291,6 +323,11 @@ jobs: | |
- handle-syncwith | ||
- build-and-generate-proofs | ||
- prepare-targets | ||
if: | | ||
always() && !cancelled() && | ||
(needs.handle-syncwith.result == 'success' || needs.handle-syncwith.result == 'skipped') && | ||
(needs.build-and-generate-proofs.result == 'success' || needs.build-and-generate-proofs.result == 'skipped') && | ||
(needs.prepare-targets.result == 'success' || needs.prepare-targets.result == 'skipped') | ||
uses: NilFoundation/evm-placeholder-verification/.github/workflows/reusable-verify-proofs.yml@5bb7c4b0790f56b3a339e33ba442816fac17ab88 | ||
with: | ||
artifact-name: ${{ needs.build-and-generate-proofs.outputs.artifact-name }} | ||
|
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 |
---|---|---|
|
@@ -19,25 +19,6 @@ if (CPACK_PACKAGE_VERSION) | |
add_compile_definitions(${UPPER_CURRENT_PROJECT_NAME}_VERSION=${CPACK_PACKAGE_VERSION}) | ||
endif() | ||
|
||
if (NOT Boost_FOUND AND NOT CMAKE_CROSSCOMPILING) | ||
find_package(Boost COMPONENTS REQUIRED filesystem log log_setup program_options) | ||
elseif (CMAKE_CROSSCOMPILING) | ||
if (NOT TARGET boost) | ||
include(ExternalProject) | ||
set(Boost_LIBRARIES boost_random) | ||
externalproject_add(boost | ||
PREFIX ${CMAKE_BINARY_DIR}/libs/boost | ||
GIT_REPOSITORY [email protected]:boostorg/boost.git | ||
GIT_TAG boost-1.77.0 | ||
BUILD_IN_SOURCE TRUE | ||
CMAKE_ARGS -DCMAKE_CROSSCOMPILING_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR} -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} | ||
BUILD_COMMAND cmake --build . --target ${Boost_LIBRARIES} | ||
INSTALL_COMMAND "") | ||
else () | ||
set(Boost_LIBRARIES boost_random) | ||
endif () | ||
endif () | ||
|
||
cm_setup_version(VERSION 0.1.0) | ||
|
||
# get header files; only needed by CMake generators, | ||
|
@@ -107,4 +88,4 @@ elseif (CMAKE_CROSSCOMPILING AND CMAKE_SYSTEM_NAME STREQUAL "Emscripten") | |
add_dependencies(${CURRENT_PROJECT_NAME} boost) | ||
endif () | ||
|
||
install(TARGETS ${CURRENT_PROJECT_NAME} RUNTIME DESTINATION bin) | ||
install(TARGETS ${CURRENT_PROJECT_NAME} RUNTIME DESTINATION bin) |
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 |
---|---|---|
|
@@ -43,25 +43,6 @@ if(ZK_PLACEHOLDER_DEBUG) | |
add_definitions(-DZK_PLACEHOLDER_DEBUG_ENABLED) | ||
endif() | ||
|
||
if (NOT Boost_FOUND AND NOT CMAKE_CROSSCOMPILING) | ||
find_package(Boost COMPONENTS REQUIRED filesystem log log_setup program_options thread system) | ||
elseif (CMAKE_CROSSCOMPILING) | ||
if (NOT TARGET boost) | ||
include(ExternalProject) | ||
set(Boost_LIBRARIES boost_random) | ||
externalproject_add(boost | ||
PREFIX ${CMAKE_BINARY_DIR}/libs/boost | ||
GIT_REPOSITORY [email protected]:boostorg/boost.git | ||
GIT_TAG boost-1.77.0 | ||
BUILD_IN_SOURCE TRUE | ||
CMAKE_ARGS -DCMAKE_CROSSCOMPILING_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR} -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} | ||
BUILD_COMMAND cmake --build . --target ${Boost_LIBRARIES} | ||
INSTALL_COMMAND "") | ||
else () | ||
set(Boost_LIBRARIES boost_random) | ||
endif () | ||
endif () | ||
|
||
cm_setup_version(VERSION 0.1.0) | ||
|
||
# get header files; only needed by CMake generators, | ||
|
@@ -150,4 +131,4 @@ elseif (CMAKE_CROSSCOMPILING AND CMAKE_SYSTEM_NAME STREQUAL "Emscripten") | |
add_dependencies(${CURRENT_PROJECT_NAME} boost) | ||
endif () | ||
|
||
install(TARGETS ${CURRENT_PROJECT_NAME} RUNTIME DESTINATION bin) | ||
install(TARGETS ${CURRENT_PROJECT_NAME} RUNTIME DESTINATION bin) |