Skip to content

Example: Test that compute time by compiling a Kernel

Use this sample to test the raw compute speed of your hosts by building a Kernel.

Certified for:

  • x86_64

Use a private repository if you're not using actuated yet

GitHub recommends using a private repository with self-hosted runners because changes can be left over from a previous run, even when using Actions Runtime Controller. Actuated uses an ephemeral VM with an immutable image, so can be used on both public and private repos. Learn why in the FAQ.

Try out the action on your agent

Create a new file at: .github/workflows/build.yml and commit it to the repository.

name: microvm-kernel

on: push
    runs-on: actuated
      - name: free RAM
        run: free -h
      - name: List CPUs
        run: nproc
      - name: get build toolchain
        run: |
          sudo apt update -qy
          sudo apt-get install -qy \
            git \
            build-essential \
            kernel-package \
            fakeroot \
            libncurses5-dev \
            libssl-dev \
            ccache \
            bison \
            flex \
            libelf-dev \
      - name: clone linux
        run: |
          time git clone linux.git --depth=1 --branch v5.10
          cd linux.git
          curl -o .config -s -f
          echo "# CONFIG_KASAN is not set" >> .config
      - name: make config
        run: |
          cd linux.git 
          make oldconfig
      - name: Make vmlinux
        run: |
          cd linux.git
          time make vmlinux -j$(nproc)
          du -h ./vmlinux

When you have a build time, why not change runs-on: actuated to runs-on: ubuntu-latest to compare it to a hosted runner from GitHub?

Here's our test, where our own machine built the Kernel 4x faster than a hosted runner:

Faster Kernel builds