Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build

on:
push:
branches:
- master
- 'release/**'
pull_request:

permissions:
contents: read

jobs:
build:
name: Build
strategy:
fail-fast: false
matrix:
platform:
- macos-13
- macos-14
- macos-15
runs-on: ${{ matrix.platform }}
timeout-minutes: 10
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 1
- name: Build
run: make
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make test.repro should be tested

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I copied it from #63. You want to replace with make with make test.repro?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The release workflow run make test.repro why test it here again? If we want to test this on all architectures we can add more platforms to the release matrix.

47 changes: 18 additions & 29 deletions .github/workflows/test.yml → .github/workflows/lima.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: test
name: Lima

on:
push:
Expand All @@ -19,11 +19,14 @@ jobs:
# 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]
platform:
- macos-13-large
- macos-14-large
- macos-15-large
runs-on: ${{ matrix.platform }}
timeout-minutes: 40
# Typically takes 8 minutes. If a step get stuck for many mintues it is
# unlikely to succeed.
timeout-minutes: 20
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
Expand All @@ -36,43 +39,29 @@ jobs:
- name: Make Install (x86_64)
run: |
# compile for x86_64
sudo make PREFIX=/opt/socket_vmnet install
make
# Skip installing launchd services
sudo make install.bin install.doc
if file /opt/socket_vmnet/bin/* | grep -q arm64 ; then false ; fi
- name: Cleanup
run: |
sudo make clean
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
make ARCH=arm64
sudo make PREFIX=/opt/socket_vmnet.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: Update brew (macos-15-large)
if: matrix.platform == 'macos-15-large'
# Without this we get lima 0.23.2 instead of latest release.
run: brew update
- 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
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/qemu.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: QEMU

on:
push:
branches:
- master
- 'release/**'
pull_request:

permissions:
contents: read

jobs:
integration:
name: Integration tests
strategy:
fail-fast: false
matrix:
# We run on standard arm64 runners since this test is very quick.
platform:
- macos-13
- macos-14
- macos-15
runs-on: ${{ matrix.platform }}
timeout-minutes: 10
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 1
- name: Show host info
run: |
uname -a
sw_vers
ifconfig
- name: Build
run: |
make
sudo make install
- name: Print launchd status (shared mode)
run: launchctl print system/io.github.lima-vm.socket_vmnet
- name: Install test dependencies
run: |
brew install qemu bash coreutils
- name: Test (shared mode)
run: ./test/test.sh /var/run/socket_vmnet
# Bridged mode cannot be tested on GHA
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ permissions:
contents: read
jobs:
release:
name: Release
runs-on: macos-15
# The maximum access is "read" for PRs from public forked repos
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token
Expand Down