From 27eefd0d2c046f92f0cb56707b4429aeddb2f5e4 Mon Sep 17 00:00:00 2001 From: Nick Hynes Date: Wed, 15 Jun 2022 11:33:37 +0800 Subject: [PATCH] ci: allow passing setup code to hash-rust --- .github/actions/hash-rust/action.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/actions/hash-rust/action.yml b/.github/actions/hash-rust/action.yml index 4c9dce05f6f..a3a2086dfa8 100644 --- a/.github/actions/hash-rust/action.yml +++ b/.github/actions/hash-rust/action.yml @@ -24,6 +24,10 @@ inputs: description: Control whether to produce sgxs binaries default: no required: false + setup: + description: Code to run before building + default: "" + required: false outputs: hashes: description: Comma-separated list of binary hashes @@ -39,6 +43,7 @@ runs: run: | docker run --rm -i -v ${{ inputs.dir }}:/src ${{ inputs.image }} /bin/bash <<-'EOF' set -e + ${{ inputs.setup }} cd /src CARGO_TARGET_ROOT="/src/target" TARGET="" @@ -51,7 +56,7 @@ runs: for pkg in $PKG_DIRS; do pushd ${pkg} - cargo build --release --target $TARGET + cargo build --release --locked --target $TARGET cargo elf2sgxs --release popd done @@ -60,7 +65,7 @@ runs: for pkg in $PKG_DIRS; do pushd ${pkg} - cargo build --release + cargo build --release --locked popd done fi