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
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ jobs:

build-android:
runs-on: ubuntu-24.04
timeout-minutes: 10
strategy:
matrix:
include:
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ jobs:
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- run: ./Utilities/build-release.py -o wasmkit-x86_64-apple-macos.tar.gz -- --triple x86_64-apple-macos
- run: ./Utilities/build-release.py -o wasmkit-arm64-apple-macos.tar.gz -- --triple arm64-apple-macos
- run: |
VERSION=$(echo ${{ github.ref_name }} | sed 's/^v//')
echo "{WASMKIT_VERSION}={$VERSION}" >> "$GITHUB_ENV"
- run: ./Utilities/build-release.py -o wasmkit-x86_64-apple-macos.tar.gz -s $WASMKIT_VERSION -- --triple x86_64-apple-macos
- run: ./Utilities/build-release.py -o wasmkit-arm64-apple-macos.tar.gz -s $WASMKIT_VERSION -- --triple arm64-apple-macos
- uses: actions/upload-artifact@v5
with:
name: release-wasmkit-x86_64-apple-macos
Expand All @@ -41,8 +44,11 @@ jobs:
./build-exec apt-get install -y llvm-15
./build-exec ln -s /usr/bin/llvm-strip-15 /usr/bin/llvm-strip

- run: ./build-exec ./Utilities/build-release.py -o wasmkit-x86_64-swift-linux-musl.tar.gz -- --swift-sdk x86_64-swift-linux-musl
- run: ./build-exec ./Utilities/build-release.py -o wasmkit-aarch64-swift-linux-musl.tar.gz -- --swift-sdk aarch64-swift-linux-musl
- run: |
VERSION=$(echo ${{ github.ref_name }} | sed 's/^v//')
echo "{WASMKIT_VERSION}={$VERSION}" >> "$GITHUB_ENV"
- run: ./build-exec ./Utilities/build-release.py -o wasmkit-x86_64-swift-linux-musl.tar.gz -s $WASMKIT_VERSION -- --swift-sdk x86_64-swift-linux-musl
- run: ./build-exec ./Utilities/build-release.py -o wasmkit-aarch64-swift-linux-musl.tar.gz -s $WASMKIT_VERSION -- --swift-sdk aarch64-swift-linux-musl
- uses: actions/upload-artifact@v5
with:
name: release-wasmkit-x86_64-swift-linux-musl
Expand Down
23 changes: 23 additions & 0 deletions Utilities/build-release.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,33 @@ def main():
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("-o", "--output", required=True)
parser.add_argument("-s", "--semantic-version", required=True)
parser.add_argument("extra_build_args", nargs="*")

args = parser.parse_args()

# Check that `README.md` has been updated with the latest version.
version_ok = False
with open(os.path.join(SOURCE_ROOT, 'README.md')) as file:
for line in file:
if f'from: "{args.semantic_version}"' in line:
version_ok = True

if not version_ok:
print("Expected README.md to contain a reference to the newly released version in Package.swift sample.", file=sys.stderr)
sys.exit(1)

# Check that `CLI.swift` has been updated with the latest version.
version_ok = False
with open(os.path.join(SOURCE_ROOT, 'Sources', 'CLI', 'CLI.swift')) as file:
for line in file:
if f'version: "{args.semantic_version}"' in line:
version_ok = True

if not version_ok:
print("Expected `Sources/CLI/CLI.swift` to specify the newly released version.", file=sys.stderr)
sys.exit(1)

build_args = ["swift", "build", "-c", "release", "--product", "wasmkit-cli", "--package-path", SOURCE_ROOT] + args.extra_build_args
bin_path = subprocess.check_output(build_args + ["--show-bin-path"], text=True).strip()

Expand Down