-
Notifications
You must be signed in to change notification settings - Fork 4k
109 lines (87 loc) · 3.09 KB
/
ci-macos.yml
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
105
106
107
108
109
name: Build on Macos
on:
push:
branches: [ master ]
paths-ignore:
- '**.md'
pull_request:
branches: [ master ]
paths-ignore:
- '**.md'
env:
proc_num: $(sysctl -n hw.logicalcpu)
jobs:
compile-with-make:
runs-on: macos-latest # https://github.com/actions/runner-images
steps:
- uses: actions/checkout@v2
- name: install dependences
run: |
brew install ./homebrew-formula/protobuf.rb
brew install openssl gnu-getopt coreutils gflags leveldb
- name: config_brpc
run: |
GETOPT_PATH=$(brew --prefix gnu-getopt)/bin
export PATH=$GETOPT_PATH:$PATH
./config_brpc.sh --header="$(brew --prefix)/include" --libs="$(brew --prefix)/lib"
- name: compile
run: |
make -j ${{env.proc_num}}
compile-with-cmake:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: install dependences
run: |
brew install ./homebrew-formula/protobuf.rb
brew install openssl gflags leveldb
- name: cmake
run: |
mkdir build
cd build
cmake ..
- name: compile
run: |
cd build
make -j ${{env.proc_num}}
compile-with-make-protobuf23:
runs-on: macos-latest # https://github.com/actions/runner-images
steps:
- uses: actions/checkout@v2
- name: install dependences
run: |
brew install openssl gnu-getopt coreutils gflags leveldb
# abseil 20230125.3
curl -o abseil.rb https://raw.githubusercontent.com/Homebrew/homebrew-core/b85b8dbf23ad509f163677a88ac72268f31e9c4a/Formula/abseil.rb
# protobuf 23.3
curl -o protobuf.rb https://raw.githubusercontent.com/Homebrew/homebrew-core/b85b8dbf23ad509f163677a88ac72268f31e9c4a/Formula/protobuf.rb
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install --formula --ignore-dependencies ./abseil.rb ./protobuf.rb
- name: config_brpc
run: |
GETOPT_PATH=$(brew --prefix gnu-getopt)/bin
export PATH=$GETOPT_PATH:$PATH
./config_brpc.sh --header="$(brew --prefix)/include" --libs="$(brew --prefix)/lib"
- name: compile
run: |
make -j ${{env.proc_num}}
compile-with-cmake-protobuf23:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: install dependences
run: |
brew install openssl gflags leveldb
# abseil 20230125.3
curl -o abseil.rb https://raw.githubusercontent.com/Homebrew/homebrew-core/b85b8dbf23ad509f163677a88ac72268f31e9c4a/Formula/abseil.rb
# protobuf 23.3
curl -o protobuf.rb https://raw.githubusercontent.com/Homebrew/homebrew-core/b85b8dbf23ad509f163677a88ac72268f31e9c4a/Formula/protobuf.rb
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install --formula --ignore-dependencies ./abseil.rb ./protobuf.rb
- name: cmake
run: |
mkdir build
cd build
cmake ..
- name: compile
run: |
cd build
make -j ${{env.proc_num}}