| 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-cmake-protobuf21: |
| 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 protobuf@21 |
| |
| - name: compile with make |
| run: | |
| GETOPT_PATH=$(brew --prefix gnu-getopt)/bin |
| export PATH=$GETOPT_PATH:$PATH |
| ./config_brpc.sh --header="$(brew --prefix)/include" --libs="$(brew --prefix)/lib" |
| make -j ${{env.proc_num}} && make clean |
| |
| - name: compile with cmake |
| run: | |
| echo "CMAKE_PREFIX_PATH=$(brew --prefix protobuf@21)" |
| mkdir build && cd build && cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_PREFIX_PATH=$(brew --prefix protobuf@21) .. |
| make -j ${{env.proc_num}} && make clean |
| |
| compile-with-make-cmake-protobuf29: |
| 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 protobuf@29 |
| |
| - name: compile with make |
| run: | |
| GETOPT_PATH=$(brew --prefix gnu-getopt)/bin |
| export PATH=$GETOPT_PATH:$PATH |
| ./config_brpc.sh --header="$(brew --prefix)/include" --libs="$(brew --prefix)/lib" |
| make -j ${{env.proc_num}} && make clean |
| |
| - name: compile with cmake |
| run: | |
| mkdir build && cd build && cmake -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_PREFIX_PATH=$(brew --prefix protobuf@29) .. |
| make -j ${{env.proc_num}} && make clean |
| |
| compile-with-bazel: |
| runs-on: macos-latest # https://github.com/actions/runner-images |
| steps: |
| - uses: actions/checkout@v2 |
| - run: bazel build --verbose_failures -- //:brpc -//example/... |