Skip to content

Commit 9573208

Browse files
committed
Split to multiple workflows
- build: build on multiple version of macOS - lima: lima integration tests - qemu: lima integration tests - release: already exist Try to run all integration tests on all platforms to see what works now. We probably wan to minimize the number of platform since the macOS runners are very flaky. Signed-off-by: Nir Soffer <[email protected]>
1 parent 6235461 commit 9573208

File tree

4 files changed

+97
-27
lines changed

4 files changed

+97
-27
lines changed

.github/workflows/build.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- 'release/**'
8+
pull_request:
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
build:
15+
name: Build on multiple version of macOS
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
platform:
20+
- macos-13
21+
- macos-14
22+
- macos-15
23+
runs-on: ${{ matrix.platform }}
24+
timeout-minutes: 10
25+
steps:
26+
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
27+
with:
28+
fetch-depth: 1
29+
- name: Build
30+
run: make
Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: test
1+
name: lima
22

33
on:
44
push:
@@ -12,7 +12,7 @@ permissions:
1212

1313
jobs:
1414
integration:
15-
name: Integration tests
15+
name: Lima integration tests
1616
strategy:
1717
fail-fast: false
1818
matrix:
@@ -22,6 +22,7 @@ jobs:
2222
platform:
2323
- macos-13-large
2424
- macos-14-large
25+
- macos-15-large
2526
runs-on: ${{ matrix.platform }}
2627
timeout-minutes: 40
2728
steps:
@@ -36,43 +37,25 @@ jobs:
3637
- name: Make Install (x86_64)
3738
run: |
3839
# compile for x86_64
39-
sudo make PREFIX=/opt/socket_vmnet install
40+
make
41+
# Skip installing launchd services
42+
sudo make install.bin install.doc
4043
if file /opt/socket_vmnet/bin/* | grep -q arm64 ; then false ; fi
4144
- name: Cleanup
4245
run: |
43-
sudo make clean
46+
make clean
4447
- name: Make Install (arm64)
4548
run: |
4649
# cross-compile for arm64
4750
# Skip installing launchd services
48-
sudo make PREFIX=/opt/socket_vmnet.arm64 ARCH=arm64 install.bin install.doc
51+
make ARCH=arm64
52+
sudo make PREFIX=/opt/socket_vmnet.arm64 install.bin install.doc
4953
if file /opt/socket_vmnet.arm64/bin/* | grep -q x86_64 ; then false ; fi
50-
- name: Print launchd status (shared mode)
51-
run: launchctl print system/io.github.lima-vm.socket_vmnet
52-
- name: Fetch homebrew-core commit messages
53-
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
54-
with:
55-
# needed by ./hack/brew-install-version.sh
56-
repository: homebrew/homebrew-core
57-
path: homebrew-core
58-
fetch-depth: 0
59-
filter: tree:0
60-
- name: Install test dependencies
61-
run: |
62-
brew install bash coreutils
63-
# QEMU 9.1.0 seems to break on GitHub runners, both on Monterey and Ventura
64-
# We revert back to 8.2.1, which seems to work fine
65-
./hack/brew-install-version.sh qemu 8.2.1
66-
- name: Test (shared mode)
67-
run: ./test/test.sh /var/run/socket_vmnet
68-
# Bridged mode cannot be tested on GHA
6954
- name: Install Lima
7055
run: |
7156
brew install lima
7257
limactl sudoers >etc_sudoers.d_lima
7358
sudo install -o root etc_sudoers.d_lima "/private/etc/sudoers.d/lima"
74-
- name: Install the dependencies for the Lima integration test
75-
run: brew install iperf3 jq
7659
- name: "Lima: vm1: prepare"
7760
run: |
7861
limactl start --name=vm1 --tty=false ./test/vmnet.yaml

.github/workflows/qemu.yaml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: qemu
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- 'release/**'
8+
pull_request:
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
integration:
15+
name: QEMU integration tests
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
# macos-13-large is used as macos-13 seems too flaky.
20+
# macos-14 (ARM) and later cannot be used for the most part of the job
21+
# due to the lack of the support for nested virt.
22+
platform:
23+
- macos-13-large
24+
- macos-14-large
25+
- macos-15-large
26+
runs-on: ${{ matrix.platform }}
27+
timeout-minutes: 10
28+
steps:
29+
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
30+
with:
31+
fetch-depth: 1
32+
- name: Show host info
33+
run: |
34+
uname -a
35+
sw_vers
36+
ifconfig
37+
- name: Build
38+
run: |
39+
make
40+
sudo make install
41+
- name: Fetch homebrew-core commit messages
42+
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
43+
with:
44+
# needed by ./hack/brew-install-version.sh
45+
repository: homebrew/homebrew-core
46+
path: homebrew-core
47+
fetch-depth: 0
48+
filter: tree:0
49+
- name: Install test dependencies
50+
run: |
51+
brew install bash coreutils
52+
# QEMU 9.1.0 seems to break on GitHub runners, both on Monterey and Ventura
53+
# We revert back to 8.2.1, which seems to work fine
54+
./hack/brew-install-version.sh qemu 8.2.1
55+
# Bridged mode cannot be tested on GHA
56+
- name: Test (shared mode)
57+
run: ./test/test.sh /var/run/socket_vmnet

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Forked from https://github.com/containerd/nerdctl/blob/v0.8.1/.github/workflows/release.yml
33
# Apache License 2.0
44

5-
name: Release
5+
name: release
66
on:
77
push:
88
branches:

0 commit comments

Comments
 (0)