Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,10 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: true
# On one builder produce the source tarball since there's no need to produce
# it everywhere
- run: ./ci/build-src-tarball.sh
if: matrix.build == 'x86_64-linux'
- uses: ./.github/actions/install-rust
- uses: ./.github/actions/binary-compatible-builds
with:
Expand Down
20 changes: 20 additions & 0 deletions ci/build-src-tarball.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

set -ex

# Determine the name of the tarball
tag=dev
if [[ $GITHUB_REF == refs/tags/v* ]]; then
tag=${GITHUB_REF#refs/tags/}
fi
pkgname=wasmtime-$tag-src

# Vendor all crates.io dependencies since this is supposed to be an
# offline-only-compatible tarball
mkdir .cargo
cargo vendor > .cargo/config.toml

# Create the tarball from the destination
tar -czf /tmp/$pkgname.tar.gz --transform "s/^\./$pkgname/S" --exclude=.git .
mkdir -p dist
mv /tmp/$pkgname.tar.gz dist/