cmake(ci): Rework Vagrantfile

ci: Rework BSD workflows
ci: Bump freebsd Vagrantfile from python 3.9 to 3.11
This commit is contained in:
Corentin Le Molgat
2025-06-30 09:59:26 +02:00
parent 94308a9fe6
commit b644c5fb1e
10 changed files with 81 additions and 43 deletions

View File

@@ -1,3 +1,4 @@
# ref: https://github.com/actions/runner-images
name: amd64 FreeBSD CMake
on: [push, pull_request, workflow_dispatch]
@@ -6,31 +7,44 @@ concurrency:
group: ${{github.workflow}}-${{github.ref}}
cancel-in-progress: true
# Only macos-12 runner provide virtualisation with vagrant/virtualbox installed.
# ref: https://github.com/actions/runner-images/tree/main/images/macos
# ref: https://app.vagrantup.com/generic/boxes/freebsd13
# Building using the github runner environement directly.
jobs:
vagrant:
strategy:
fail-fast: false
matrix:
distro: [freebsd]
lang: [cpp, python]
allow_failure: [false]
include:
- distro: freebsd
lang: dotnet
allow_failure: true
- distro: freebsd
lang: java
allow_failure: true
name: amd64•FreeBSD•CMake•${{matrix.lang}}
runs-on: macos-12
distro: [
freebsd,
#netbsd,
#openbsd,
]
lang: [
cpp,
dotnet,
java,
python,
]
allow_failure: [true]
fail-fast: false
name: amd64•${{matrix.distro}}•CMake•${{matrix.lang}}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: vagrant version
run: Vagrant --version
- name: VirtualBox version
run: virtualbox -h
- name: Virtualbox install
run: |
sudo apt update -q
sudo apt install -yq virtualbox
virtualbox --help
- name: Vagrant install
run: |
sudo apt update -q
wget https://releases.hashicorp.com/vagrant/2.4.7/vagrant_2.4.7-1_amd64.deb
sudo apt install -y ./vagrant_2.4.7-1_amd64.deb
vagrant --version
- name: Build
run: make --directory=cmake ${{matrix.distro}}_${{matrix.lang}}
amd64_bsd_cmake:
runs-on: ubuntu-latest
needs: vagrant
steps:
- uses: actions/checkout@v4

View File

@@ -803,4 +803,4 @@ clean: clean_all clean_platforms clean_toolchains clean_web clean_vagrant clean_
distclean: clean
-docker container rm -f $$(docker container ls -aq)
-docker image rm -f $$(docker image ls -aq)
-vagrant box remove -f generic/freebsd12
-vagrant box remove -f generic/freebsd14

View File

@@ -14,6 +14,7 @@ Vagrant.configure("2") do |config|
# boxes at https://vagrantcloud.com/search.
config.vm.guest = :freebsd
config.vm.box = "generic/freebsd14"
config.vm.box_version = "4.3.12"
config.vm.provider "virtualbox" do |v|
v.name = "ortools_freebsd_cpp"
end
@@ -48,9 +49,14 @@ Vagrant.configure("2") do |config|
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
#config.vm.synced_folder "../../..", "/home/vagrant/project"
config.vm.synced_folder ".", "/vagrant", id: "vagrant-root", disabled: true
# config.vm.synced_folder "../data", "/vagrant_data"
# Disable the default share of the current code directory. Doing this
# provides improved isolation between the vagrant box and your host
# by making sure your Vagrantfile isn't accessible to the vagrant box.
# If you use this you may want to enable additional shared subfolders as
# shown above.
config.vm.synced_folder ".", "/vagrant", disabled: true
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.

View File

@@ -14,6 +14,7 @@ Vagrant.configure("2") do |config|
# boxes at https://vagrantcloud.com/search.
config.vm.guest = :freebsd
config.vm.box = "generic/freebsd14"
config.vm.box_version = "4.3.12"
config.vm.provider "virtualbox" do |v|
v.name = "ortools_freebsd_dotnet"
end
@@ -48,9 +49,14 @@ Vagrant.configure("2") do |config|
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
#config.vm.synced_folder "../../..", "/home/vagrant/project"
config.vm.synced_folder ".", "/vagrant", id: "vagrant-root", disabled: true
# config.vm.synced_folder "../data", "/vagrant_data"
# Disable the default share of the current code directory. Doing this
# provides improved isolation between the vagrant box and your host
# by making sure your Vagrantfile isn't accessible to the vagrant box.
# If you use this you may want to enable additional shared subfolders as
# shown above.
config.vm.synced_folder ".", "/vagrant", disabled: true
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.

View File

