Speedup release-build.yml: Do not run unit-tests (#1015)

`cargo-test` cannot share its artifacts with `cargo-build` and vice
versa, plus running `e2e-tests` in release build is enough to find out
potential miscompilation.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2023-04-26 19:57:48 +10:00 committed by GitHub
parent 1d97b8191d
commit 6516805f10
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 14 deletions

View file

@ -52,20 +52,13 @@ jobs:
- run: just toolchain rust-src - run: just toolchain rust-src
- run: just ci-install-deps - run: just ci-install-deps
- run: just package - run: just package
- if: runner.os == 'Windows' - if: runner.os == 'Windows'
run: Get-ChildItem packages/ run: Get-ChildItem packages/
- if: runner.os != 'Windows' - if: runner.os != 'Windows'
run: ls -shal packages/ run: ls -shal packages/
- name: Run unit tests in release build
if: "matrix.r"
run: |
just avoid-benchmark-deps
just unit-tests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Ensure release binary is runnable - name: Ensure release binary is runnable
if: "matrix.r" if: "matrix.r"
run: just e2e-tests run: just e2e-tests

View file

@ -232,12 +232,6 @@ avoid-dev-deps:
mv "$crate/Cargo.toml.tmp" "$crate/Cargo.toml" \ mv "$crate/Cargo.toml.tmp" "$crate/Cargo.toml" \
; done ; done
# leon dev-dependencies pulls in crates for benchmark but not used in test.
# This is a workaround for the lack of `benchmark-dependencies`.
avoid-benchmark-deps:
sed 's/\[dev-dependencies\]/[workaround-avoid-dev-deps]/g' ./crates/leon/Cargo.toml >./crates/leon/Cargo.toml.tmp
mv ./crates/leon/Cargo.toml.tmp ./crates/leon/Cargo.toml
package-dir: package-dir:
rm -rf packages/prep rm -rf packages/prep
mkdir -p packages/prep mkdir -p packages/prep