Skip to content

Commit 9dfe3af

Browse files
committed
Add CI job for macos
1 parent 15a58b0 commit 9dfe3af

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/build_macos.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
# Cancel already running jobs
10+
concurrency:
11+
group: build_macos_${{ github.head_ref }}
12+
cancel-in-progress: true
13+
14+
env:
15+
CARGO_TERM_COLOR: always
16+
RUST_BACKTRACE: 1
17+
18+
jobs:
19+
build:
20+
name: mac os - build
21+
runs-on: macos-latest
22+
steps:
23+
- uses: actions/checkout@v4
24+
# We purposefully dont cache here as build_and_test will always be the bottleneck
25+
# so we should leave the cache alone so build_and_test can make more use of it.
26+
- name: Install cargo-hack
27+
uses: taiki-e/install-action@v2
28+
with:
29+
tool: cargo-hack@0.6.16
30+
- name: Install deps
31+
run: brew install gcc
32+
- name: Ensure that dev tools compiles and has no warnings with no features enabled
33+
run: cargo clippy --locked ${{ matrix.cargo_flags }} --all-targets -- -D warnings
34+
- name: Ensure that shotover-proxy compiles and has no warnings under every possible combination of features
35+
# some things to explicitly point out:
36+
# * clippy also reports rustc warnings and errors
37+
# * clippy --all-targets is not run so we only build the shotover_proxy executable without the tests/benches
38+
run: cargo hack --feature-powerset --at-least-one-of valkey,cassandra,kafka,opensearch --exclude kafka-cpp-driver-tests,cassandra-cpp-driver-tests clippy --locked ${{ matrix.cargo_flags }} --package shotover-proxy -- -D warnings

0 commit comments

Comments
 (0)