Repository navigation
Implement zero-dependency Wasm binary parser #2920
Workflow file for this run
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: 'Run Tests' | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| version-bump: | |
| name: 'Version Bump' | |
| runs-on: [self-hosted, linux, flyweight] | |
| steps: | |
| - name: 'Check out code' | |
| uses: actions/checkout@v3 | |
| with: | |
| # fetch-depth 0 means deep clone the repo | |
| fetch-depth: 0 | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - name: 'Check version was bumped' | |
| run: | | |
| og_version=$(git show origin/${GITHUB_BASE_REF}:package/version) | |
| ./package/version.sh bump ${og_version} | |
| ./package/version.sh sub | |
| if ! git diff --quiet; then | |
| echo "::error::Version was not bumped for this PR. Run './package/version.sh bump ${og_version} && ./package/version.sh sub' locally and commit the result." | |
| git diff | |
| exit 1 | |
| fi | |
| pykwasm-code-quality-checks: | |
| name: 'Code Quality Checks' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 'Check out code' | |
| uses: actions/checkout@v3 | |
| with: | |
| submodules: recursive | |
| - name: 'Get uv release' | |
| id: uv_release | |
| run: | | |
| echo uv_version=$(cat deps/uv_release) >> "${GITHUB_OUTPUT}" | |
| - name: 'Install uv' | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| version: ${{ steps.uv_release.outputs.uv_version }} | |
| - name: 'Run code quality checks' | |
| run: make -C pykwasm check | |
| - name: 'Run pyupgrade' | |
| run: make -C pykwasm pyupgrade | |
| - name: 'Run unit tests' | |
| run: make -C pykwasm cov-unit | |
| conformance-tests: | |
| name: 'Conformance Tests' | |
| needs: pykwasm-code-quality-checks | |
| runs-on: [self-hosted, linux, normal] | |
| timeout-minutes: 30 | |
| steps: | |
| - name: 'Check out code' | |
| uses: actions/checkout@v3 | |
| with: | |
| submodules: recursive | |
| - name: 'Set up Docker' | |
| uses: ./.github/actions/with-docker | |
| with: | |
| container-name: kwasm-ci-conformance-${{ github.sha }} | |
| - name: 'Build KWasm definitions' | |
| run: docker exec -u user kwasm-ci-conformance-${GITHUB_SHA} make build | |
| - name: 'Run integration tests' | |
| run: docker exec -u user kwasm-ci-conformance-${GITHUB_SHA} make -C pykwasm cov-integration | |
| - name: 'Run simple tests' | |
| run: docker exec -u user kwasm-ci-conformance-${GITHUB_SHA} make -j2 test-simple | |
| - name: 'Run conformance tests: run' | |
| run: docker exec -u user kwasm-ci-conformance-${GITHUB_SHA} make -j2 test-conformance-supported | |
| - name: 'Run conformance tests: parse' | |
| run: docker exec -u user kwasm-ci-conformance-${GITHUB_SHA} make test-conformance-parse | |
| - name: 'Tear down Docker' | |
| if: always() | |
| run: | | |
| docker stop --time=0 kwasm-ci-conformance-${GITHUB_SHA} | |
| prove-tests: | |
| name: 'Prover Tests' | |
| needs: pykwasm-code-quality-checks | |
| runs-on: [self-hosted, linux, normal] | |
| timeout-minutes: 45 | |
| steps: | |
| - name: 'Check out code' | |
| uses: actions/checkout@v3 | |
| with: | |
| submodules: recursive | |
| - name: 'Set up Docker' | |
| uses: ./.github/actions/with-docker | |
| with: | |
| container-name: kwasm-ci-prove-${{ github.sha }} | |
| - name: 'Build KWasm definitions' | |
| run: docker exec -u user kwasm-ci-prove-${GITHUB_SHA} make build | |
| - name: 'Run prover tests' | |
| run: docker exec -u user kwasm-ci-prove-${GITHUB_SHA} make -j6 test-prove | |
| - name: 'Tear down Docker' | |
| if: always() | |
| run: | | |
| docker stop --time=0 kwasm-ci-prove-${GITHUB_SHA} | |
| nix: | |
| name: 'Nix' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - runner: normal | |
| - runner: ARM64 | |
| needs: pykwasm-code-quality-checks | |
| runs-on: ${{ matrix.runner }} | |
| timeout-minutes: 90 | |
| steps: | |
| - name: 'Check out code' | |
| uses: actions/checkout@v3 | |
| with: | |
| # Check out pull request HEAD instead of merge commit. | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - name: 'Build KWASM' | |
| run: GC_DONT_GC=1 nix build .#kwasm --extra-experimental-features 'nix-command flakes' --print-build-logs | |
| - name: 'Build KWASM-Pyk' | |
| run: GC_DONT_GC=1 nix build .#kwasm-pyk --extra-experimental-features 'nix-command flakes' --print-build-logs | |
| - name: 'Test KWASM' | |
| run: GC_DONT_GC=1 nix build .#kwasm-test --extra-experimental-features 'nix-command flakes' --print-build-logs |