-
Notifications
You must be signed in to change notification settings - Fork 17
104 lines (101 loc) · 3.12 KB
/
macos-ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: macOS CI
on:
push:
branches:
- main
paths-ignore:
- "**.md"
- "src/**"
pull_request:
branches:
- main
paths:
- .github/workflows/macos-ci.yaml
- deps/container-runtime-full-archive.conf
- deps/full-os.conf
- deps/lima-bundles.conf
- e2e/**
- lima-template/**
- Makefile
- Makefile.darwin
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
install-dependencies:
# This is a spot check for make install.dependencies on macOS x86/ARM platforms.
# Finch-core provides the core dependencies needed to run Finch such as the base OS
# image, rootfs, and Lima bundle. Validate the mechanism used to install the core
# dependencies works on macOS.
strategy:
fail-fast: false
matrix:
os: [macos-13, macos-13-xlarge]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
persist-credentials: false
submodules: true
- name: Setup go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version-file: e2e/go.mod
cache-dependency-path: e2e/go.sum
- name: Install platform dependencies
run: make install.dependencies
- name: Clean up dependencies
run: make clean
e2e-tests:
strategy:
fail-fast: false
matrix:
os:
[
[self-hosted, macos, amd64, 13, test],
[self-hosted, macos, amd64, 14, test],
[self-hosted, macos, arm64, 13, test],
[self-hosted, macos, arm64, 14, test],
]
vm_type: [ "vz", "qemu" ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
persist-credentials: false
submodules: true
- name: Setup go
uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version-file: e2e/go.mod
cache-dependency-path: e2e/go.sum
- name: Clean up previous files
shell: zsh {0}
run: |
sudo rm -rf ~/.lima
sudo rm -rf ./_output
if pgrep '^qemu-system'; then
sudo pkill '^qemu-system'
fi
if pgrep '^socket_vmnet'; then
sudo pkill '^socket_vmnet'
fi
- name: Install dependencies
shell: zsh {0}
run: brew install lz4 automake autoconf libtool
- name: Build project
shell: zsh {0}
run: |
export PATH="/opt/homebrew/opt/libtool/libexec/gnubin:$PATH"
which libtool
# Install socket_vmnet to `_output/bin` which is used in $PATH
SOCKET_VMNET_TEMP_PREFIX=$(pwd)/_output/ make lima-socket-vmnet
make install.dependencies
- name: Run e2e tests
shell: zsh {0}
run: FINCH_VM_TYPE=${{ matrix.vm_type }} make test-e2e