Use VirtualBox for both Windows and macOS

Using Windows containers in Docker has been a painful experience. Slow
networks, no support for transparent networks due to the host being a
VPS, building large containers taking forever, the list goes on.
Meanwhile it costs me roughly €50 per month to keep the Windows CI
runner online.

Since we already have a Mac Mini at MacStadium (for free), we can just
re-use that Mac and run Windows inside a VirtualBox VM. This allows us
to work around the various Docker issues on Windows, and should reduce
our monthly infrastructure costs to more or less €0 (excluding the €1-2
I pay to AWS every month).

As part of this we also re-organise the runner tags a bit: the runners
now use three tags:

1. "inko"
2. "vbox" (to indicate it's a virtualbox runner)
3. "macos" or "windows", based on the type of OS

This ensures we don't accidentally pick up a shared runner that just
uses a "windows" or "macos" tag.
parent 5352ec7f
Pipeline #121753671 passed with stages
in 20 minutes and 16 seconds
......@@ -13,6 +13,11 @@ stages:
- release
- post-release
.only-source-repository:
only:
- [email protected]/inko
- [email protected]/inko
include:
- local: .gitlab/ci/windows.yml
- local: .gitlab/ci/macos.yml
......
......@@ -7,10 +7,12 @@ test:compiler:linux:
- ruby --version
- gem --version
- bundle --version
- bundle install --path vendor --retry=3
- bundle config set path vendor
- bundle install --retry=3
script:
- make test
cache:
key: linux-compiler
paths:
- compiler/vendor/ruby
......@@ -24,6 +26,7 @@ test:ivm:linux:
script:
- make test
cache:
key: linux-vm
paths:
- .cargo
- vm/target
......@@ -39,6 +42,7 @@ test:runtime:linux:
- make -C vm release
- env RUBYLIB=./compiler/lib ./compiler/bin/inko-test -d runtime --vm ./vm/target/release/ivm
cache:
key: linux-vm
paths:
- .cargo
- vm/target
......@@ -59,6 +63,7 @@ release:compiled:linux-gnu:
only:
- tags
cache:
key: linux-vm
paths:
- .cargo
- vm/target
......
---
.only-source-repository:
only:
- [email protected]/inko
- [email protected]/inko
.macos-tags:
tags:
- macos
- inko
- vbox
test:compiler:macos:
extends: .only-source-repository
extends:
- .only-source-repository
- .macos-tags
stage: test
tags:
- macos
before_script:
- cd compiler
- ruby --version
- gem --version
- bundle --version
- bundle install --path vendor --retry=3
- bundle config set path vendor
- bundle install --retry=3
script:
- gmake test
cache:
key: macos
key: macos-compiler
paths:
- compiler/vendor/ruby
test:ivm:macos:
extends: .only-source-repository
extends:
- .only-source-repository
- .macos-tags
stage: test
tags:
- macos
before_script:
- cd vm
- rustc --version
......@@ -34,16 +36,16 @@ test:ivm:macos:
script:
- gmake test
cache:
key: macos
key: macos-vm
paths:
- .cargo
- vm/target
test:runtime:macos:
extends: .only-source-repository
extends:
- .only-source-repository
- .macos-tags
stage: test-runtime
tags:
- macos
before_script:
- ruby --version
- rustc --version
......@@ -52,7 +54,7 @@ test:runtime:macos:
- gmake -C vm release
- env RUBYLIB=./compiler/lib ./compiler/bin/inko-test -d runtime --vm ./vm/target/release/ivm
cache:
key: macos
key: macos-vm
paths:
- .cargo
- vm/target
......@@ -61,10 +63,10 @@ test:runtime:macos:
- test:ivm:macos
release:compiled:macos:
extends: .only-source-repository
extends:
- .only-source-repository
- .macos-tags
stage: release
tags:
- macos
before_script:
- ruby --version
- rustc --version
......@@ -75,7 +77,7 @@ release:compiled:macos:
only:
- tags
cache:
key: macos
key: macos-vm
paths:
- .cargo
- vm/target
......
---
.only-source-repository:
only:
- [email protected]/inko
- [email protected]/inko
test:compiler:windows:
extends: .only-source-repository
stage: test
.windows-tags:
tags:
- windows
- inko
- vbox
test:compiler:windows:
extends:
- .only-source-repository
- .windows-tags
stage: test
before_script:
- cd compiler
- ruby --version
- gem --version
- bundle --version
- bundle install --path vendor --retry=3
- bundle config set path vendor
- bundle install --retry=3
script:
- C:/msys make test
- make test
cache:
key: windows
key: windows-compiler
paths:
- compiler/vendor/ruby
test:ivm:windows:
extends: .only-source-repository
extends:
- .only-source-repository
- .windows-tags
stage: test
tags:
- windows
- inko
before_script:
- cd vm
- rustc --version
- cargo --version
script:
- C:/msys make test
- make test
cache:
key: windows
key: windows-vm
paths:
- .cargo
- vm/target
test:runtime:windows:
extends: .only-source-repository
extends:
- .only-source-repository
- .windows-tags
stage: test-runtime
tags:
- windows
- inko
before_script:
- ruby --version
- rustc --version
- cargo --version
script:
- C:/msys make -C vm release
- make -C vm release
- ruby -I ./compiler/lib ./compiler/bin/inko-test -d runtime --vm ./vm/target/release/ivm.exe
cache:
key: windows
key: windows-vm
paths:
- .cargo
- vm/target
......@@ -64,22 +63,21 @@ test:runtime:windows:
- test:ivm:windows
release:compiled:windows:
extends: .only-source-repository
extends:
- .only-source-repository
- .windows-tags
stage: release
tags:
- windows
- inko
before_script:
- ruby --version
- rustc --version
- cargo --version
- C:/msys aws --version
- aws --version
script:
- C:/msys make release-compiled
- make release-compiled
only:
- tags
cache:
key: windows
key: windows-vm
paths:
- .cargo
- vm/target
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment