Skip to content

Commit

Permalink
Clean up build dir
Browse files Browse the repository at this point in the history
To avoid the C++ test step failing due to suspected out-of-disk-space
  • Loading branch information
qc00 authored and alexowens90 committed Oct 12, 2023
1 parent df1891b commit 870a01c
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/build_steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
bucket: {default: 'arcticdb-ci-test-bucket-01', type: string, description: The name of the S3 bucket that we will test against}
endpoint: {default: 's3.eu-west-2.amazonaws.com', type: string, description: The address of the S3 endpoint}
region: {default: 'eu-west-2', type: string, description: The S3 region of the bucket}
clear: {default: 1, type: number, description: Controls wheather we will clear the libraries in the versions stores that we test against}
clear: {default: 1, type: number, description: Controls wheather we will clear the libraries in the versions stores that we test against}
jobs:
compile:
strategy:
Expand Down Expand Up @@ -115,6 +115,13 @@ jobs:
if: inputs.job_type == 'cpp-tests'
run: cd cpp; cmake --build --preset $ARCTIC_CMAKE_PRESET --target install

- name: Clean up build dir # To save disk space as we're close to the limit on Linux
if: inputs.job_type == 'cpp-tests' && matrix.os == 'linux'
run: |
cd $ARCTICDB_BUILD_DIR/*-build
du -m --max-depth=2 | sort -n | tail -n 50
nohup rm -rf * & # Clean up while the test is running to save build time
- name: C++ Rapidcheck
if: inputs.job_type == 'cpp-tests'
run: cpp/out/install/arcticdb_rapidcheck_tests
Expand Down Expand Up @@ -162,7 +169,7 @@ jobs:
# ========================= Common =========================
- name: Disk usage
if: always()
run: du -m . "${{matrix.build_dir}}" | sort -n | tail -n 100 ; df -h
run: du -m . "${{matrix.build_dir}}" | sort -n | tail -n 50 ; df -h
continue-on-error: true

- name: Make build directory readable for archiving
Expand Down Expand Up @@ -272,7 +279,7 @@ jobs:
aws_access_key: "${{ secrets.AWS_S3_ACCESS_KEY }}"
aws_secret_key: "${{ secrets.AWS_S3_SECRET_KEY }}"
strategy_branch: "${{ env.distinguishing_name }}"

- name: Run test
run: |
build_tooling/parallel_test.sh tests/${{matrix.type}}
Expand Down

0 comments on commit 870a01c

Please sign in to comment.