Skip to content

Commit 117bee8

Browse files
authored
Merge pull request #89 from nirs/simpler-ci
Simplify CI
2 parents 38446bc + 4de192c commit 117bee8

File tree

4 files changed

+95
-29
lines changed

4 files changed

+95
-29
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
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

.github/workflows/test.yml renamed to .github/workflows/lima.yaml

Lines changed: 18 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: test
1+
name: Lima
22

33
on:
44
push:
@@ -19,11 +19,14 @@ jobs:
1919
# macos-13-large is used as macos-13 seems too flaky.
2020
# macos-14 (ARM) and later cannot be used for the most part of the job
2121
# due to the lack of the support for nested virt.
22-
#
23-
# TODO: add macos-15-large https://github.com/lima-vm/socket_vmnet/pull/63
24-
platform: [macos-13-large, macos-14-large]
22+
platform:
23+
- macos-13-large
24+
- macos-14-large
25+
- macos-15-large
2526
runs-on: ${{ matrix.platform }}
26-
timeout-minutes: 40
27+
# Typically takes 8 minutes. If a step get stuck for many mintues it is
28+
# unlikely to succeed.
29+
timeout-minutes: 20
2730
steps:
2831
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
2932
with:
@@ -36,43 +39,29 @@ jobs:
3639
- name: Make Install (x86_64)
3740
run: |
3841
# compile for x86_64
39-
sudo make PREFIX=/opt/socket_vmnet install
42+
make
43+
# Skip installing launchd services
44+
sudo make install.bin install.doc
4045
if file /opt/socket_vmnet/bin/* | grep -q arm64 ; then false ; fi
4146
- name: Cleanup
4247
run: |
43-
sudo make clean
48+
make clean
4449
- name: Make Install (arm64)
4550
run: |
4651
# cross-compile for arm64
4752
# Skip installing launchd services
48-
sudo make PREFIX=/opt/socket_vmnet.arm64 ARCH=arm64 install.bin install.doc
53+
make ARCH=arm64
54+
sudo make PREFIX=/opt/socket_vmnet.arm64 install.bin install.doc
4955
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
56+
- name: Update brew (macos-15-large)
57+
if: matrix.platform == 'macos-15-large'
58+
# Without this we get lima 0.23.2 instead of latest release.
59+
run: brew update
6960
- name: Install Lima
7061
run: |
7162
brew install lima
7263
limactl sudoers >etc_sudoers.d_lima
7364
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
7665
- name: "Lima: vm1: prepare"
7766
run: |
7867
limactl start --name=vm1 --tty=false ./test/vmnet.yaml

.github/workflows/qemu.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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: Integration tests
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
# We run on standard arm64 runners since this test is very quick.
20+
platform:
21+
- macos-13
22+
- macos-14
23+
- macos-15
24+
runs-on: ${{ matrix.platform }}
25+
timeout-minutes: 10
26+
steps:
27+
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
28+
with:
29+
fetch-depth: 1
30+
- name: Show host info
31+
run: |
32+
uname -a
33+
sw_vers
34+
ifconfig
35+
- name: Build
36+
run: |
37+
make
38+
sudo make install
39+
- name: Print launchd status (shared mode)
40+
run: launchctl print system/io.github.lima-vm.socket_vmnet
41+
- name: Install test dependencies
42+
run: |
43+
brew install qemu bash coreutils
44+
- name: Test (shared mode)
45+
run: ./test/test.sh /var/run/socket_vmnet
46+
# Bridged mode cannot be tested on GHA

.github/workflows/release.yml renamed to .github/workflows/release.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ permissions:
1616
contents: read
1717
jobs:
1818
release:
19+
name: Release
1920
runs-on: macos-15
2021
# The maximum access is "read" for PRs from public forked repos
2122
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token

0 commit comments

Comments
 (0)