|
| 1 | +name: "Examples" |
| 2 | +on: |
| 3 | + push: |
| 4 | + branches: ["main", "v*"] |
| 5 | + tags: ["v*"] |
| 6 | + pull_request: |
| 7 | + branches: ["main", "v*"] |
| 8 | + paths-ignore: |
| 9 | + - "README.md" |
| 10 | + |
| 11 | +env: |
| 12 | + RUST_VERSION: "1.73" |
| 13 | + SPIN_VERSION: "" |
| 14 | +jobs: |
| 15 | + examples: |
| 16 | + runs-on: "ubuntu-latest" |
| 17 | + name: Build Spin Example Apps |
| 18 | + steps: |
| 19 | + - uses: actions/checkout@v4 |
| 20 | + - name: Install Rust |
| 21 | + uses: dtolnay/rust-toolchain@stable |
| 22 | + with: |
| 23 | + toolchain: "${{ env.RUST_VERSION }}" |
| 24 | + targets: wasm32-wasi |
| 25 | + - name: Install Spin |
| 26 | + uses: fermyon/actions/spin/setup@v1 |
| 27 | + - name: Build hello-world |
| 28 | + run: spin build |
| 29 | + working-directory: ./examples/hello-world |
| 30 | + - name: Build outbound-http |
| 31 | + run: spin build |
| 32 | + working-directory: ./examples/http-outbound |
| 33 | + - name: Build spin-rust-router |
| 34 | + run: spin build |
| 35 | + working-directory: ./examples/http-router |
| 36 | + - name: Build spin-rust-router |
| 37 | + run: spin build |
| 38 | + working-directory: ./examples/http-router-macro |
| 39 | + - name: Build json-http-rust |
| 40 | + run: spin build |
| 41 | + working-directory: ./examples/json-http |
| 42 | + - name: Build spin-key-value |
| 43 | + run: spin build |
| 44 | + working-directory: ./examples/key-value |
| 45 | + - name: Build rust-outbound-mqtt-example |
| 46 | + run: spin build |
| 47 | + working-directory: ./examples/mqtt-outbound |
| 48 | + - name: Build rust-outbound-mysql |
| 49 | + run: spin build |
| 50 | + working-directory: ./examples/mysql |
| 51 | + - name: Build rust-outbound-pg-example |
| 52 | + run: spin build |
| 53 | + working-directory: ./examples/postgres |
| 54 | + - name: Build spin-redis |
| 55 | + run: spin build |
| 56 | + working-directory: ./examples/redis |
| 57 | + - name: Build async-spin-redis |
| 58 | + run: spin build |
| 59 | + working-directory: ./examples/redis-async |
| 60 | + - name: Build rust-outbound-redis-example |
| 61 | + run: spin build |
| 62 | + working-directory: ./examples/redis-outbound |
| 63 | + - name: Build spin-variables-rust |
| 64 | + run: spin build |
| 65 | + working-directory: ./examples/variables |
| 66 | + - name: Build spin-wasi-http-streaming-file |
| 67 | + run: spin build |
| 68 | + working-directory: ./examples/wasi-http-streaming-file |
| 69 | + - name: Build spin-wasi-http-async |
| 70 | + run: spin build |
| 71 | + working-directory: ./examples/wasi-http-streaming-outgoing-body |
0 commit comments