Skip to content

Commit 14ba1cf

Browse files
authored
Remove unnecessary DEB builds (#691)
We are building a few too many duplicate DEB packages, we should only build: 1. `x86_64` + `Release` 2. `x86_64` + `RelWithDebInfo` 3. `aarch64` + `Release` 4. `aarch64` + `RelWithDebInfo` 5. `x86_64` + `RelWithDebInfo` + CUDA (this has a subtly different installer) All `-malloc` builds are the same as the non-malloc builds.
1 parent e1edcc1 commit 14ba1cf

File tree

1 file changed

+30
-2
lines changed

1 file changed

+30
-2
lines changed

.github/workflows/reusable_package_mage.yaml

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ on:
7070
type: boolean
7171
description: "Update Memgraph submodule to the latest commit"
7272
default: true
73+
package_deb:
74+
type: string
75+
description: "Build deb package (true|false|default)"
76+
# default is build only for Release/RelWithDebInfo + amd64/arm64 (other combinations are not actually different)
77+
default: default
7378

7479
env:
7580
OS: "${{ inputs.arch == 'arm64' && 'ubuntu-24.04-aarch64' || 'ubuntu-24.04' }}${{ inputs.malloc && '-malloc' || '' }}${{ inputs.mage_build_type == 'RelWithDebInfo' && '-relwithdebinfo' || '' }}"
@@ -111,6 +116,29 @@ jobs:
111116
run: |
112117
./scripts/pull-e2e-docker-images.sh &
113118
119+
120+
- name: Check package deb build
121+
env:
122+
INPUT_PACKAGE_DEB: "${{ inputs.package_deb }}"
123+
run: |
124+
if [[ "$INPUT_PACKAGE_DEB" == "true" ]]; then
125+
package_deb=true
126+
elif [[ "$INPUT_PACKAGE_DEB" == "false" ]]; then
127+
package_deb=false
128+
else
129+
if [[ "$MALLOC" == true ]]; then
130+
package_deb=false
131+
else
132+
package_deb=true
133+
fi
134+
fi
135+
if [[ "$package_deb" == true ]]; then
136+
echo "Building deb package"
137+
else
138+
echo "Not building deb package"
139+
fi
140+
echo "PACKAGE_DEB=${package_deb}" >> $GITHUB_ENV
141+
114142
- name: Check mgdeps-cache availability
115143
run: |
116144
if [ "$ARCH" == "amd64" ]; then
@@ -208,7 +236,7 @@ jobs:
208236
--container-name $CONTAINER_NAME
209237
210238
- name: Build DEB package in MGBUILD container
211-
if: ${{ inputs.push_to_github || inputs.push_to_s3 }}
239+
if: ${{ (inputs.push_to_github || inputs.push_to_s3) && env.PACKAGE_DEB == 'true' }}
212240
run: |
213241
./scripts/container-package-deb.sh \
214242
--arch $ARCH \
@@ -349,7 +377,7 @@ jobs:
349377
path: "mage.tar.gz"
350378

351379
- name: Push DEB package to GitHub
352-
if: ${{ inputs.push_to_github }}
380+
if: ${{ inputs.push_to_github && env.PACKAGE_DEB == 'true' }}
353381
uses: actions/upload-artifact@v4
354382
with:
355383
name: "${ARTIFACT_NAME}-deb"

0 commit comments

Comments
 (0)