From 7099e4c251476de2153f6911ffc40d013c965e6f Mon Sep 17 00:00:00 2001 From: Vytautas Astrauskas Date: Fri, 4 Aug 2023 19:16:02 +0200 Subject: [PATCH] Do release build when testing. --- .github/workflows/test.yml | 34 +++++++++++++++++++++++++++++++++ prusti-contracts-build/build.rs | 2 +- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e5a696be8cd..f37af24d6d9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -263,6 +263,40 @@ jobs: cd prusti-contracts/prusti-contracts-test/ cargo +stable build + release-build: + strategy: + matrix: + os: [ubuntu-20.04, ubuntu-22.04, windows-latest, macos-latest] + fail-fast: false + runs-on: ${{ matrix.os }} + steps: + - name: Check out the repo + uses: actions/checkout@v3 + + - name: Set up Python 3 + uses: actions/setup-python@v4 + with: + python-version: '3.x' + + - name: Set up Java + uses: actions/setup-java@v3 + with: + java-version: '15' + distribution: 'zulu' + + - name: Set up the environment + run: python x.py setup + + - name: Build workspace with cargo --release + run: python x.py build --release --jobs=1 --workspace --exclude prusti-contracts-build --verbose + env: + CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG: true + + - name: Build contracts with cargo --release + run: python x.py build --release --jobs=1 --package prusti-contracts-build --verbose + env: + CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG: true + # Run Prusti on itself. # Disabled because of a bug when compiling jni-gen test-on-prusti: diff --git a/prusti-contracts-build/build.rs b/prusti-contracts-build/build.rs index d67b796e9e0..8eeb2a465d5 100644 --- a/prusti-contracts-build/build.rs +++ b/prusti-contracts-build/build.rs @@ -12,7 +12,7 @@ fn main() { ); let target: PathBuf = ["..", "target"].iter().collect(); - force_reexport_specs(target.join("verify").as_path()); + //force_reexport_specs(target.join("verify").as_path()); // Copy just-built binaries to `target/dir` dir let bin_dir = if cfg!(debug_assertions) {