From ee8ea233866a89c95bec073528a6449d3f0b0565 Mon Sep 17 00:00:00 2001 From: iphydf Date: Wed, 22 Nov 2023 21:28:18 +0000 Subject: [PATCH] perf: Add a KVM FreeBSD build. This uses nested virtualization to improve FreeBSD test times. --- .github/workflows/ci.yml | 19 +++++++++++++++++++ other/docker/freebsd/Dockerfile | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f0c169a0130..5ad90cacaa5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -110,6 +110,25 @@ jobs: with: file: other/docker/freebsd/Dockerfile + build-freebsd-kvm: + runs-on: ubuntu-latest + steps: + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - name: Checkout code + uses: actions/checkout@v3 + - name: Change RUN to CMD + run: sed -i -e 's/^RUN/CMD/' other/docker/freebsd/Dockerfile + - name: Docker Build + uses: docker/build-push-action@v2 + with: + context: "." + file: other/docker/freebsd/Dockerfile + tags: toxchat/c-toxcore:freebsd + load: true + - name: Run build + run: docker run --name toxcore-freebsd --device /dev/kvm --rm -it toxchat/c-toxcore:freebsd + cimplefmt: runs-on: ubuntu-latest steps: diff --git a/other/docker/freebsd/Dockerfile b/other/docker/freebsd/Dockerfile index 6e933d0fbcf..a3115761557 100644 --- a/other/docker/freebsd/Dockerfile +++ b/other/docker/freebsd/Dockerfile @@ -3,4 +3,4 @@ FROM toxchat/freebsd:latest WORKDIR /work/c-toxcore COPY . /work/c-toxcore/ -RUN .github/scripts/cmake-freebsd +CMD [".github/scripts/cmake-freebsd"]