Commit b3a5d9e6 authored by Sidney Keese's avatar Sidney Keese
Browse files

install paramfetch from rfsb

parent 80ccd68a
...@@ -23,7 +23,6 @@ jobs: ...@@ -23,7 +23,6 @@ jobs:
- update_submodules - update_submodules
- build_project - build_project
- lint_project - lint_project
- install_filecoin_proofs
- restore_parameter_cache - restore_parameter_cache
- fetch_filecoin_parameters - fetch_filecoin_parameters
- save_parameter_cache - save_parameter_cache
...@@ -58,7 +57,6 @@ jobs: ...@@ -58,7 +57,6 @@ jobs:
- update_submodules - update_submodules
- build_project - build_project
- lint_project - lint_project
- install_filecoin_proofs
- restore_parameter_cache - restore_parameter_cache
- fetch_filecoin_parameters - fetch_filecoin_parameters
- save_parameter_cache - save_parameter_cache
...@@ -83,18 +81,12 @@ commands: ...@@ -83,18 +81,12 @@ commands:
echo 'export GOPATH="${HOME}/go"' >> $BASH_ENV echo 'export GOPATH="${HOME}/go"' >> $BASH_ENV
echo 'export FILECOIN_PARAMETER_CACHE="${HOME}/filecoin-proof-parameters/"' >> $BASH_ENV echo 'export FILECOIN_PARAMETER_CACHE="${HOME}/filecoin-proof-parameters/"' >> $BASH_ENV
echo 'export GO111MODULE=on' >> $BASH_ENV echo 'export GO111MODULE=on' >> $BASH_ENV
install_filecoin_proofs:
steps:
- run:
name: Install filecoin-proofs binaries
command: |
cargo install filecoin-proofs
fetch_filecoin_parameters: fetch_filecoin_parameters:
steps: steps:
- run: - run:
name: Fetch filecoin groth parameters name: Fetch filecoin groth parameters
command: | command: |
./scripts/retry.sh 1 10 1000 ./scripts/with-dots.sh paramfetch --params-for-sector-sizes=1024 --verbose ./scripts/retry.sh 1 10 1000 ./scripts/with-dots.sh ./bin/paramfetch --params-for-sector-sizes=1024 --verbose
update_submodules: update_submodules:
steps: steps:
- run: - run:
...@@ -119,10 +111,10 @@ commands: ...@@ -119,10 +111,10 @@ commands:
steps: steps:
- restore_cache: - restore_cache:
keys: keys:
- v1-proof-params-{{ checksum "~/.cargo/bin/paramfetch" }} - v1-proof-params-{{ checksum "./bin/paramfetch" }}
save_parameter_cache: save_parameter_cache:
steps: steps:
- save_cache: - save_cache:
key: v1-proof-params-{{ checksum "~/.cargo/bin/paramfetch" }} key: v1-proof-params-{{ checksum "./bin/paramfetch" }}
paths: paths:
- "~/filecoin-proof-parameters/" - "~/filecoin-proof-parameters/"
...@@ -2,3 +2,4 @@ ...@@ -2,3 +2,4 @@
**/*.a **/*.a
**/*.pc **/*.pc
.install-rust-fil-sector-builder .install-rust-fil-sector-builder
bin/
...@@ -16,6 +16,9 @@ if download_release_tarball tarball_path "${subm_dir}"; then ...@@ -16,6 +16,9 @@ if download_release_tarball tarball_path "${subm_dir}"; then
cp "${tmp_dir}/include/sector_builder_ffi.h" . cp "${tmp_dir}/include/sector_builder_ffi.h" .
cp "${tmp_dir}/lib/libsector_builder_ffi.a" . cp "${tmp_dir}/lib/libsector_builder_ffi.a" .
cp "${tmp_dir}/lib/pkgconfig/sector_builder_ffi.pc" . cp "${tmp_dir}/lib/pkgconfig/sector_builder_ffi.pc" .
mkdir -p bin
cp "${tmp_dir}/bin/paramfetch" bin
else else
echo "failed to find or obtain precompiled assets for ${subm_dir}, falling back to local build" echo "failed to find or obtain precompiled assets for ${subm_dir}, falling back to local build"
build_from_source "${subm_dir}" build_from_source "${subm_dir}"
...@@ -26,4 +29,13 @@ else ...@@ -26,4 +29,13 @@ else
find "${subm_dir}" -type f -name sector_builder_ffi.h -exec cp -- "{}" . \; find "${subm_dir}" -type f -name sector_builder_ffi.h -exec cp -- "{}" . \;
find "${subm_dir}" -type f -name libsector_builder_ffi.a -exec cp -- "{}" . \; find "${subm_dir}" -type f -name libsector_builder_ffi.a -exec cp -- "{}" . \;
find "${subm_dir}" -type f -name sector_builder_ffi.pc -exec cp -- "{}" . \; find "${subm_dir}" -type f -name sector_builder_ffi.pc -exec cp -- "{}" . \;
pushd $subm_dir
# TODO https://github.com/filecoin-project/rust-fil-sector-builder/issues/39
FP_VERSION=$(cat "Cargo.lock" | grep 'name = "filecoin-proofs"' -A1 | tail -n1 | cut -d' ' -f3 | tr -d '"')
cargo install --version $FP_VERSION filecoin-proofs --root '..' --bin paramfetch
popd
fi fi
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment