Skip to content

Commit b5dee2a

Browse files
committed
1
1 parent cafddd7 commit b5dee2a

File tree

2 files changed

+48
-52
lines changed

2 files changed

+48
-52
lines changed

.github/workflows/build-cpack-packages.yml

Lines changed: 16 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -47,29 +47,24 @@ jobs:
4747
- name: Build packages
4848
run: make build-package
4949

50-
- name: Install driver dev package (DEB)
51-
run: make -C packaging/smoke-test-app install-driver-dev-deb
50+
- name: Install driver dev package
51+
run: make -C packaging/smoke-test-app install-driver-dev
5252

53-
- name: Build smoke-test application package (DEB)
53+
- name: Build smoke-test application package
5454
run: make -C packaging/smoke-test-app package
5555

56-
- name: Install driver dev package (DEB)
57-
run: make -C packaging/smoke-test-app install-driver-dev-deb
58-
59-
- name: Install smoke-test application package (DEB)
60-
run: make -C packaging/smoke-test-app install-app-deb
56+
- name: Install smoke-test application package
57+
run: make -C packaging/smoke-test-app install-app
6158

62-
- name: Run smoke-test application against local Scylla
63-
run: make -C packaging/smoke-test-app test-package
59+
- name: Test smoke-test application
60+
run: make -C packaging/smoke-test-app test-app-package
6461

6562
- name: Collect artifacts
6663
run: |
6764
set -euo pipefail
6865
shopt -s nullglob
6966
mkdir -p artifacts/linux
70-
for file in build/*.deb build/*.rpm \
71-
packaging/smoke-test-app/build/*.deb \
72-
packaging/smoke-test-app/build/*.rpm; do
67+
for file in build/*.deb build/*.rpm; do
7368
cp "$file" artifacts/linux/
7469
done
7570
@@ -89,47 +84,17 @@ jobs:
8984
- name: Build packages
9085
run: make build-package
9186

92-
- name: Build smoke-test application package
93-
run: make -C packaging/smoke-test-app package BUILD_TYPE=${{ inputs.build-type }}
94-
95-
- name: Install driver packages (pkg)
96-
run: |
97-
set -euo pipefail
98-
shopt -s nullglob
99-
packages=(build/*.pkg)
100-
if [ "${#packages[@]}" -eq 0 ]; then
101-
echo "No driver pkg packages produced"
102-
exit 1
103-
fi
104-
echo "Installing ${#packages[@]} pkg package(s):"
105-
for pkg in "${packages[@]}"; do
106-
echo " - $(basename "$pkg")"
107-
done
108-
# Install all packages (macOS productbuild creates a single package with components)
109-
for pkg in "${packages[@]}"; do
110-
sudo installer -pkg "$pkg" -target /
111-
done
87+
- name: Install driver dev package
88+
run: make -C packaging/smoke-test-app install-driver-dev
11289

113-
- name: Verify dev package installation
114-
run: |
115-
set -euo pipefail
116-
# Verify headers are installed
117-
if [ ! -f /usr/local/include/cassandra.h ]; then
118-
echo "ERROR: cassandra.h header not found - dev package may not be installed"
119-
exit 1
120-
fi
121-
# Verify pkg-config file is installed
122-
if ! PKG_CONFIG_PATH=/usr/local/lib/pkgconfig pkg-config --exists scylla-cpp-driver; then
123-
echo "ERROR: scylla-cpp-driver.pc not found - dev package may not be installed"
124-
exit 1
125-
fi
126-
echo "Dev package verification successful"
90+
- name: Build smoke-test application package
91+
run: make -C packaging/smoke-test-app package
12792

128-
- name: Install smoke-test application package (pkg)
129-
run: make -C packaging/smoke-test-app install-app-pkg
93+
- name: Install smoke-test application package
94+
run: make -C packaging/smoke-test-app install-app
13095

131-
- name: Run smoke-test application against local Scylla
132-
run: make -C packaging/smoke-test-app test-package
96+
- name: Test smoke-test application
97+
run: make -C packaging/smoke-test-app test-app-package
13398

13499
- name: Collect artifacts
135100
run: |

packaging/smoke-test-app/Makefile

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,37 @@ install-driver-pkg:
145145
package_nane="scylla-rs-driver PKG"
146146
${INSTALL_PACKAGE_SCRIPT}
147147

148+
ifeq ($(OS_TYPE),macos)
149+
install-driver: install-driver-pkg
150+
install-driver-dev: install-driver-dev-pkg
151+
install-app: install-app-pkg
152+
153+
else ifeq ($(OS_TYPE),windows)
154+
install-driver:
155+
echo "NOT IMPLEMENTED"
156+
exit 1
157+
install-driver-dev:
158+
echo "NOT IMPLEMENTED"
159+
exit 1
160+
install-app:
161+
echo "NOT IMPLEMENTED"
162+
exit 1
163+
164+
else ifeq ($(shell command -v dpkg >/dev/null 2>&1 && echo yes),yes)
165+
install-driver:
166+
$(MAKE) install-driver-deb
167+
install-driver-dev:
168+
$(MAKE) install-driver-dev-deb
169+
install-app:
170+
$(MAKE) install-app-deb
171+
else
172+
install-driver:
173+
$(MAKE) install-driver-rpm
174+
install-driver-dev:
175+
$(MAKE) install-driver-dev-rpm
176+
install-app:
177+
$(MAKE) install-app-rpm
178+
endif
148179
#ifeq ($(OS_TYPE),macos)
149180
#.install-package: .install-package-macos-pkg
150181
#else ifeq ($(OS_TYPE),windows)
@@ -153,7 +184,7 @@ install-driver-pkg:
153184
#.install-package:
154185
#endif
155186

156-
test-package: .prepare-for-test
187+
test-app-package: .prepare-for-test
157188
@cleanup() {\
158189
sudo docker compose -f tests/examples_cluster/docker-compose.yml down --remove-orphans;\
159190
};\

0 commit comments

Comments
 (0)