Browse Source

Vagrant-based build for getting a FreeBSD executable

Hack around different compiler names on FreeBSD
default_compile_flags
vector-of-bool 4 years ago
parent
commit
494581dc27
4 changed files with 57 additions and 5 deletions
  1. +2
    -1
      .gitignore
  2. +24
    -1
      Makefile
  3. +28
    -0
      Vagrantfile
  4. +3
    -3
      tools/bootstrap.py

+ 2
- 1
.gitignore View File

@@ -3,4 +3,5 @@ __pycache__/
.vscode/
.mypy_cache/
_prebuilt/
.pytest_cache
.pytest_cache/
.vagrant/

+ 24
- 1
Makefile View File

@@ -1,9 +1,12 @@
.SILENT:

.PHONY: docs docs-server docs-watch docs-sync-server
.PHONY: \
docs docs-server docs-watch docs-sync-server nix-ci linux-ci macos-ci \
freebsd-ci

_invalid:
echo "Specify a target name to execute"
exit 1

docs:
sphinx-build -b html \
@@ -27,3 +30,23 @@ docs-sync-server:
browser-sync start --server \
--reload-delay 300 \
--watch **/*.html

macos-ci: nix-ci
linux-ci: nix-ci

nix-ci:
python3 -u tools/ci.py \
-B download \
-T tools/gcc-9.dds \
-T2 tools/gcc-9.jsonc

vagrant-freebsd-ci:
vagrant up freebsd11
vagrant ssh freebsd11 -c '\
cd /vagrant && \
python3.7 tools/ci.py \
-B build \
-T tools/freebsd-gcc-9.dds \
-T2 tools/freebsd-gcc-9.jsonc \
'
vagrant scp freebsd11:/vagrant/_build/dds _build/dds-freebsd-x64

+ 28
- 0
Vagrantfile View File

@@ -0,0 +1,28 @@
Vagrant.configure("2") do |config|
# Refer: https://docs.vagrantup.com.

config.vm.synced_folder ".", "/vagrant",
type: 'rsync',
rsync__exclude: ['_build/', '.mypy_cache/', '.pytest_cache/', '_prebuilt/']

config.vm.define 'freebsd11' do |freebsd11|
freebsd11.vm.box = 'generic/freebsd11'
freebsd11.vm.provision 'shell', inline: <<-SHELL
set -eu
for package in python37 py37-pip ccache gcc9 gcc8 git; do
echo "Installing $package"
pkg install -qy $package
done
ln -fs g++9 /usr/local/bin/g++-9
ln -fs gcc9 /usr/local/bin/gcc-9
ln -fs g++8 /usr/local/bin/g++-8
ln -fs gcc8 /usr/local/bin/gcc-8
sudo -u vagrant pip install -q --user pytest pytest-xdist
SHELL
end

config.vm.provider 'virtualbox' do |vbox|
vbox.memory = 1024 * 4
vbox.cpus = 8
end
end

+ 3
- 3
tools/bootstrap.py View File

@@ -21,9 +21,9 @@ class BootstrapPhase(NamedTuple):


BOOTSTRAP_PHASES = [
BootstrapPhase('bootstrap-p1.1', 'g++8', 'cl.exe'),
BootstrapPhase('bootstrap-p4.2', 'g++8', 'cl.exe'),
BootstrapPhase('bootstrap-p5.2', 'g++9', 'cl.exe'),
BootstrapPhase('bootstrap-p1.1', 'g++-8', 'cl.exe'),
BootstrapPhase('bootstrap-p4.2', 'g++-8', 'cl.exe'),
BootstrapPhase('bootstrap-p5.2', 'g++-9', 'cl.exe'),
]

HERE = Path(__file__).parent.absolute()

Loading…
Cancel
Save