Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Commit

Permalink
WIP: Replace vbox with qemu
Browse files Browse the repository at this point in the history
  • Loading branch information
acj committed Nov 13, 2023
1 parent 95df78c commit 33ce195
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 18 deletions.
33 changes: 20 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,43 @@
name: ci
on:
push:
tags:
# tags:
schedule:
- cron: "0 0 * * 1"
workflow_dispatch:
jobs:
package-box:
name: Package Vagrant Boxes
runs-on: macos-12
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
box:
- fbsd_13_2
- fbsd_12_4
# - fbsd_12_4
steps:
- name: Install Vagrant
run: brew install vagrant
- name: Cache Vagrant boxes
uses: actions/cache@v3
with:
path: ~/.vagrant.d
key: ${{ matrix.box }}-vagrant-20231102-${{ hashFiles('Vagrantfile') }}
restore-keys: |
${{ matrix.box }}-vagrant-20231102-
- name: Install Vagrant and QEMU
run: |
sudo apt-get install -qq -o=Dpkg::Use-Pty=0 moreutils
sudo chronic apt-get install -qq -o=Dpkg::Use-Pty=0 vagrant qemu-system
# - name: Cache Vagrant boxes
# uses: actions/cache@v3
# with:
# path: ~/.vagrant.d
# key: ${{ matrix.box }}-vagrant-20231102-${{ hashFiles('Vagrantfile') }}
# restore-keys: |
# ${{ matrix.box }}-vagrant-20231102-
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up VM
run: |
rm -rf ~/.vagrant
rm -rf ~/.vagrant.d
vagrant plugin install vagrant-disksize
vagrant plugin install vagrant-qemu
vagrant status
vagrant up ${{ matrix.box }}
vagrant up --provider qemu ${{ matrix.box }}
- name: Package box
run: |
vagrant package ${{ matrix.box }} --output ${{ matrix.box }}.box
Expand Down
10 changes: 5 additions & 5 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ Vagrant.configure("2") do |config|
config.disksize.size = "16GB"

config.vm.define "fbsd_13_2" do |c|
c.vm.box = "freebsd/FreeBSD-13.2-STABLE"
c.vm.box = "roboxes/freebsd13"
end

config.vm.define "fbsd_12_4" do |c|
c.vm.box = "freebsd/FreeBSD-12.4-STABLE"
end
# config.vm.define "fbsd_12_4" do |c|
# c.vm.box = "freebsd/FreeBSD-12.4-STABLE"
# end

config.vm.synced_folder ".", "/vagrant", disabled: true

Expand Down Expand Up @@ -65,7 +65,7 @@ Vagrant.configure("2") do |config|
du -ah / | sort -r -h | head -25
SHELL

config.vm.provider "virtualbox" do |v|
config.vm.provider "qemu" do |v|
v.memory = 8192
v.cpus = 3
end
Expand Down

0 comments on commit 33ce195

Please sign in to comment.