From e13e384d378353bd094ea74f7350c59e9e48c26c Mon Sep 17 00:00:00 2001 From: Federico Di Pierro Date: Fri, 13 Jun 2025 10:40:49 +0200 Subject: [PATCH] new(ci): add optional input to reusable_build_packages workflow to enable jemalloc or mimalloc. Enable mimalloc in all CIs but release CI (keep it with jemalloc for now). Signed-off-by: Federico Di Pierro --- .github/workflows/ci.yml | 2 ++ .github/workflows/master.yaml | 2 ++ .github/workflows/release.yaml | 2 ++ .../workflows/reusable_build_packages.yaml | 20 ++++++++++++++++--- 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 19f8bbaa..b0060803 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,6 +27,7 @@ jobs: version: ${{ needs.fetch-version.outputs.version }} enable_debug: true enable_sanitizers: true + use_mimalloc: true build-dev-packages-arm64: needs: [fetch-version] @@ -35,6 +36,7 @@ jobs: arch: aarch64 version: ${{ needs.fetch-version.outputs.version }} enable_debug: true + use_mimalloc: true test-dev-packages: needs: [fetch-version, build-dev-packages-x86_64] diff --git a/.github/workflows/master.yaml b/.github/workflows/master.yaml index 9f3a1e6e..46cf0ec2 100644 --- a/.github/workflows/master.yaml +++ b/.github/workflows/master.yaml @@ -18,6 +18,7 @@ jobs: with: arch: x86_64 version: ${{ needs.fetch-version.outputs.version }} + use_mimalloc: true secrets: inherit build-dev-packages-arm64: @@ -26,6 +27,7 @@ jobs: with: arch: aarch64 version: ${{ needs.fetch-version.outputs.version }} + use_mimalloc: true secrets: inherit test-dev-packages: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c3c77db0..74e3a4da 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -56,6 +56,7 @@ jobs: with: arch: x86_64 version: ${{ github.event.release.tag_name }} + use_jemalloc: true secrets: inherit build-packages-arm64: @@ -64,6 +65,7 @@ jobs: with: arch: aarch64 version: ${{ github.event.release.tag_name }} + use_jemalloc: true secrets: inherit test-packages: diff --git a/.github/workflows/reusable_build_packages.yaml b/.github/workflows/reusable_build_packages.yaml index eb9608b9..e2d021ea 100644 --- a/.github/workflows/reusable_build_packages.yaml +++ b/.github/workflows/reusable_build_packages.yaml @@ -20,6 +20,16 @@ on: required: false type: boolean default: false + use_jemalloc: + description: Use jemalloc memory allocator + required: false + type: boolean + default: false + use_mimalloc: + description: Use mimalloc memory allocator + required: false + type: boolean + default: false permissions: contents: read @@ -88,7 +98,8 @@ jobs: -DMODERN_BPF_SKEL_DIR=/tmp \ -DBUILD_DRIVER=Off \ -DBUILD_BPF=Off \ - -DUSE_JEMALLOC=ON \ + -DUSE_JEMALLOC=${{ inputs.use_jemalloc }} \ + -DUSE_MIMALLOC=${{ inputs.use_mimalloc }} \ -DFALCO_VERSION=${{ inputs.version }} - name: Build project @@ -160,7 +171,8 @@ jobs: -DMODERN_BPF_SKEL_DIR=/tmp \ -DBUILD_DRIVER=Off \ -DBUILD_BPF=Off \ - -DUSE_JEMALLOC=On \ + -DUSE_JEMALLOC=${{ inputs.use_jemalloc }} \ + -DUSE_MIMALLOC=${{ inputs.use_mimalloc }} \ -DFALCO_VERSION=${{ inputs.version }} - name: Build project @@ -209,6 +221,7 @@ jobs: -DBUILD_DRIVER=Off \ -DBUILD_BPF=Off \ -DUSE_JEMALLOC=Off \ + -DUSE_MIMALLOC=Off \ -DUSE_ASAN=On \ -DFALCO_VERSION=${{ inputs.version }} @@ -253,7 +266,8 @@ jobs: -DCMAKE_BUILD_TYPE=Release \ -DCPACK_GENERATOR=TGZ \ -DBUILD_BPF=Off -DBUILD_DRIVER=Off \ - -DUSE_JEMALLOC=On \ + -DUSE_JEMALLOC=${{ inputs.use_jemalloc }} \ + -DUSE_MIMALLOC=${{ inputs.use_mimalloc }} \ -DUSE_BUNDLED_DEPS=On \ -DMUSL_OPTIMIZED_BUILD=On \ -DFALCO_ETC_DIR=/etc/falco \