Skip to content

Commit

Permalink
Migrate PR tests over to GH Runner (#472)
Browse files Browse the repository at this point in the history
* .github/test-pr: add step for testing semantics in gh runner

* Jeninsfile, .github/test-pr: migrate tests over to GH Runners

* .github/test-pr: unique names for docker containers

* .github/test-pr: make sure submodules are checked out recursively

* .github/test-pr: more recursive submodule clones

* .github/test-pr: build backends ahead of time

* .github/test-pr: more reasonable timeout limit

* .github/test-pr: correct container names

* Jenkinsfile: remove remaining changesRequested block

* .github/test-pr: up timeout slightly to account for docker build times

* .github/test-pr: adjust timing more

* .github/test-pr: add TEST_CONCRETE_BACKEND back in

* .github/test-pr: adjust timings and parallelism
  • Loading branch information
ehildenb authored Apr 7, 2023
1 parent 0bffb84 commit 46f7988
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 40 deletions.
89 changes: 81 additions & 8 deletions .github/workflows/test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ concurrency:

jobs:

code-quality-checks:
pykwasm-code-quality-checks:
name: 'Code Quality Checks'
runs-on: ubuntu-latest
steps:
Expand All @@ -19,8 +19,8 @@ jobs:
- name: 'Build and run code quality checks'
run: make -C pykwasm check

unit-tests:
needs: code-quality-checks
pykwasm-unit-tests:
needs: pykwasm-code-quality-checks
name: 'Unit Tests'
runs-on: ubuntu-latest
steps:
Expand All @@ -31,8 +31,8 @@ jobs:
- name: 'Build and run unit tests'
run: make -C pykwasm cov-unit

integration-tests:
needs: code-quality-checks
pykwasm-integration-tests:
needs: pykwasm-code-quality-checks
name: 'Integration Tests'
runs-on: [self-hosted, linux, normal]
steps:
Expand All @@ -41,10 +41,83 @@ jobs:
- name: 'Set up Docker'
uses: ./.github/actions/with-docker
with:
container-name: kwasm-ci-${{ github.sha }}
container-name: kwasm-ci-pykwasm-${{ github.sha }}
- name: 'Build and run integration tests'
run: docker exec -u user kwasm-ci-${GITHUB_SHA} make -C pykwasm cov-integration
run: docker exec -u user kwasm-ci-pykwasm-${GITHUB_SHA} make -C pykwasm cov-integration
- name: 'Tear down Docker'
if: always()
run: |
docker stop --time=0 kwasm-ci-${GITHUB_SHA}
docker stop --time=0 kwasm-ci-pykwasm-${GITHUB_SHA}
parse-tests:
needs: [pykwasm-unit-tests, pykwasm-integration-tests]
name: 'Parser Tests'
runs-on: [self-hosted, linux, normal]
timeout-minutes: 18
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-parse-${{ github.sha }}
- name: 'Build LLVM Backend and pykwasm'
run: docker exec -u user kwasm-ci-parse-${GITHUB_SHA} make -j2 build-llvm pykwasm-poetry-install
- name: 'Binary parse'
run: docker exec -u user kwasm-ci-parse-${GITHUB_SHA} make -j6 TEST_CONCRETE_BACKEND=llvm test-binary-parser
- name: 'Conformance parse'
run: docker exec -u user kwasm-ci-parse-${GITHUB_SHA} make -j4 test-conformance-parse
- name: 'Tear down Docker'
if: always()
run: |
docker stop --time=0 kwasm-ci-parse-${GITHUB_SHA}
conformance-tests:
needs: [pykwasm-unit-tests, pykwasm-integration-tests]
name: 'Conformance Tests'
runs-on: [self-hosted, linux, normal]
timeout-minutes: 18
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 LLVM Backend'
run: docker exec -u user kwasm-ci-conformance-${GITHUB_SHA} make -j2 build-llvm
- name: 'Simple tests'
run: docker exec -u user kwasm-ci-conformance-${GITHUB_SHA} make -j6 TEST_CONCRETE_BACKEND=llvm test-simple
- name: 'Conformance run'
run: docker exec -u user kwasm-ci-conformance-${GITHUB_SHA} make -j6 TEST_CONCRETE_BACKEND=llvm test-conformance-supported
- name: 'Tear down Docker'
if: always()
run: |
docker stop --time=0 kwasm-ci-conformance-${GITHUB_SHA}
prove-tests:
needs: [pykwasm-unit-tests, pykwasm-integration-tests]
name: 'Prover Tests'
runs-on: [self-hosted, linux, normal]
timeout-minutes: 18
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 Haskell Backend'
run: docker exec -u user kwasm-ci-prove-${GITHUB_SHA} make -j2 build-haskell
- name: 'Prove'
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}
32 changes: 0 additions & 32 deletions Jenkinsfile

This file was deleted.

0 comments on commit 46f7988

Please sign in to comment.