-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: run FreeBSD on a VM in github ci, instead of on the Cirrus servic…
…e (which stopped working today) (#23692)
- Loading branch information
Showing
6 changed files
with
146 additions
and
54 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: CI FreeBSD | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
paths-ignore: | ||
- '**.md' | ||
- '**.yml' | ||
- 'cmd/tools/**' | ||
- '!**/freebsd_ci.yml' | ||
- '!ci/freebsd_ci.vsh' | ||
- '!cmd/tools/builders/**.v' | ||
pull_request: | ||
paths-ignore: | ||
- '**.md' | ||
- '**.yml' | ||
- 'cmd/tools/**' | ||
- '!**/freebsd_ci.yml' | ||
- '!ci/freebsd_ci.vsh' | ||
- '!cmd/tools/builders/**.v' | ||
|
||
### See https://github.com/vmactions/freebsd-vm | ||
### for a description of the used fields here | ||
|
||
jobs: | ||
test-on-freebsd-14-2-x86: | ||
runs-on: ubuntu-latest | ||
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 | ||
with: | ||
release: '14.2' | ||
mem: 4096 | ||
usesh: true | ||
copyback: false | ||
prepare: pkg install -y git sqlite3 bash | ||
run: | | ||
git config --global --add safe.directory /home/runner/work/v/v | ||
make CFLAGS= | ||
./v symlink | ||
./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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import os | ||
import common { Task, exec } | ||
|
||
fn v_doctor() { | ||
dump(os.getenv('PATH')) | ||
exec('v doctor') | ||
if common.is_github_job { | ||
exec('freebsd-version') | ||
exec('sysctl hw.model') | ||
exec('sysctl hw.ncpu') | ||
exec('sysctl hw.physmem') | ||
exec('sysctl hw.usermem') | ||
exec('whoami') | ||
exec('pwd') | ||
exec('ls -la') | ||
exec('git log -n1') | ||
exec('cc --version') | ||
} | ||
} | ||
|
||
fn verify_v_test_works() { | ||
exec('echo \$VFLAGS') | ||
exec('v cmd/tools/test_if_v_test_system_works.v') | ||
exec('./cmd/tools/test_if_v_test_system_works') | ||
} | ||
|
||
fn build_fast_script() { | ||
exec('cd cmd/tools/fast && v fast.v') | ||
} | ||
|
||
fn check_math() { | ||
exec('v test vlib/math') | ||
println('Test the math module, using only the pure V versions,') | ||
println(' without the .c.v overrides.') | ||
exec('v -exclude @vlib/math/*.c.v test vlib/math') | ||
} | ||
|
||
fn check_compress() { | ||
exec('v test vlib/compress') | ||
} | ||
|
||
fn run_essential_tests() { | ||
if common.is_github_job { | ||
exec('VTEST_JUST_ESSENTIAL=1 v test-self') | ||
} else { | ||
exec('VTEST_JUST_ESSENTIAL=1 v -progress test-self') | ||
} | ||
} | ||
|
||
const all_tasks = { | ||
'v_doctor': Task{v_doctor, 'Run v doctor'} | ||
'verify_v_test_works': Task{verify_v_test_works, 'Verify that v test works'} | ||
'build_fast_script': Task{build_fast_script, 'Check that building fast.v works'} | ||
'check_math': Task{check_math, 'Check the `math` module works'} | ||
'check_compress': Task{check_compress, 'Check the `compress` module works'} | ||
'run_essential_tests': Task{run_essential_tests, 'Run only the essential tests'} | ||
} | ||
|
||
common.run(all_tasks) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters