diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..950752e --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,20 @@ +on: + push: + branches: [main] + pull_request: + branches: [main] +jobs: + smoke-test: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v4 + - name: Install Swift toolchain + run: + toolchain_path="/opt/swift" + curl -L https://download.swift.org/development/ubuntu2204/swift-DEVELOPMENT-SNAPSHOT-2024-09-25-a/swift-DEVELOPMENT-SNAPSHOT-2024-09-25-a-ubuntu22.04.tar.gz | tar xz --strip-component 1 -C "$toolchain_path" + echo "export PATH=$toolchain_path/usr/bin:$PATH" >> $GITHUB_ENV + - uses: bytecodealliance/actions/wasmtime/setup@v1 + - name: Build + run: swift build -c release --triple wasm32-unknown-none-wasm -debug-info-format=none + - name: Test + run: wasmtime run .build/release/Examples.wasm