From d78ba721c0aabf5efa68d92ecbb229b5a8b1b3d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kr=C3=B6ning?= Date: Fri, 16 Feb 2024 15:31:04 +0100 Subject: [PATCH 1/3] ci: enable fail-fast again MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Kröning --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0e3a8dbbbc..93b04d6863 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -124,7 +124,6 @@ jobs: run: working-directory: kernel strategy: - fail-fast: false matrix: arch: [x86_64, aarch64, riscv64] package: [rusty_demo, httpd, testudp, hello_world, miotcp, mioudp] From c319887deed99960494d589e79d959fe6fbf1f84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kr=C3=B6ning?= Date: Fri, 16 Feb 2024 17:09:30 +0100 Subject: [PATCH 2/3] ci: don't install socat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Kröning --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 93b04d6863..94278a6f14 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -173,7 +173,7 @@ jobs: netdev: none include: - arch: x86_64 - packages: qemu-system-x86 libcap-ng-dev libseccomp-dev socat + packages: qemu-system-x86 libcap-ng-dev libseccomp-dev - arch: aarch64 packages: qemu-system-aarch64 - arch: riscv64 From 6806edce3d378713a48c5c43c12808855f965cca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kr=C3=B6ning?= Date: Fri, 16 Feb 2024 15:50:07 +0100 Subject: [PATCH 3/3] ci: reduce amount of jobs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Kröning --- .github/workflows/ci.yml | 108 ++++++++++++--------------------------- 1 file changed, 32 insertions(+), 76 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 94278a6f14..ee77e89458 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -126,77 +126,18 @@ 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 + flags: --features pci-ids - arch: aarch64 packages: qemu-system-aarch64 + flags: --features pci-ids - arch: riscv64 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 @@ -221,7 +162,7 @@ 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 @@ -229,23 +170,38 @@ jobs: - 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' }} 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 }} + if: ${{ matrix.arch == 'x86_64' }} + - run: cargo xtask ci qemu --arch ${{ matrix.arch }} --profile ${{ matrix.profile }} ${{ matrix.flags }} --package hello_world + - run: cargo xtask ci qemu --arch ${{ matrix.arch }} --profile ${{ matrix.profile }} ${{ matrix.flags }} --package hello_world --no-default-features --microvm + if: ${{ matrix.arch == 'x86_64' }} + - run: cargo xtask ci qemu --arch ${{ matrix.arch }} --profile ${{ matrix.profile }} ${{ matrix.flags }} --package rusty_demo --virtiofsd + if: ${{ matrix.arch == 'x86_64' }} + - run: cargo xtask ci qemu --arch ${{ matrix.arch }} --profile ${{ matrix.profile }} ${{ matrix.flags }} --package rusty_demo --smp 4 --virtiofsd + if: ${{ matrix.arch == 'x86_64' }} + - run: cargo xtask ci qemu --arch ${{ matrix.arch }} --profile ${{ matrix.profile }} ${{ matrix.flags }} --package rusty_demo + - run: cargo xtask ci qemu --arch ${{ matrix.arch }} --profile ${{ matrix.profile }} ${{ matrix.flags }} --package rusty_demo --smp 4 + # https://github.com/hermit-os/kernel/issues/737 + if: ${{ matrix.arch != 'aarch64' }} + - run: cargo xtask ci qemu --arch ${{ matrix.arch }} --profile ${{ matrix.profile }} ${{ matrix.flags }} --package httpd --features ci,dhcpv4 --netdev virtio-net-pci + if: ${{ matrix.arch != 'riscv64' }} + - run: cargo xtask ci qemu --arch ${{ matrix.arch }} --profile ${{ matrix.profile }} ${{ matrix.flags }} --package httpd --features ci,dhcpv4 --netdev rtl8139 --features rtl8139 + if: ${{ matrix.arch == 'x86_64' }} + - run: cargo xtask ci qemu --arch ${{ matrix.arch }} --profile ${{ matrix.profile }} ${{ matrix.flags }} --package testudp --features udp,dhcpv4 --netdev virtio-net-pci + if: ${{ matrix.arch != 'riscv64' }} + - run: cargo xtask ci qemu --arch ${{ matrix.arch }} --profile ${{ matrix.profile }} ${{ matrix.flags }} --package testudp --features udp,dhcpv4 --netdev rtl8139 --features rtl8139 + if: ${{ matrix.arch == 'x86_64' }} + - run: cargo xtask ci qemu --arch ${{ matrix.arch }} --profile ${{ matrix.profile }} ${{ matrix.flags }} --package miotcp --features dhcpv4 --netdev virtio-net-pci + if: ${{ matrix.arch != 'riscv64' }} + - run: cargo xtask ci qemu --arch ${{ matrix.arch }} --profile ${{ matrix.profile }} ${{ matrix.flags }} --package miotcp --features dhcpv4 --netdev rtl8139 --features rtl8139 + if: ${{ matrix.arch == 'x86_64' }} + - run: cargo xtask ci qemu --arch ${{ matrix.arch }} --profile ${{ matrix.profile }} ${{ matrix.flags }} --package mioudp --features udp,dhcpv4 --netdev virtio-net-pci + if: ${{ matrix.arch != 'riscv64' }} + - run: cargo xtask ci qemu --arch ${{ matrix.arch }} --profile ${{ matrix.profile }} ${{ matrix.flags }} --package mioudp --features udp,dhcpv4 --netdev rtl8139 --features rtl8139 + if: ${{ matrix.arch == 'x86_64' }} run-x86_64-kvm: - name: Run Hermit for Rust (x86_64 + kvm) + name: Run (x86_64, kvm) runs-on: [self-hosted] defaults: run: