From 52fa867cb834b51d2a69edb5200b7a946e02323a Mon Sep 17 00:00:00 2001 From: teor Date: Tue, 23 Aug 2022 13:43:18 +1000 Subject: [PATCH] change(ci): Disable beta Rust tests and add parameter download logging (#4930) * Apply the same Rust logging settings to all GitHub workflows * Enable full optimisations in dev builds for downloading large parameter files * Disable beta Rust tests in CI --- .../workflows/build-crates-individually.yml | 7 +++--- .github/workflows/build-docker-image.yml | 1 + .../workflows/continous-integration-os.yml | 6 ++++- .github/workflows/coverage.yml | 1 + .github/workflows/docs.yml | 6 +++++ .github/workflows/lint.yml | 7 ++++++ Cargo.toml | 22 ++++++++++++++++--- 7 files changed, 43 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-crates-individually.yml b/.github/workflows/build-crates-individually.yml index 4e65f6b8ad8..501bd904761 100644 --- a/.github/workflows/build-crates-individually.yml +++ b/.github/workflows/build-crates-individually.yml @@ -25,6 +25,7 @@ on: env: CARGO_INCREMENTAL: 0 + RUST_LOG: info RUST_BACKTRACE: full RUST_LIB_BACKTRACE: full COLORBT_SHOW_HIDDEN: '1' @@ -48,11 +49,11 @@ jobs: # This step is meant to dynamically create a JSON containing the values of each crate # available in this repo in the root directory. We use `cargo tree` to accomplish this task. # - # The result from `cargo tree` is then transform to JSON values between double quotes, + # The result from `cargo tree` is then transform to JSON values between double quotes, # and separated by commas, then added to a `crates.txt` and assigned to a $JSON_CRATES variable. # # A JSON object is created and assigned to a $MATRIX variable, which is use to create an output - # named `matrix`, which is then used as the input in following steps, + # named `matrix`, which is then used as the input in following steps, # using ` ${{ fromJson(needs.matrix.outputs.matrix) }}` - id: set-matrix name: Dynamically build crates JSON @@ -104,7 +105,7 @@ jobs: # We could use `features: ['', '--all-features', '--no-default-features']` as a matrix argument, # but it's faster to run these commands sequentially, so they can re-use the local cargo cache. - # + # # Some Zebra crates do not have any features, and most don't have any default features. - name: Build ${{ matrix.crate }} crate with no default features uses: actions-rs/cargo@v1.0.3 diff --git a/.github/workflows/build-docker-image.yml b/.github/workflows/build-docker-image.yml index 818cbaa50d8..ba570bb51c3 100644 --- a/.github/workflows/build-docker-image.yml +++ b/.github/workflows/build-docker-image.yml @@ -36,6 +36,7 @@ on: rust_log: required: false type: string + default: info jobs: build: diff --git a/.github/workflows/continous-integration-os.yml b/.github/workflows/continous-integration-os.yml index 18614b51c64..3389fd22906 100644 --- a/.github/workflows/continous-integration-os.yml +++ b/.github/workflows/continous-integration-os.yml @@ -36,6 +36,7 @@ on: env: CARGO_INCREMENTAL: 0 + RUST_LOG: info RUST_BACKTRACE: full RUST_LIB_BACKTRACE: full COLORBT_SHOW_HIDDEN: '1' @@ -54,11 +55,14 @@ jobs: # TODO: Windows was removed for now, see https://github.com/ZcashFoundation/zebra/issues/3801 os: [ubuntu-latest, macos-latest] rust: [stable, beta] + exclude: + # TODO: re-enable beta Rust tests on ubuntu (#4929) + - os: ubuntu-latest + rust: beta # We're excluding macOS for the following reasons: # - the concurrent macOS runner limit is much lower than the Linux limit # - macOS is slower than Linux, and shouldn't have a build or test difference with Linux # - macOS is a second-tier Zebra support platform - exclude: - os: macos-latest rust: beta diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index cfa4e03708d..ae28188d5a4 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -30,6 +30,7 @@ on: env: CARGO_INCREMENTAL: 0 + RUST_LOG: info RUST_BACKTRACE: full RUST_LIB_BACKTRACE: full COLORBT_SHOW_HIDDEN: '1' diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index f989f57b488..4d53c9a1459 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -17,6 +17,12 @@ on: # workflow definitions - '.github/workflows/docs.yml' +env: + RUST_LOG: info + RUST_BACKTRACE: full + RUST_LIB_BACKTRACE: full + COLORBT_SHOW_HIDDEN: '1' + jobs: build: name: Build and Deploy Docs (+beta) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index cac408bb78e..56090ef490b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -10,6 +10,13 @@ on: branches: - 'main' +env: + CARGO_INCREMENTAL: 0 + RUST_LOG: info + RUST_BACKTRACE: full + RUST_LIB_BACKTRACE: full + COLORBT_SHOW_HIDDEN: '1' + jobs: changed-files: runs-on: ubuntu-latest diff --git a/Cargo.toml b/Cargo.toml index e2958c15afe..de480f72190 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,6 +20,8 @@ panic = "abort" # Speed up tests by optimizing performance-critical crates +# Cryptographic crates + [profile.dev.package.blake2b_simd] opt-level = 3 @@ -41,11 +43,25 @@ opt-level = 3 [profile.dev.package.bls12_381] opt-level = 3 -[profile.dev.package.minreq] -opt-level = 1 +# Cryptographic and parameter download crates [profile.dev.package.zcash_proofs] -opt-level = 1 +opt-level = 3 + +[profile.dev.package.minreq] +opt-level = 3 + +[profile.dev.package.rustls] +opt-level = 3 + +[profile.dev.package.ring] +opt-level = 3 + +[profile.dev.package.spin] +opt-level = 3 + +[profile.dev.package.untrusted] +opt-level = 3 [profile.release]