Skip to content

Commit

Permalink
Fix arm64 macOS failure (facebookincubator#10905)
Browse files Browse the repository at this point in the history
Summary:
The build on arm64 macos is stopped due to running out of disk space:
> You are running out of disk space. The runner will stop working when the machine runs out of disk space. Free space left: 76 MB

This is likely due to swap as it only has 7GB of RAM compared to 14GB on the  amd64 runner.

- Switch both macos jobs to build the monolithic library to save diskspace.
- Switch the arm64 build to release to further decrease memory footprint.

Fixes facebookincubator#10901

Pull Request resolved: facebookincubator#10905

Reviewed By: gggrace14

Differential Revision: D62062702

Pulled By: xiaoxmeng

fbshipit-source-id: 455a9ce2725e86e0e470716f95f353f69921ec89
  • Loading branch information
assignUser authored and facebook-github-bot committed Aug 31, 2024
1 parent ede7d0b commit ecebbbf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ jobs:
runs-on: ${{ matrix.os }}
env:
CCACHE_DIR: '${{ github.workspace }}/.ccache'
# The arm runners have only 7GB RAM
BUILD_TYPE: "${{ matrix.os == 'macos-14' && 'Release' || 'Debug' }}"
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -72,30 +74,31 @@ jobs:
uses: assignUser/stash/restore@v1
with:
path: '${{ env.CCACHE_DIR }}'
key: ccache-macos-${{ matrix.os }}
key: ccache-macos-1-${{ matrix.os }}

- name: Configure Build
env:
folly_SOURCE: BUNDLED
folly_SOURCE: BUNDLED #brew folly does not have int128
run: |
ccache -sz -M 5Gi
cmake \
-B _build/debug \
-B _build/$BUILD_TYPE \
-GNinja \
-DTREAT_WARNINGS_AS_ERRORS=1 \
-DENABLE_ALL_WARNINGS=1 \
-DVELOX_ENABLE_PARQUET=ON \
-DCMAKE_BUILD_TYPE=Debug
-DVELOX_MONO_LIBRARY=ON \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE
- name: Build
run: |
cmake --build _build/debug -j $NJOBS
cmake --build _build/$BUILD_TYPE -j $NJOBS
ccache -s
- uses: assignUser/stash/save@v1
with:
path: '${{ env.CCACHE_DIR }}'
key: ccache-macos-${{ matrix.os }}
key: ccache-macos-1-${{ matrix.os }}

- name: Run Tests
if: false
Expand Down
5 changes: 2 additions & 3 deletions velox/type/parser/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@ if(VELOX_MONO_LIBRARY)
${FLEX_TypeParserScanner_OUTPUTS})
add_dependencies(velox velox_type_parser_gen_src)
endif()

include_directories(${PROJECT_BINARY_DIR})
include_directories(${FLEX_INCLUDE_DIRS})
velox_add_library(velox_type_parser ${BISON_TypeParser_OUTPUTS}
${FLEX_TypeParserScanner_OUTPUTS} ParserUtil.cpp)
velox_include_directories(velox_type_parser PRIVATE ${PROJECT_BINARY_DIR}
${FLEX_INCLUDE_DIRS})
velox_link_libraries(velox_type_parser velox_common_base)

0 comments on commit ecebbbf

Please sign in to comment.