-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d7d7b3c
commit 077e654
Showing
2 changed files
with
36 additions
and
2 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 |
---|---|---|
|
@@ -27,6 +27,17 @@ jobs: | |
runs-on: ${{ matrix.build.runs-on }} | ||
name: ${{ matrix.build.type }} ${{ matrix.build.cxx_compiler }} ${{ matrix.arch }} ${{ matrix.build.os }} | ||
steps: | ||
- name: Verify ccache availability | ||
shell: bash | ||
run: | | ||
if [ ! -d "/mnt/MLPerf/ccache" ]; then | ||
echo "::error title=ccache-mlperf-not-mounted::NFS drive is not mounted; build machine not properly provisioned." | ||
exit 1 | ||
fi | ||
if [ ! -d "$HOME/.ccache-ci" ]; then | ||
echo "::error title=ccache-not-provisioned::Ccache is not properly provisioned." | ||
exit 1 | ||
fi | ||
- uses: tenstorrent-metal/metal-workflows/.github/actions/[email protected] | ||
- name: Set up dynamic env vars for build | ||
run: | | ||
|
@@ -41,10 +52,32 @@ jobs: | |
docker_image_arch: ${{ inputs.arch }} | ||
docker_opts: | | ||
-e ARCH_NAME=${{ matrix.arch }} | ||
--group-add 1457 | ||
-v /home/ubuntu/.ccache-ci:/home/ubuntu/.ccache | ||
-v /mnt/MLPerf/ccache:/mnt/MLPerf/ccache | ||
docker_os_arch: ${{ matrix.build.os }}-amd64 | ||
run_args: | | ||
build_command="./build_metal.sh --build-type ${{ matrix.build.type }} --cxx-compiler-path ${{ matrix.build.cxx_compiler }} --c-compiler-path ${{ matrix.build.c_compiler }} --build-tests --build-programming-examples --disable-unity-builds" | ||
set -eu # basic shell hygiene | ||
# /tmp is a tmpfs; more efficient than persisted storage | ||
mkdir -p /tmp/ccache | ||
export CCACHE_TEMPDIR=/tmp/ccache | ||
# Zero out the stats so we can see how we did this build | ||
# NOTE: may be inaccurate if we have >1 build runner on the same machine, using the same local cache | ||
ccache -z | ||
build_command="./build_metal.sh --build-type ${{ matrix.build.type }} --cxx-compiler-path ${{ matrix.build.cxx_compiler }} --c-compiler-path ${{ matrix.build.c_compiler }} --build-tests --build-programming-examples --disable-unity-builds --enable-ccache" | ||
nice -n 19 $build_command | ||
mkdir out | ||
ccache -s > out/ccache.stats | ||
- name: Publish Ccache summary | ||
run: | | ||
echo '## CCache Summary' >> $GITHUB_STEP_SUMMARY | ||
echo '```' >> $GITHUB_STEP_SUMMARY | ||
cat out/ccache.stats >> $GITHUB_STEP_SUMMARY | ||
echo '```' >> $GITHUB_STEP_SUMMARY | ||
- name: Check disk space | ||
run: | | ||
df -h | ||
|