Skip to content

Merge pull request #5 from kkk669/fix-ci #94

Merge pull request #5 from kkk669/fix-ci

Merge pull request #5 from kkk669/fix-ci #94

Workflow file for this run

name: Swift
on:
push:
branches: ["wasm32-wasi"]
pull_request:
branches: ["wasm32-wasi"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: swiftwasm/setup-swiftwasm@v1
with:
swift-version: "wasm-DEVELOPMENT-SNAPSHOT-2024-03-01-a"
- name: Install tools
run: |
sudo apt-get update
sudo apt-get install wabt binaryen
- run: swift --version
- name: Build
run: |
swift build --product swift-format --triple wasm32-unknown-wasi -c release -Xlinker -z -Xlinker stack-size=524288 --static-swift-stdlib
wasm-strip .build/release/swift-format.wasm
wasm-opt -Os -all .build/release/swift-format.wasm -o swift-format.wasm
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: swift-format.wasm
path: swift-format.wasm