Skip to content
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

wip: sccache #2111

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ jobs:
id: get-new-skeleton-builder
if: steps.builder-files.outputs.any_changed == 'true'
run: |
echo "name=skeleton_builder_image::${{ (github.event.pull_request.number != '') && format('{0}:{1}', env.SKEL_BUILDER_IMAGE_BASE, github.event.pull_request.number) || env.SKEL_BUILDER_DEV }}" >> $GITHUB_OUTPUT
echo "skeleton_builder_image=${{ (github.event.pull_request.number != '') && format('{0}:{1}', env.SKEL_BUILDER_IMAGE_BASE, github.event.pull_request.number) || env.SKEL_BUILDER_DEV }}" >> $GITHUB_OUTPUT

- name: Get new builder image tag
id: get-new-builder
if: steps.builder-files.outputs.any_changed == 'true'
run: |
echo "name=builder_image::${{ (github.event.pull_request.number != '') && format('{0}:{1}', env.BUILDER_IMAGE_BASE, github.event.pull_request.number) || env.BUILDER_DEV }}" >> $GITHUB_OUTPUT
echo "builder_image=${{ (github.event.pull_request.number != '') && format('{0}:{1}', env.BUILDER_IMAGE_BASE, github.event.pull_request.number) || env.BUILDER_DEV }}" >> $GITHUB_OUTPUT

- name: Build new skeleton builder
id: skeleton-builder
Expand Down Expand Up @@ -132,6 +132,8 @@ jobs:
path: /build-skeleton
key: build-skeleton-${{ github.run_id }}
restore-keys: build-skeleton-
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- name: Build
run: build cmake
- name: Build packages
Expand All @@ -142,6 +144,9 @@ jobs:
name: sysdig-dev-linux-x86_64.rpm
path: |
/build/release/sysdig-*.rpm
- name: Run sccache stat for check
shell: bash
run: ${SCCACHE_PATH} --show-stats
- name: Upload deb package
uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -184,6 +189,8 @@ jobs:
uses: docker/setup-qemu-action@v2
with:
platforms: 'amd64,arm64'
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- name: Run the build skeleton process with Docker
uses: addnab/docker-run-action@v3
with:
Expand All @@ -209,6 +216,9 @@ jobs:
build cmake && \
build package && \
cp /build/release/sysdig-* /build/dev-packages
- name: Run sccache stat for check
shell: bash
run: ${SCCACHE_PATH} --show-stats
- name: Upload deb package
uses: actions/upload-artifact@v3
with:
Expand Down
2 changes: 2 additions & 0 deletions docker/builder/root/usr/bin/build
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ case "$CMD" in
-DBUILD_WARNINGS_AS_ERRORS="$BUILD_WARNINGS_AS_ERRORS"
-DSYSDIG_VERSION="$BUILD_VERSION"
-DUSE_BUNDLED_DEPS=ON
-DCMAKE_C_COMPILER_LAUNCHER=sccache
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache
)

if [ ! -z "${FALCOSECURITY_LIBS_SOURCE_DIR:=}" ]; then
Expand Down
Loading