diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a472884..012a21b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -70,6 +70,17 @@ jobs: run: | set -x set -e + # To debug the `invalid instruction` crash, we can uncomment this + # code to see the state of the process during the crash. + # IMPORTANT: don't forget to install gdb before uncommenting + # + # cat /proc/cpuinfo + # gdb -q --batch -ex "set disassembly-flavor intel" \ + # -ex "run" \ + # -ex "bt" \ + # -ex "info registers" \ + # -ex "x/10i \$pc" \ + # --args package/bin/prover testdata/circuit_final.zkey testdata/witness.wtns proof.json public.json time package/bin/prover testdata/circuit_final.zkey testdata/witness.wtns proof.json public.json time package/bin/verifier testdata/verification_key.json public.json proof.json # make a wrong public.json by decrementing the first element by 1 @@ -341,7 +352,7 @@ jobs: gh release upload ${{ github.event.release.tag_name }} rapidsnark-macOS-arm64-${{ github.ref_name }}.zip build-apple-x86_64: - runs-on: macos-13 + runs-on: macos-15-intel steps: - uses: actions/checkout@v4 with: diff --git a/build_gmp.sh b/build_gmp.sh index bb23709..3883e1d 100755 --- a/build_gmp.sh +++ b/build_gmp.sh @@ -102,7 +102,13 @@ build_host() mkdir "$BUILD_DIR" cd "$BUILD_DIR" - ../configure --prefix="$PACKAGE_DIR" --with-pic --disable-fft && + # Although the target is named `host`, we still assume that if we build on + # linux x86_64, the binary should work on any linux x86_64. That is why we + # add the --enable-fat flag. Without it, for example, if we cache the build + # artifacts of GMP that were built on one GitHub CI server, we would get a + # crash on another server that does not support instructions from the + # original builder. + ../configure --prefix="$PACKAGE_DIR" --with-pic --disable-fft --enable-fat && make -j${NPROC} && make install