-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename CI tests to minimal/extended tests (#1073)
This PR refactors the CI workflows for #935, and run some OpenJDK tests as minimal tests.
- Loading branch information
Showing
6 changed files
with
119 additions
and
49 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Run OpenJDK tests | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
repo: | ||
type: string | ||
required: true | ||
ref: | ||
type: string | ||
required: true | ||
test-script: | ||
type: string | ||
required: true | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout MMTk Core | ||
uses: actions/checkout@v2 | ||
with: | ||
path: mmtk-core | ||
- name: Checkout OpenJDK Binding | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: ${{ inputs.repo }} | ||
path: mmtk-openjdk | ||
ref: ${{ inputs.ref }} | ||
- name: Use mmtk-core Rust toolchain for bindings | ||
run: | | ||
cp mmtk-core/rust-toolchain mmtk-openjdk/mmtk | ||
- name: Setup | ||
run: | | ||
cd mmtk-openjdk | ||
./.github/scripts/ci-checkout.sh | ||
./.github/scripts/ci-setup.sh | ||
sed -i 's/^mmtk[[:space:]]=/#ci:mmtk=/g' mmtk/Cargo.toml | ||
sed -i 's/^#[[:space:]]mmtk/mmtk/g' mmtk/Cargo.toml | ||
- name: Overwrite MMTk core in openjdk binding | ||
run: | | ||
cp -r mmtk-core mmtk-openjdk/repos/ | ||
- name: Test | ||
run: | | ||
cd mmtk-openjdk | ||
export RUST_BACKTRACE=1 | ||
./.github/scripts/${{ inputs.test-script }} |
This file contains 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 file contains 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 file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Minimal tests - bindings | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
merge_group: | ||
branches: | ||
- master | ||
|
||
concurrency: | ||
# Cancels pending runs when a PR gets updated. | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
# The workflow will be triggered once a PR is opened, and at that point, we do not have chance to specify which binding repo to use. | ||
# This step allows 2mins before we check comments for binding repos/refs. | ||
grace-period: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: sleep 120 | ||
|
||
# Figure out binding PRs. | ||
binding-refs: | ||
needs: grace-period | ||
uses: ./.github/workflows/pr-binding-refs.yml | ||
with: | ||
pull_request: ${{ github.event.pull_request.number }} | ||
|
||
minimal-tests-openjdk: | ||
needs: binding-refs | ||
uses: ./.github/workflows/binding-tests-openjdk.yml | ||
with: | ||
repo: ${{ needs.binding-refs.outputs.openjdk_binding_repo }} | ||
ref: ${{ needs.binding-refs.outputs.openjdk_binding_ref }} | ||
test-script: ci-test-minimal.sh |
This file contains 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 file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Continuous Integration | ||
|
||
## Testing | ||
|
||
MMTK core runs CI tests *before* a pull request is merged. | ||
|
||
MMTk core sets up two sets of tests, the *minimal tests* and the *extended tests*. | ||
* Minimal tests run unconditionally for every pull request and for every commit. This set of tests aims to finish within half an hour. | ||
This include tests from the `mmtk-core` repo and integration tests from binding repos. Integration tests with a binding in the minimal tests should | ||
focus on testing MMTk core features that is exclusively used for the binding. | ||
* Extended tests only run for a pull request if the pull request is tagged with the label `PR-extended-testing`. This set of tests | ||
may take hours, and usually include integration tests with bindings which run the language implementation's standard test suite | ||
as much as possible. |