-
Notifications
You must be signed in to change notification settings - Fork 17
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 f72144c
Showing
6 changed files
with
92 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,73 @@ | ||
name: ci | ||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Java 21 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '21' | ||
distribution: 'adopt' | ||
|
||
- name: mvn package | ||
run: mvn package -DskipTests | ||
|
||
- name: upload bcc/target/bcc.jar | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: bcc.jar | ||
path: bcc/target/bcc.jar | ||
|
||
vm-test: | ||
name: Run tests on pre-built kernel | ||
runs-on: ubuntu-22.04 | ||
needs: build | ||
timeout-minutes: 10 | ||
strategy: | ||
matrix: | ||
version: ["6.6"] | ||
env: | ||
HBT_KERNEL_VERSION: "${{ matrix.version }}" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Java | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '21' | ||
distribution: 'adopt' | ||
|
||
- 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 | ||
sudo apt-key adv -y --keyserver keyserver.ubuntu.com --recv-keys 4052245BD4284CDD | ||
echo "deb https://repo.iovisor.org/apt/$(lsb_release -cs) $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/iovisor.list | ||
sudo apt-get -y update | ||
sudo apt-get -y install bcc-tools libbcc-examples | ||
- name: Find libbcc.so | ||
run: | | ||
find / -name libbcc.so | ||
- name: Test | ||
run: mvn test -Djvm=testutil/bin/java | ||
|
||
- 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
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