Skip to content

Commit

Permalink
ci(build-and-test): use self hosted X64 and add ccache to -daily
Browse files Browse the repository at this point in the history
Signed-off-by: M. Fatih Cırıt <[email protected]>
  • Loading branch information
xmfcx committed Dec 9, 2024
1 parent ca507d6 commit ad1ee47
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
33 changes: 32 additions & 1 deletion .github/workflows/build-and-test-daily.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
build-and-test-daily:
runs-on: [self-hosted, linux, X64, gpu]
runs-on: [self-hosted, Linux, X64]
container: ${{ matrix.container }}${{ matrix.container-suffix }}
strategy:
fail-fast: false
Expand Down Expand Up @@ -37,6 +37,33 @@ jobs:
id: get-self-packages
uses: autowarefoundation/autoware-github-actions/get-self-packages@v1

- name: Create ccache directory
run: |
mkdir -p ${CCACHE_DIR}
du -sh ${CCACHE_DIR} && ccache -s
shell: bash

- name: Attempt to restore ccache
uses: actions/cache/restore@v4
with:
path: |
/root/.ccache
key: ccache-main-${{ runner.arch }}-${{ matrix.rosdistro }}-${{ github.sha }}
restore-keys: |
ccache-main-${{ runner.arch }}-${{ matrix.rosdistro }}-
- name: Limit ccache size
run: |
rm -f "${CCACHE_DIR}/ccache.conf"
echo -e "# Set maximum cache size\nmax_size = 600MB" >> "${CCACHE_DIR}/ccache.conf"
shell: bash

- name: Show ccache stats before build and reset stats
run: |
du -sh ${CCACHE_DIR} && ccache -s
ccache --zero-stats
shell: bash

- name: Export CUDA state as a variable for adding to cache key
run: |
build_type_cuda_state=nocuda
Expand All @@ -56,6 +83,10 @@ jobs:
build-depends-repos: ${{ matrix.build-depends-repos }}
cache-key-element: ${{ env.BUILD_TYPE_CUDA_STATE }}

- name: Show ccache stats after build
run: du -sh ${CCACHE_DIR} && ccache -s
shell: bash

- name: Test
if: ${{ steps.get-self-packages.outputs.self-packages != '' }}
id: test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ env:

jobs:
build-and-test:
runs-on: codebuild-autoware-us-east-1-${{ github.run_id }}-${{ github.run_attempt }}-ubuntu-7.0-large
runs-on: [self-hosted, Linux, X64]
container: ${{ matrix.container }}${{ matrix.container-suffix }}
strategy:
fail-fast: false
Expand Down

0 comments on commit ad1ee47

Please sign in to comment.