Skip to content

Commit

Permalink
Compute wasi adapter version based on latest adapter commit hash
Browse files Browse the repository at this point in the history
  • Loading branch information
juntyr committed Jun 15, 2024
1 parent 4ca3a54 commit e617878
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -804,8 +804,6 @@ jobs:
echo `pwd`/wasm-tools-1.0.27-x86_64-linux >> $GITHUB_PATH
- run: ./ci/build-wasi-preview1-component-adapter.sh
env:
VERSION: ${{ github.sha }}

- uses: actions/upload-artifact@v4
with:
Expand Down
20 changes: 14 additions & 6 deletions ci/build-wasi-preview1-component-adapter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,21 @@ verify="cargo run -p verify-component-adapter --"
debug="target/wasm32-unknown-unknown/debug/wasi_snapshot_preview1.wasm"
release="target/wasm32-unknown-unknown/release/wasi_snapshot_preview1.wasm"

# # Debug build, default features (reactor)
# $build_adapter
# $verify $debug
# Debug build, default features (reactor)
$build_adapter
$verify $debug

# # Debug build, command
# $build_adapter --no-default-features --features command
# $verify $debug
# Debug build, command
$build_adapter --no-default-features --features command
$verify $debug

# The adapter's version is the hash of the last commit that touched the adapter
# source files
VERSION=$(git log -1 --pretty="format:%H" -- $( \
git ls-files -- \
'crates/wasi-preview1-component-adapter/**' \
':!:crates/wasi-preview1-component-adapter/provider/**' \
))

compare() {
input=$1
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit e617878

Please sign in to comment.