-
Notifications
You must be signed in to change notification settings - Fork 3k
77 lines (74 loc) · 2.2 KB
/
mac.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
name: Mac Code Checker
# This workflow is triggered on pushes or pull request to the repository.
on:
push:
branches:
- master
pull_request:
# file paths to consider in the event. Optional; defaults to all.
paths:
- 'scripts/**'
- 'internal/**'
- 'pkg/**'
- 'client/**'
- 'cmd/**'
- 'build/**'
- 'tests/integration/**'
- 'tests/go_client/**'
- '.github/workflows/mac.yaml'
- '.env'
- docker-compose.yml
- Makefile
- '!**.md'
- '!build/ci/jenkins/**'
# FIXME(wxyu): not need to run code check, update the ci-passed rules and remove these two lines
- go.mod
- go.sum
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
mac:
name: Code Checker MacOS 13
runs-on: macos-13
timeout-minutes: 300
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Python environment
uses: actions/setup-python@v4
with:
python-version: '<3.12'
- name: Setup Go environment
uses: actions/[email protected]
with:
go-version: '~1.21.11'
- name: Download Caches
uses: ./.github/actions/macos-cache-restore
- name: Code Check
env:
CCACHE_DIR: /var/tmp/ccache
CCACHE_COMPILERCHECK: content
CCACHE_COMPRESS: 1
CCACHE_COMPRESSLEVEL: 5
CCACHE_MAXSIZE: 2G
run: |
if [[ ! -d "/var/tmp/ccache" ]];then
mkdir -p /var/tmp/ccache
fi
ls -alh /var/tmp/ccache
brew install libomp ninja openblas ccache pkg-config
pip3 install conan==1.64.1
if [[ ! -d "/usr/local/opt/llvm" ]]; then
ln -s /usr/local/opt/llvm@14 /usr/local/opt/llvm
fi
make milvus
- name: Upload Cmake log
uses: actions/upload-artifact@v3
if: ${{ failure() }}
with:
name: cmake-log
path: cmake_build/CMakeFiles/*.log
- name: Save Caches
uses: ./.github/actions/macos-cache-save
if: github.event_name != 'pull_request'