Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Kröning <[email protected]>
  • Loading branch information
mkroening committed Feb 16, 2024
1 parent d78ba72 commit ed4949c
Showing 1 changed file with 15 additions and 75 deletions.
90 changes: 15 additions & 75 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,51 +126,7 @@ jobs:
strategy:
matrix:
arch: [x86_64, aarch64, riscv64]
package: [rusty_demo, httpd, testudp, hello_world, miotcp, mioudp]
netdev: [none, virtio-net-pci, rtl8139]
profile: [dev, release]
smp: [1, 4]
exclude:
- arch: riscv64
package: httpd
- arch: riscv64
package: testudp
- arch: riscv64
package: mioudp
- arch: riscv64
package: miotcp
# microvm (Firecracker) test does not run on aarch64 or riscv64
- package: hello_world
arch: aarch64
- package: hello_world
arch: riscv64
# https://github.com/hermit-os/kernel/issues/995
- package: hello_world
smp: 4
# https://github.com/hermit-os/kernel/issues/737
- arch: aarch64
smp: 4
# rtl8139 support does not build on aarch64
- arch: aarch64
netdev: rtl8139
# Following packages do not depend on the netdev
- package: rusty_demo
netdev: virtio-net-pci
- package: rusty_demo
netdev: rtl8139
- package: hello_world
netdev: virtio-net-pci
- package: hello_world
netdev: rtl8139
# Following packages require a netdev
- package: httpd
netdev: none
- package: testudp
netdev: none
- package: miotcp
netdev: none
- package: mioudp
netdev: none
include:
- arch: x86_64
packages: qemu-system-x86 libcap-ng-dev libseccomp-dev socat
Expand All @@ -180,23 +136,6 @@ jobs:
packages: qemu-system-misc
flags: --no-default-features

- arch: x86_64
package: rusty_demo
flags: --features pci-ids --virtiofsd
- arch: aarch64
package: rusty_demo
flags: --features pci-ids
- package: httpd
flags: --features ci,dhcpv4
- package: testudp
flags: --features udp,dhcpv4
- package: miotcp
flags: --features dhcpv4
- package: mioudp
flags: --features udp,dhcpv4
- package: hello_world
flags: --no-default-features --microvm

steps:
- name: Checkout hermit-rs
uses: actions/checkout@v4
Expand All @@ -221,28 +160,29 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.arch }}-${{ matrix.profile }}
save-if: ${{ github.ref == 'refs/heads/main' && matrix.package == 'rusty_demo' }}
save-if: ${{ github.ref == 'refs/heads/main' }}
workspaces: |
.
kernel
kernel/hermit-builtins
- name: Download loader
run: gh release download --repo hermit-os/loader --pattern hermit-loader-${{ matrix.arch }}
- name: Install virtiofsd
if: ${{ matrix.arch == 'x86_64' && matrix.package == 'rusty_demo' }}
if: ${{ matrix.arch == 'x86_64' }}
run: cargo install --locked virtiofsd
- name: Run VM
# cargo accepts multiple 'features' flags
# The '… && … || …' expression is like a ternary operator
run: >
cargo xtask ci qemu
--arch ${{ matrix.arch }}
--package ${{ matrix.package }}
--smp ${{ matrix.smp }}
${{ matrix.flags }}
${{ matrix.netdev == 'rtl8139' && '--features rtl8139' || '' }}
${{ matrix.netdev != 'none' && format('--netdev {0}', matrix.netdev) || '' }}
--profile ${{ matrix.profile }}
- run: cargo xtask ci qemu --arch ${{ matrix.arch }} --profile ${{ matrix.profile }} --package hello_world
- run: cargo xtask ci qemu --arch ${{ matrix.arch }} --profile ${{ matrix.profile }} --package hello_world --no-default-features --microvm
if: ${{ matrix.arch == 'x86_64' }}
- run: cargo xtask ci qemu --arch ${{ matrix.arch }} --profile ${{ matrix.profile }} --package rusty_demo --virtiofsd
- run: cargo xtask ci qemu --arch ${{ matrix.arch }} --profile ${{ matrix.profile }} --package rusty_demo --smp 4 --virtiofsd
- run: cargo xtask ci qemu --arch ${{ matrix.arch }} --profile ${{ matrix.profile }} --package httpd --features ci,dhcpv4 --netdev virtio-net-pci
- run: cargo xtask ci qemu --arch ${{ matrix.arch }} --profile ${{ matrix.profile }} --package httpd --features ci,dhcpv4 --netdev rtl8139 --features rtl8139
- run: cargo xtask ci qemu --arch ${{ matrix.arch }} --profile ${{ matrix.profile }} --package testudp --features udp,dhcpv4 --netdev virtio-net-pci
- run: cargo xtask ci qemu --arch ${{ matrix.arch }} --profile ${{ matrix.profile }} --package testudp --features udp,dhcpv4 --netdev rtl8139 --features rtl8139
- run: cargo xtask ci qemu --arch ${{ matrix.arch }} --profile ${{ matrix.profile }} --package miotcp --features dhcpv4 --netdev virtio-net-pci
- run: cargo xtask ci qemu --arch ${{ matrix.arch }} --profile ${{ matrix.profile }} --package miotcp --features dhcpv4 --netdev rtl8139 --features rtl8139
- run: cargo xtask ci qemu --arch ${{ matrix.arch }} --profile ${{ matrix.profile }} --package mioucp --features udp,dhcpv4 --netdev virtio-net-pci
- run: cargo xtask ci qemu --arch ${{ matrix.arch }} --profile ${{ matrix.profile }} --package mioucp --features udp,dhcpv4 --netdev rtl8139 --features rtl8139

run-x86_64-kvm:
name: Run Hermit for Rust (x86_64 + kvm)
Expand Down

0 comments on commit ed4949c

Please sign in to comment.