-
Notifications
You must be signed in to change notification settings - Fork 145
Improve CI compile times by fixing the sccache mechanism #2208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,7 +48,15 @@ jobs: | |
runs-on: ${{ needs.start_ec2_runner.status != 'failure' && needs.start_ec2_runner.outputs.label || matrix.distro}} | ||
container: ${{ (matrix.os == 'linux' && inputs.job_type != 'build-python-wheels') && matrix.container || null}} | ||
env: | ||
SCCACHE_GHA_VERSION: ${{vars.SCCACHE_GHA_VERSION || 1}} # Setting this env var enables the caching | ||
# 0 - uses S3 Cache, 1 - does uses GHA cache | ||
# this was extract PRs can use the GHA cache | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Think there's a typo in this sentence, I don't understand it |
||
SCCACHE_GHA_VERSION: ${{secrets.AWS_S3_ACCESS_KEY && 0 || 1}} | ||
SCCACHE_BUCKET: arcticdb-ci-sccache-bucket | ||
SCCACHE_ENDPOINT: http://s3.eu-west-1.amazonaws.com | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you know what region our CI runners run in? Allegedly they're all in the US, so that might be a better location for the cache. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will test this next week |
||
SCCACHE_REGION: eu-west-1 | ||
SCCACHE_S3_USE_SSL: false | ||
AWS_ACCESS_KEY_ID: ${{secrets.AWS_S3_ACCESS_KEY}} | ||
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_S3_SECRET_KEY}} | ||
VCPKG_NUGET_USER: ${{secrets.VCPKG_NUGET_USER || github.repository_owner}} | ||
VCPKG_NUGET_TOKEN: ${{secrets.VCPKG_NUGET_TOKEN || secrets.GITHUB_TOKEN}} | ||
VCPKG_MAN_NUGET_USER: ${{secrets.VCPKG_MAN_NUGET_USER}} # For forks to download pre-compiled dependencies from the Man repo | ||
|
@@ -63,6 +71,7 @@ jobs: | |
VCPKG_BINARY_SOURCES VCPKG_NUGET_USER VCPKG_NUGET_TOKEN VCPKG_MAN_NUGET_USER VCPKG_MAN_NUGET_TOKEN | ||
CMAKE_C_COMPILER_LAUNCHER CMAKE_CXX_COMPILER_LAUNCHER CMAKE_BUILD_PARALLEL_LEVEL ARCTIC_CMAKE_PRESET | ||
ARCTICDB_BUILD_DIR TEST_OUTPUT_DIR ARCTICDB_VCPKG_INSTALLED_DIR ARCTICDB_VCPKG_PACKAGES_DIR | ||
SCCACHE_BUCKET SCCACHE_ENDPOINT AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY SCCACHE_REGION SCCACHE_S3_USE_SSL | ||
ARCTICDB_DEBUG_FIND_PYTHON: ${{vars.ARCTICDB_DEBUG_FIND_PYTHON}} | ||
python_impl_name: ${{inputs.python3 > 0 && format('cp3{0}', inputs.python3) || 'default'}} | ||
CIBW_BUILD: ${{format('cp3{0}-{1}', inputs.python3, matrix.cibw_build_suffix)}} | ||
|
@@ -101,16 +110,12 @@ jobs: | |
CMAKE_BUILD_PARALLEL_LEVEL: ${{vars.CMAKE_BUILD_PARALLEL_LEVEL}} | ||
|
||
# ========================= Leader steps ========================= | ||
- name: Remove GitHub default packages (baseimage) # To save space | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is no longer needed as the cache is reducing the compilation load, i.e. no as much disk space is needed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. May still need it if we ever tear down (or invalidate) the whole cache? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doesn't seem like it, the wheels build was able to run even when an empty cache (when I changed to S3) |
||
if: inputs.job_type == 'build-python-wheels' && matrix.os == 'linux' | ||
uses: jlumbroso/free-disk-space@main | ||
|
||
- name: Remove GitHub default packages (manylinux) # To save space | ||
if: inputs.job_type == 'cpp-tests' && matrix.os == 'linux' | ||
run: | | ||
du -m /mnt/usr/local/lib/ | sort -n | tail -n 50 | ||
nohup rm -rf /mnt/usr/local/lib/android & | ||
|
||
- name: Find and remove ccache # See PR: #945 | ||
if: matrix.os == 'windows' | ||
run: rm $(which ccache) || true | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
does uses
should beuses