Skip to content

Use test plugin list for jnode validation. #109

Use test plugin list for jnode validation.

Use test plugin list for jnode validation. #109

Workflow file for this run

# This workflow will build a Java project with Ant
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-ant
name: Java CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'zulu'
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y nasm qemu-system-x86
- name: Build and run tests
run: |
./build.sh clean -Dbuild.properties.file=../.github/qemu/jnode.properties cd-x86-lite regression-tests
./test.sh all
continue-on-error: true
- name: Publish Test Summary
uses: test-summary/action@v2
with:
paths: '**/build/reports/junit/*.xml'
show: 'all'
if: always()
- name: Upload Test Results
uses: actions/upload-artifact@v4
with:
name: jnode_test_results.zip
path: |
**/build/reports/junit/
/tmp/com1.txt
if: always()
- name: Run QEMU Boot Test
run: |
echo "Starting JNode in QEMU"
rm -f /tmp/com1.txt
touch /tmp/com1.txt
qemu-system-x86_64 -cdrom ./all/build/cdroms/jnode-x86-lite.iso -m 1024 -M pc -cpu pentium -boot once=d,menu=off -net none -serial file:/tmp/com1.txt -display none &
qemu_pid=$!
sleep 1
tail -f /tmp/com1.txt &
tail_pid=$!
# Wait for "System has finished" using a timeout so it doesn't hang indefinitely
timeout 120s bash -c 'until grep -q -i "System has finished" /tmp/com1.txt; do sleep 1; done' || {
echo "Boot failed or timed out!"
cat /tmp/com1.txt
kill $qemu_pid $tail_pid || true
exit 1
}
echo "Successfully booted JNode!"
kill $qemu_pid $tail_pid || true
if: always()