From 099b57f1d0ff7ae1de7c6787bd739083d9b330d6 Mon Sep 17 00:00:00 2001 From: Laurent Cheylus Date: Sun, 15 Jun 2025 19:26:50 +0200 Subject: [PATCH] ci: update and improve FreeBSD CI (#24726) --- .github/workflows/freebsd_ci.yml | 106 ++++++++++++++++++++----------- 1 file changed, 69 insertions(+), 37 deletions(-) diff --git a/.github/workflows/freebsd_ci.yml b/.github/workflows/freebsd_ci.yml index 2d888584df..c2ae855ff2 100644 --- a/.github/workflows/freebsd_ci.yml +++ b/.github/workflows/freebsd_ci.yml @@ -19,52 +19,84 @@ on: - '!ci/freebsd_ci.vsh' - '!cmd/tools/builders/**.v' -### See https://github.com/vmactions/freebsd-vm +### See https://github.com/cross-platform-actions/action ### for a description of the used fields here jobs: - test-on-freebsd-14-2-x86: + tcc-freebsd: runs-on: ubuntu-latest timeout-minutes: 20 - name: Run a FreeBSD 14.2 x86 VM steps: - uses: actions/checkout@v4 - - name: Test in FreeBSD - id: test-freebsd-14-2-runs-in-vm - uses: vmactions/freebsd-vm@v1 + - name: Tests on FreeBSD with tcc + id: tests-freebsd-tcc + uses: cross-platform-actions/action@v0.28.0 with: - release: '14.2' - mem: 4096 - usesh: true - copyback: false - prepare: pkg install -y git sqlite3 bash + operating_system: freebsd + version: '14.2' + memory: 4G + shell: sh + sync_files: runner-to-vm run: | + sudo pkg install -y git sqlite3 gmake boehm-gc-threaded libiconv + # Mandatory: hostname not set in VM => some tests fail + sudo hostname -s freebsd-ci + echo "### OS infos" + uname -a git config --global --add safe.directory . - make CFLAGS= - ./v symlink + gmake + sudo ./v symlink + export VFLAGS='-cc tcc -no-retry-compilation' ./v run ci/freebsd_ci.vsh all -##### Run a FreeBSD 14 x86 VM: -##### [ 2/25] C: 808.5 ms, R: 3.835 ms vlib/math/big/array_ops_test.v -##### Run a FreeBSD 15 ARM VM -##### [ 1/25] C: 15992.4 ms, R: 146.582 ms vlib/math/big/array_ops_test.v -##### => the overhead is too much to be practical for the full test suite. -##### It is still nice, that it works at all though ... -## test-on-freebsd-15-aarch64: -## runs-on: ubuntu-latest -## name: Run a FreeBSD 15 ARM VM -## steps: -## - uses: actions/checkout@v4 -## - name: Test in FreeBSD -## id: test-freebsd-15-runs-in-vm -## uses: vmactions/freebsd-vm@v1 -## with: -## release: "15.0" -## arch: aarch64 -## ## cpu: 3 -## mem: 4096 -## usesh: true -## copyback: false -## prepare: pkg install -y git sqlite3 bash -## run: | -## ./.github/workflows/freebsd_ci.sh + clang-freebsd: + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - uses: actions/checkout@v4 + - name: Tests on FreeBSD with clang + id: tests-freebsd-clang + uses: cross-platform-actions/action@v0.28.0 + with: + operating_system: freebsd + version: '14.2' + memory: 4G + shell: sh + sync_files: runner-to-vm + run: | + sudo pkg install -y git sqlite3 gmake boehm-gc-threaded libiconv + # Mandatory: hostname not set in VM => some tests fail + sudo hostname -s freebsd-ci + echo "### OS infos" + uname -a + git config --global --add safe.directory . + gmake + sudo ./v symlink + export VFLAGS='-cc clang' + ./v run ci/freebsd_ci.vsh all + + gcc-freebsd: + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - uses: actions/checkout@v4 + - name: Tests on FreeBSD with gcc + id: tests-freebsd-gcc + uses: cross-platform-actions/action@v0.28.0 + with: + operating_system: freebsd + version: '14.2' + memory: 4G + shell: sh + sync_files: runner-to-vm + run: | + sudo pkg install -y git sqlite3 gmake boehm-gc-threaded libiconv gcc + # Mandatory: hostname not set in VM => some tests fail + sudo hostname -s freebsd-ci + echo "### OS infos" + uname -a + git config --global --add safe.directory . + gmake + sudo ./v symlink + export VFLAGS='-cc gcc' + ./v run ci/freebsd_ci.vsh all