-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: I removed the caching of homebrew because `brew install` only takes ~1 min so we don't need to spend the cache space for that. I tried using brew folly but that fails due to what looks like [int128 not being turned on](https://github.com/assignUser/velox/actions/runs/7824878934/job/21348161704#step:6:3453)? Bundled folly solves this and will be cached by ccache. Building and caching it separately will have the same cache misses as ccache so there is no advantage to that. Currently these jobs run on the public macos 13 (intel) and 14 (arm) runners which makes this very economical. A build without cache takes 90 and 40 mins respectively. On main we should always have a cache hit and in PRs we should also benefit from the caches on main via partial key matching (`restore-keys`). If we want to improve build times we can of course upgrade to the larger runners at any time. With the current rate of Apple Silicon adoption we could also think about dropping intel mac CI entirely (outside of pyvelox wheels if we publish those at some point). Closes #8547 Pull Request resolved: #8707 Reviewed By: Yuhta Differential Revision: D53577489 Pulled By: kgpai fbshipit-source-id: b9f965d1398c6e8a197dffef7f8d7f46e986dbae
- Loading branch information
1 parent
db109f2
commit 98c805a
Showing
2 changed files
with
81 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# Copyright (c) Facebook, Inc. and its affiliates. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
name: macOS Build | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.repository }}-${{ github.head_ref || github.sha }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
macos-build: | ||
name: "${{ matrix.os }}" | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# macos-13 = x86_64 Mac | ||
# macos-14 = arm64 Mac | ||
os: [macos-13, macos-14] | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
CCACHE_DIR: '${{ github.workspace }}/.ccache' | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- name: Install Dependencies | ||
run: | | ||
brew install \ | ||
bison boost ccache double-conversion flex fmt gflags glog \ | ||
icu4c libevent libsodium lz4 lzo ninja openssl range-v3 simdjson \ | ||
snappy thrift xz xsimd zstd | ||
echo "NJOBS=`sysctl -n hw.ncpu`" >> $GITHUB_ENV | ||
- name: Cache ccache | ||
uses: actions/cache@v4 | ||
with: | ||
path: '${{ env.CCACHE_DIR }}' | ||
key: ccache-macos-${{ matrix.os }}-${{ hashFiles('velox/*') }} | ||
restore-keys: ccache-macos-${{ matrix.os }} | ||
|
||
- name: Configure Build | ||
env: | ||
folly_SOURCE: BUNDLED | ||
run: | | ||
ccache -sz -M 5Gi | ||
cmake \ | ||
-B _build/debug \ | ||
-GNinja \ | ||
-DTREAT_WARNINGS_AS_ERRORS=1 \ | ||
-DENABLE_ALL_WARNINGS=1 \ | ||
-DVELOX_ENABLE_PARQUET=ON \ | ||
-DCMAKE_BUILD_TYPE=Debug | ||
- name: Build | ||
run: | | ||
cmake --build _build/debug -j $NJOBS | ||
ccache -s | ||
- name: Run Tests | ||
if: false | ||
run: ctest -j $NJOBS --test-dir _build/debug --output-on-failure | ||
|