-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GitHub CI and fix test runner bugs
- Loading branch information
1 parent
606924e
commit ae05782
Showing
5 changed files
with
84 additions
and
9 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,70 @@ | ||
name: ci | ||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
env: | ||
TMPDIR: /tmp | ||
CI_MAX_KERNEL_VERSION: '6.7' | ||
CI_MIN_CLANG_VERSION: '11' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
name: Build and Lint | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup Java 21 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '21' | ||
|
||
- name: mvn package | ||
run: mvn package | ||
|
||
- name: upload bcc/target/bcc.jar | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: bcc.jar | ||
path: bcc/target/bcc.jar | ||
|
||
vm-test: | ||
name: Run tests on pre-built kernel | ||
runs-on: ubuntu-latest-4cores-16gb | ||
needs: build-and-lint | ||
timeout-minutes: 10 | ||
strategy: | ||
matrix: | ||
version: ["6.6", "6.1"] | ||
env: | ||
KERNEL_VERSION: "${{ matrix.version }}" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Java | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '21' | ||
|
||
- run: sudo pip3 install https://github.com/amluto/virtme/archive/beb85146cd91de37ae455eccb6ab67c393e6e290.zip | ||
- run: sudo apt-get update && sudo apt-get install -y --no-install-recommends qemu-system-x86 | ||
|
||
- name: Test | ||
run: mvn test -Djvm=testutil/bin/jvm | ||
env: | ||
HBT_KERNEL_VERSION: ${{ matrix.KERNEL_VERSION }} | ||
|
||
- name: Publish Test Report | ||
uses: mikepenz/action-junit-report@v4 | ||
if: always() | ||
with: | ||
check_name: 'Test Report (Kernel ${{ matrix.KERNEL_VERSION }})' | ||
report_paths: '**/build/test-results/test/TEST-*.xml' |
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
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