@@ -14,6 +14,7 @@ Vagrant.configure("2") do |config|
# boxes at https://vagrantcloud.com/search.
config.vm.guest = :freebsd
config.vm.box = "generic/freebsd14"
config.vm.box_version = "4.3.12"
config.vm.provider "virtualbox" do |v|
v.name = "ortools_freebsd_java"
end
@@ -48,9 +49,14 @@ Vagrant.configure("2") do |config|
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
#config.vm.synced_folder "../../..", "/home/vagrant/project"
config.vm.synced_folder ".", "/vagrant", id: "vagrant-root", disabled: true
# config.vm.synced_folder "../data", "/vagrant_data"
# Disable the default share of the current code directory. Doing this
# provides improved isolation between the vagrant box and your host
# by making sure your Vagrantfile isn't accessible to the vagrant box.
# If you use this you may want to enable additional shared subfolders as
# shown above.
config.vm.synced_folder ".", "/vagrant", disabled: true
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.

View File

@@ -14,6 +14,7 @@ Vagrant.configure("2") do |config|
# boxes at https://vagrantcloud.com/search.
config.vm.guest = :freebsd
config.vm.box = "generic/freebsd14"
config.vm.box_version = "4.3.12"
config.vm.provider "virtualbox" do |v|
v.name = "ortools_freebsd_python"
end
@@ -48,9 +49,14 @@ Vagrant.configure("2") do |config|
# the path on the host to the actual folder. The second argument is
# the path on the guest to mount the folder. And the optional third
# argument is a set of non-required options.
#config.vm.synced_folder "../../..", "/home/vagrant/project"
config.vm.synced_folder ".", "/vagrant", id: "vagrant-root", disabled: true
# config.vm.synced_folder "../data", "/vagrant_data"
# Disable the default share of the current code directory. Doing this
# provides improved isolation between the vagrant box and your host
# by making sure your Vagrantfile isn't accessible to the vagrant box.
# If you use this you may want to enable additional shared subfolders as
# shown above.
config.vm.synced_folder ".", "/vagrant", disabled: true
# Provider-specific configuration so you can fine-tune various
# backing providers for Vagrant. These expose provider-specific options.
@@ -75,8 +81,8 @@ Vagrant.configure("2") do |config|
set -x
pkg update -f
pkg install -y git cmake
pkg install -y swig python39 py39-wheel py39-pip py39-pytest-virtualenv
pkg install -y py39-numpy py39-pandas py39-matplotlib
pkg install -y swig python311 py311-wheel py311-pip py311-pytest-virtualenv
pkg install -y py311-numpy py311-pandas py311-matplotlib
SHELL
config.vm.provision "file", source: "../../../../CMakeLists.txt", destination: "$HOME/project/"

View File

@@ -73,8 +73,8 @@ Vagrant.configure("2") do |config|
# note: clang installed by default
config.vm.provision "env", type: "shell", inline:<<-SHELL
set -x
pkg update -f
pkg install -y git cmake
pkgin update
pkgin -y install git cmake
SHELL
config.vm.provision "file", source: "../../../../CMakeLists.txt", destination: "$HOME/project/"

View File

@@ -73,10 +73,10 @@ Vagrant.configure("2") do |config|
# note: clang installed by default
config.vm.provision "env", type: "shell", inline:<<-SHELL
set -x
pkg update -f
pkg install -y git cmake
pkgin update
pkgin -y install git cmake
kldload linux64
pkg install -y swig linux-dotnet-sdk
pkgin -y install swig linux-dotnet-sdk
SHELL
config.vm.provision "file", source: "../../../../CMakeLists.txt", destination: "$HOME/project/"

View File

@@ -73,9 +73,9 @@ Vagrant.configure("2") do |config|
# note: clang installed by default
config.vm.provision "env", type: "shell", inline:<<-SHELL
set -x
pkg update -f
pkg install -y git cmake
pkg install -y swig openjdk11 maven
pkgin update
pkg -y install git cmake
pkg -y install swig openjdk11 maven
mount -t fdescfs fdesc /dev/fd
mount -t procfs proc /proc
SHELL

View File

@@ -73,10 +73,10 @@ Vagrant.configure("2") do |config|
# note: clang installed by default
config.vm.provision "env", type: "shell", inline:<<-SHELL
set -x
pkg update -f
pkg install -y git cmake
pkg install -y swig python39 py39-wheel py39-pip py39-pytest-virtualenv
pkg install -y py39-numpy py39-pandas py39-matplotlib
pkgin update
pkgin -y install git cmake
pkgin -y install swig python311 py311-wheel py311-pip py311-pytest-virtualenv
pkgin -y install py311-numpy py311-pandas py311-matplotlib
SHELL
config.vm.provision "file", source: "../../../../CMakeLists.txt", destination: "$HOME/project/"