Skip to content

Commit

Permalink
ci: allow passing setup code to hash-rust (#993)
Browse files Browse the repository at this point in the history
  • Loading branch information
nhynes committed Jun 17, 2022
1 parent 0f74237 commit 650c887
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/actions/hash-rust/action.yml
Expand Up @@ -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
Expand All @@ -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=""
Expand All @@ -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
Expand All @@ -60,7 +65,7 @@ runs:
for pkg in $PKG_DIRS; do
pushd ${pkg}
cargo build --release
cargo build --release --locked
popd
done
fi
Expand Down

0 comments on commit 650c887

Please sign in to comment.