Add Wasm (wasmJs) target with full parity to the JS target #1298
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
| # This workflow will build a Java project with Gradle | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle | |
| name: Pull Request | |
| on: | |
| pull_request: | |
| branches: [ master ] | |
| concurrency: | |
| group: ci-pull-request-${{ github.head_ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| jobMatrixSetup: | |
| runs-on: macos-latest | |
| outputs: | |
| emulator_jobs_matrix: ${{ steps.dataStep.outputs.emulator_jobs_matrix }} | |
| ios_test_jobs_matrix: ${{ steps.dataStep.outputs.ios_test_jobs_matrix }} | |
| js_test_jobs_matrix: ${{ steps.dataStep.outputs.js_test_jobs_matrix }} | |
| wasm_js_test_jobs_matrix: ${{ steps.dataStep.outputs.wasm_js_test_jobs_matrix }} | |
| jvm_test_jobs_matrix: ${{ steps.dataStep.outputs.jvm_test_jobs_matrix }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up JDK | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| cache: gradle | |
| - name: Determine changed files | |
| run: | | |
| mkdir -p build | |
| git diff --name-only ${{ github.event.pull_request.base.sha }}...${{ github.event.pull_request.head.sha }} | tee build/changed_files.txt | |
| - name: Prepare the matrix JSON | |
| run: ./gradlew ciJobsMatrixSetup -PchangedFilesPath=build/changed_files.txt | |
| - id: dataStep | |
| run: | | |
| echo " | |
| emulator_jobs_matrix=$(jq -c . < ./build/emulator_jobs_matrix.json) | |
| ios_test_jobs_matrix=$(jq -c . < ./build/ios_test_jobs_matrix.json) | |
| js_test_jobs_matrix=$(jq -c . < ./build/js_test_jobs_matrix.json) | |
| wasm_js_test_jobs_matrix=$(jq -c . < ./build/wasm_js_test_jobs_matrix.json) | |
| jvm_test_jobs_matrix=$(jq -c . < ./build/jvm_test_jobs_matrix.json) | |
| " >> $GITHUB_OUTPUT | |
| build-android: | |
| needs: jobMatrixSetup | |
| if: fromJson(needs.jobMatrixSetup.outputs.emulator_jobs_matrix).gradle_tasks[0] != null | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{ fromJson(needs.jobMatrixSetup.outputs.emulator_jobs_matrix) }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/run_test_action | |
| with: | |
| gradle-tasks: ${{ matrix.gradle_tasks }} | |
| platform-name: Android | |
| report-paths: "**/build/reports/androidTests/" | |
| android: 'true' | |
| build-js: | |
| needs: jobMatrixSetup | |
| if: fromJson(needs.jobMatrixSetup.outputs.js_test_jobs_matrix).gradle_tasks[0] != null | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{ fromJson(needs.jobMatrixSetup.outputs.js_test_jobs_matrix) }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/run_test_action | |
| with: | |
| gradle-tasks: ${{ matrix.gradle_tasks }} | |
| platform-name: JS | |
| report-paths: | | |
| **/build/reports/tests/jsTest/ | |
| **/build/reports/tests/jsBrowserTest/ | |
| **/build/reports/tests/jsNodeTest/ | |
| build-wasm-js: | |
| needs: jobMatrixSetup | |
| if: fromJson(needs.jobMatrixSetup.outputs.wasm_js_test_jobs_matrix).gradle_tasks[0] != null | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{ fromJson(needs.jobMatrixSetup.outputs.wasm_js_test_jobs_matrix) }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/run_test_action | |
| with: | |
| gradle-tasks: ${{ matrix.gradle_tasks }} | |
| platform-name: Wasm JS | |
| report-paths: | | |
| **/build/reports/tests/wasmJsBrowserTest/ | |
| **/build/reports/tests/wasmJsNodeTest/ | |
| build-ios: | |
| needs: jobMatrixSetup | |
| if: fromJson(needs.jobMatrixSetup.outputs.ios_test_jobs_matrix).gradle_tasks[0] != null | |
| runs-on: macos-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{ fromJson(needs.jobMatrixSetup.outputs.ios_test_jobs_matrix) }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/run_test_action | |
| with: | |
| gradle-tasks: ${{ matrix.gradle_tasks }} | |
| platform-name: iOS | |
| report-paths: "**/build/reports/tests/iosSimulatorArm64Test/" | |
| apple: 'true' | |
| build-jvm: | |
| needs: jobMatrixSetup | |
| if: fromJson(needs.jobMatrixSetup.outputs.jvm_test_jobs_matrix).gradle_tasks[0] != null | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{ fromJson(needs.jobMatrixSetup.outputs.jvm_test_jobs_matrix) }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/run_test_action | |
| with: | |
| gradle-tasks: ${{ matrix.gradle_tasks }} | |
| platform-name: JVM | |
| report-paths: | | |
| **/build/reports/tests/jvmTest/ |