Enable all warnings and pedantic mode #194
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test | |
on: | |
push: | |
branches: | |
- master | |
- 'release/**' | |
pull_request: | |
permissions: | |
contents: read | |
jobs: | |
integration: | |
name: Integration tests | |
strategy: | |
fail-fast: false | |
matrix: | |
# macos-13-large is used as macos-13 seems too flaky. | |
# macos-14 (ARM) and later cannot be used for the most part of the job | |
# due to the lack of the support for nested virt. | |
# | |
# TODO: add macos-15-large https://github.com/lima-vm/socket_vmnet/pull/63 | |
platform: [macos-13-large, macos-14-large] | |
runs-on: ${{ matrix.platform }} | |
timeout-minutes: 40 | |
steps: | |
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 | |
with: | |
fetch-depth: 1 | |
- name: Show host info | |
run: | | |
uname -a | |
sw_vers | |
ifconfig | |
- name: Make Install (x86_64) | |
run: | | |
# compile for x86_64 | |
sudo make PREFIX=/opt/socket_vmnet install | |
if file /opt/socket_vmnet/bin/* | grep -q arm64 ; then false ; fi | |
- name: Cleanup | |
run: | | |
sudo make clean | |
- name: Make Install (arm64) | |
run: | | |
# cross-compile for arm64 | |
# Skip installing launchd services | |
sudo make PREFIX=/opt/socket_vmnet.arm64 ARCH=arm64 install.bin install.doc | |
if file /opt/socket_vmnet.arm64/bin/* | grep -q x86_64 ; then false ; fi | |
- name: Print launchd status (shared mode) | |
run: launchctl print system/io.github.lima-vm.socket_vmnet | |
- name: Fetch homebrew-core commit messages | |
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 | |
with: | |
# needed by ./hack/brew-install-version.sh | |
repository: homebrew/homebrew-core | |
path: homebrew-core | |
fetch-depth: 0 | |
filter: tree:0 | |
- name: Install test dependencies | |
run: | | |
brew install bash coreutils | |
# QEMU 9.1.0 seems to break on GitHub runners, both on Monterey and Ventura | |
# We revert back to 8.2.1, which seems to work fine | |
./hack/brew-install-version.sh qemu 8.2.1 | |
- name: Test (shared mode) | |
run: ./test/test.sh /var/run/socket_vmnet | |
# Bridged mode cannot be tested on GHA | |
- name: Install Lima | |
run: | | |
brew install lima | |
limactl sudoers >etc_sudoers.d_lima | |
sudo install -o root etc_sudoers.d_lima "/private/etc/sudoers.d/lima" | |
- name: Install the dependencies for the Lima integration test | |
run: brew install iperf3 jq | |
- name: "Lima: vm1: prepare" | |
run: | | |
limactl start --name=vm1 --tty=false ./test/vmnet.yaml | |
limactl shell vm1 ip a | |
- name: "Lima: vm1: set up iperf3" | |
run: | | |
export DEBIAN_FRONTEND=noninteractive | |
limactl shell vm1 sudo apt-get update | |
limactl shell vm1 sudo apt-get install -y iperf3 | |
limactl shell vm1 sudo systemctl start iperf3.service | |
- name: "Lima: vm1: get the IP" | |
run: | | |
limactl shell vm1 ip -4 -json addr show dev lima0 | jq -r .[0].addr_info[0].local | tee /tmp/vm1_iP | |
- name: "Lima: vm1: iperf3 (host -> vm1)" | |
run: | | |
iperf3-darwin -c "$(cat /tmp/vm1_ip)" | |
- name: "Lima: vm1: debug" | |
if: failure() | |
run: tail -n500 ~/.lima/vm1/*.log | |
- name: "Lima: vm2: prepare" | |
run: | | |
limactl start --name=vm2 --tty=false ./test/vmnet.yaml | |
limactl shell vm2 ip a | |
- name: "Lima: vm2: set up iperf3" | |
run: | | |
export DEBIAN_FRONTEND=noninteractive | |
limactl shell vm2 sudo apt-get update | |
limactl shell vm2 sudo apt-get install -y iperf3 | |
- name: "Lima: vm2: iperf3 (vm2 -> vm1)" | |
run: | | |
limactl shell vm2 iperf3 -c "$(cat /tmp/vm1_ip)" | |
- name: "Lima: vm2: debug" | |
if: failure() | |
run: tail -n500 ~/.lima/vm2/*.log |