diff --git a/.cirrus.yml b/.cirrus.yml index bd92ef4cfd..47c3f501f8 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -488,35 +488,35 @@ osx_alt_build_task: task_cleanup_script: *mac_cleanup # Build freebsd release natively on a FreeBSD VM. -#freebsd_alt_build_task: -# name: "FreeBSD Cross" -# alias: freebsd_alt_build -# # Only run on 'main' and PRs against 'main' -# # Docs: ./contrib/cirrus/CIModes.md -# only_if: | -# $CIRRUS_CHANGE_TITLE !=~ '.*CI:MACHINE.*' && -# ( $CIRRUS_BRANCH == 'main' || $CIRRUS_BASE_BRANCH == 'main' ) -# depends_on: -# - build -# env: -# <<: *stdenvars -# # Functional FreeBSD builds must be built natively since they depend on CGO -# DISTRO_NV: freebsd-13 -# VM_IMAGE_NAME: notyet -# CTR_FQIN: notyet -# CIRRUS_SHELL: "/bin/sh" -# TEST_FLAVOR: "altbuild" -# ALT_NAME: 'FreeBSD Cross' -# freebsd_instance: -# image_family: freebsd-13-2 -# setup_script: -# - pkg install -y gpgme bash go-md2man gmake gsed gnugrep go pkgconf -# build_amd64_script: -# - gmake podman-release -# # This task cannot make use of the shared repo.tbz artifact and must -# # produce a new repo.tbz artifact for consumption by 'artifacts' task. -# repo_prep_script: *repo_prep -# repo_artifacts: *repo_artifacts +freebsd_alt_build_task: + name: "FreeBSD Cross" + alias: freebsd_alt_build + # Only run on 'main' and PRs against 'main' + # Docs: ./contrib/cirrus/CIModes.md + only_if: | + $CIRRUS_CHANGE_TITLE !=~ '.*CI:MACHINE.*' && + ( $CIRRUS_BRANCH == 'main' || $CIRRUS_BASE_BRANCH == 'main' ) + depends_on: + - build + env: + <<: *stdenvars + # Functional FreeBSD builds must be built natively since they depend on CGO + DISTRO_NV: freebsd-13 + VM_IMAGE_NAME: notyet + CTR_FQIN: notyet + CIRRUS_SHELL: "/bin/sh" + TEST_FLAVOR: "altbuild" + ALT_NAME: 'FreeBSD Cross' + freebsd_instance: + image_family: freebsd-13-2 + setup_script: + - pkg install -y gpgme bash go-md2man gmake gsed gnugrep go pkgconf + build_amd64_script: + - gmake podman-release + # This task cannot make use of the shared repo.tbz artifact and must + # produce a new repo.tbz artifact for consumption by 'artifacts' task. + repo_prep_script: *repo_prep + repo_artifacts: *repo_artifacts # Verify podman is compatible with the docker python-module. @@ -1076,7 +1076,7 @@ success_task: - swagger - alt_build - osx_alt_build - #- freebsd_alt_build + - freebsd_alt_build #- win_installer - docker-py_test - unit_test diff --git a/pkg/machine/qemu/options_freebsd_amd64.go b/pkg/machine/qemu/options_freebsd_amd64.go index 10db185106..f3db574485 100644 --- a/pkg/machine/qemu/options_freebsd_amd64.go +++ b/pkg/machine/qemu/options_freebsd_amd64.go @@ -4,15 +4,7 @@ var ( QemuCommand = "qemu-system-x86_64" ) -func (v *MachineVM) addArchOptions(_ *setNewMachineCMDOpts) []string { +func (v *QEMUStubber) addArchOptions(_ *setNewMachineCMDOpts) []string { opts := []string{"-machine", "q35,accel=hvf:tcg", "-cpu", "host"} return opts } - -func (v *MachineVM) prepare() error { - return nil -} - -func (v *MachineVM) archRemovalFiles() []string { - return []string{} -} diff --git a/pkg/machine/qemu/options_freebsd_arm64.go b/pkg/machine/qemu/options_freebsd_arm64.go index e5ab376e9a..c3192e0b35 100644 --- a/pkg/machine/qemu/options_freebsd_arm64.go +++ b/pkg/machine/qemu/options_freebsd_arm64.go @@ -4,18 +4,10 @@ var ( QemuCommand = "qemu-system-aarch64" ) -func (v *MachineVM) addArchOptions(_ *setNewMachineCMDOpts) []string { +func (v *QEMUStubber) addArchOptions(_ *setNewMachineCMDOpts) []string { opts := []string{ "-machine", "virt", "-accel", "tcg", "-cpu", "host"} return opts } - -func (v *MachineVM) prepare() error { - return nil -} - -func (v *MachineVM) archRemovalFiles() []string { - return []string{} -} diff --git a/pkg/machine/vmconfigs/config_linux.go b/pkg/machine/vmconfigs/config_common.go similarity index 94% rename from pkg/machine/vmconfigs/config_linux.go rename to pkg/machine/vmconfigs/config_common.go index 6f85c5f170..be885579c5 100644 --- a/pkg/machine/vmconfigs/config_linux.go +++ b/pkg/machine/vmconfigs/config_common.go @@ -1,3 +1,5 @@ +//go:build linux || freebsd + package vmconfigs import ( diff --git a/pkg/machine/vmconfigs/config_freebsd.go b/pkg/machine/vmconfigs/config_freebsd.go deleted file mode 100644 index f5f17512af..0000000000 --- a/pkg/machine/vmconfigs/config_freebsd.go +++ /dev/null @@ -1,13 +0,0 @@ -package vmconfigs - -import "os" - -// Stubs -type HyperVConfig struct{} -type WSLConfig struct{} -type QEMUConfig struct{} -type AppleHVConfig struct{} - -func getHostUID() int { - return os.Getuid() -}