Skip to content

Commit 4289d2b

Browse files
kgpaifacebook-github-bot
authored andcommitted
feat(build): Print out build metrics (facebookincubator#12142)
Summary: Fixes the name of the build metrics job to also include type of linking and also print out sizes as part of the logs. Pull Request resolved: facebookincubator#12142 Reviewed By: bikramSingh91 Differential Revision: D68510274 Pulled By: kgpai fbshipit-source-id: 02164c2c8c7022af4ce8082ab0425334786c1893
1 parent 121b230 commit 4289d2b

File tree

1 file changed

+17
-23
lines changed

1 file changed

+17
-23
lines changed

.github/workflows/build-metrics.yml

+17-23
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ permissions:
3535

3636
jobs:
3737
metrics:
38-
name: Linux ${{ matrix.type }} with adapters
38+
name: Linux ${{ matrix.link-type }} - ${{ matrix.type }} with adapters
3939
if: ${{ github.repository == 'facebookincubator/velox' }}
4040
runs-on: ${{ matrix.runner }}
4141
container: ghcr.io/facebookincubator/velox-dev:adapters
@@ -59,7 +59,6 @@ jobs:
5959
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
6060

6161
- name: Make ${{ matrix.link-type }} - ${{ matrix.type }} Build
62-
if: ${{ matrix.link-type == 'static' }}
6362
env:
6463
MAKEFLAGS: 'MAX_HIGH_MEM_JOBS=8 MAX_LINK_JOBS=4'
6564
run: |
@@ -73,44 +72,39 @@ jobs:
7372
"-DVELOX_ENABLE_ABFS=ON"
7473
"-DVELOX_ENABLE_REMOTE_FUNCTIONS=ON"
7574
"-DVELOX_MONO_LIBRARY=ON"
75+
"-DVELOX_BUILD_SHARED=${{ matrix.link-type == 'shared' && 'ON' || 'OFF' }}"
7676
)
77-
make '${{ matrix.type }}'
7877
79-
- name: Make ${{ matrix.link-type }} - ${{ matrix.type }} Build
80-
if: ${{ matrix.link-type == 'shared' }}
81-
env:
82-
MAKEFLAGS: 'MAX_HIGH_MEM_JOBS=8 MAX_LINK_JOBS=4'
83-
run: |
84-
EXTRA_CMAKE_FLAGS=(
85-
"-DVELOX_ENABLE_BENCHMARKS=ON"
86-
"-DVELOX_ENABLE_ARROW=ON"
87-
"-DVELOX_ENABLE_PARQUET=ON"
88-
"-DVELOX_ENABLE_HDFS=ON"
89-
"-DVELOX_ENABLE_S3=ON"
90-
"-DVELOX_ENABLE_GCS=ON"
91-
"-DVELOX_ENABLE_ABFS=ON"
92-
"-DVELOX_ENABLE_REMOTE_FUNCTIONS=ON"
93-
"-DVELOX_MONO_LIBRARY=ON"
94-
"-DVELOX_BUILD_SHARED=ON"
95-
)
96-
make '${{ matrix.type }}'
78+
echo "CMake Flags: ${EXTRA_CMAKE_FLAGS[*]}"
79+
make '${{ matrix.type }}' EXTRA_CMAKE_FLAGS="${EXTRA_CMAKE_FLAGS[*]}"
9780
9881
- name: Log binary sizes
9982
run: |
10083
mkdir -p /tmp/metrics
10184
sizes_file=/tmp/metrics/object_sizes
85+
echo "sizes_file=$sizes_file" >> $GITHUB_ENV
86+
10287
pushd '_build/${{ matrix.type }}'
10388
10489
# . to also check in lib for mono build
105-
find . -type f -name 'libvelox*.so' -o -name 'libvelox*.a' -exec ls -l -BB {} \; |
90+
find . -type f \( -name 'libvelox*.so' -o -name 'libvelox*.a' \) -exec ls -l -BB {} \; |
10691
awk '{print $5, $9; total += $5} END {print total," total_lib_size"}' > $sizes_file
10792
108-
find velox -type f -name '*.o' -exec ls -l -BB {} \; |
93+
find velox -type f -name '*.o' -exec ls -l -BB {} \; |
10994
awk '{print $5, $9; total += $5} END {print total," total_obj_size"}' >> $sizes_file
11095
11196
find velox -type f -name 'velox_*' -exec ls -l -BB {} \; |
11297
awk '{print $5, $9; total += $5} END {print total," total_exec_size"}' >> $sizes_file
11398
99+
echo "::group::Size file for ${{ matrix.link-type }} - ${{ matrix.type }}"
100+
cat $sizes_file
101+
echo "::endgroup::"
102+
103+
- uses: actions/upload-artifact@v4
104+
with:
105+
path: ${{ env.sizes_file }}
106+
name: "${{ matrix.type }}-${{ matrix.link-type }}-sizes"
107+
114108
- name: Copy ninja_log
115109
run: cp _build/${{ matrix.type }}/.ninja_log /tmp/metrics/.ninja_log
116110

0 commit comments

Comments
 (0)