Merge pull request #58 #31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test GraalWasm Embed Rust in Java Guide | |
| on: | |
| push: | |
| paths: | |
| - 'graalwasm/graalwasm-embed-rust-code-guide/**' | |
| - '.github/workflows/graalwasm-embed-rust-code-guide.yml' | |
| pull_request: | |
| paths: | |
| - 'graalwasm/graalwasm-embed-rust-code-guide/**' | |
| - '.github/workflows/graalwasm-embed-rust-code-guide.yml' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| run: | |
| name: 'graalwasm-embed-rust-code-guide' | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Install wasm-pack | |
| run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
| - name: Set up GraalVM | |
| uses: graalvm/setup-graalvm@v1 | |
| with: | |
| java-version: '25.0.1' | |
| distribution: 'graalvm' | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| cache: 'maven' | |
| - name: Build, test, and run 'graalwasm-embed-rust-code-guide' | |
| run: | | |
| cd graalwasm/graalwasm-embed-rust-code-guide | |
| ./mvnw --no-transfer-progress package | |
| ./mvnw --no-transfer-progress exec:exec | |
| # Now start fresh, build the native version, and run it | |
| ./mvnw --no-transfer-progress clean | |
| ./mvnw --no-transfer-progress -Pnative package | |
| ./target/demo |