Skip to content

Commit 6ddcc4d

Browse files
committed
Fix GitHub Actions build issues and add Docker testing
Workflow fixes: - Remove non-existent qtnetwork5-dev package from Linux build - Remove invalid Qt5 modules from Windows build (qtmultimedia/qtnetwork are included in base) - Fix package names for Ubuntu 20.04 compatibility Docker testing tools: - Add Dockerfile.ubuntu for local Linux build testing - Add test-linux-build.sh script for podman/docker testing - Enables debugging build issues locally before pushing These fixes address the package installation failures in both Windows and Linux GitHub Actions workflows.
1 parent cb6063c commit 6ddcc4d

File tree

4 files changed

+156
-3
lines changed

4 files changed

+156
-3
lines changed

.github/workflows/build-linux.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ jobs:
6868
qt5-default \
6969
qtbase5-dev \
7070
qtmultimedia5-dev \
71-
qtnetwork5-dev \
72-
libqt5multimedia5-plugins
71+
libqt5multimedia5-plugins \
72+
libqt5network5
7373
7474
- name: Install additional packaging tools
7575
run: |

.github/workflows/build-windows.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ jobs:
3232
host: 'windows'
3333
target: 'desktop'
3434
arch: 'win64_msvc2019_64'
35-
modules: 'qtmultimedia qtnetwork'
35+
# Note: qtmultimedia and qtnetwork are included in base Qt5 installation
36+
# modules: 'qtmultimedia qtnetwork' # These aren't separate modules in 5.15.2
3637
setup-python: 'false'
3738

3839
- name: Setup MSVC

docker/Dockerfile.ubuntu

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Dockerfile for testing Linux build locally
2+
# Based on Ubuntu 20.04 LTS (same as GitHub Actions)
3+
4+
FROM ubuntu:20.04
5+
6+
# Prevent interactive prompts during package installation
7+
ENV DEBIAN_FRONTEND=noninteractive
8+
ENV TZ=UTC
9+
10+
# Install system dependencies (same as GitHub Actions workflow)
11+
RUN apt-get update && apt-get install -y \
12+
build-essential \
13+
cmake \
14+
git \
15+
pkg-config \
16+
libtool \
17+
autoconf \
18+
automake \
19+
libgl1-mesa-dev \
20+
libglu1-mesa-dev \
21+
libxrandr-dev \
22+
libxss-dev \
23+
libxcursor-dev \
24+
libxinerama-dev \
25+
libxi-dev \
26+
libxext-dev \
27+
libxfixes-dev \
28+
libxrender-dev \
29+
libxcb1-dev \
30+
libx11-xcb-dev \
31+
libxcb-glx0-dev \
32+
libfontconfig1-dev \
33+
libfreetype6-dev \
34+
libxcb-dri2-0-dev \
35+
libxcb-dri3-dev \
36+
libxcb-present-dev \
37+
libxcb-sync-dev \
38+
libxshmfence-dev \
39+
libasound2-dev \
40+
libpulse-dev \
41+
file \
42+
wget \
43+
fuse \
44+
&& rm -rf /var/lib/apt/lists/*
45+
46+
# Install Qt5 (same as workflow)
47+
RUN apt-get update && apt-get install -y \
48+
qt5-default \
49+
qtbase5-dev \
50+
qtmultimedia5-dev \
51+
libqt5multimedia5-plugins \
52+
libqt5network5 \
53+
&& rm -rf /var/lib/apt/lists/*
54+
55+
# Install packaging tools
56+
RUN apt-get update && apt-get install -y \
57+
dpkg-dev \
58+
fakeroot \
59+
&& rm -rf /var/lib/apt/lists/*
60+
61+
# Set up working directory
62+
WORKDIR /workspace
63+
64+
# Copy source code (will be mounted)
65+
# COPY . .
66+
67+
# Default command
68+
CMD ["/bin/bash"]

docker/test-linux-build.sh

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
#!/bin/bash
2+
#
3+
# test-linux-build.sh - Test Linux build locally using Docker
4+
#
5+
# This script builds a Docker container matching the GitHub Actions Linux
6+
# environment and tests the build process locally for debugging.
7+
#
8+
9+
set -e
10+
11+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
12+
PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
13+
14+
echo "=== Testing Linux Build with Docker ==="
15+
echo "Project root: $PROJECT_ROOT"
16+
17+
# Build container image with podman
18+
echo "Building container image with podman..."
19+
podman build -t fujisan-linux-test -f "$SCRIPT_DIR/Dockerfile.ubuntu" "$SCRIPT_DIR"
20+
21+
# Run the build in container
22+
echo "Running Linux build test..."
23+
podman run --rm \
24+
-v "$PROJECT_ROOT:/workspace" \
25+
-w /workspace \
26+
-e FUJISAN_VERSION="v1.0.0-test" \
27+
fujisan-linux-test \
28+
bash -c '
29+
echo "=== Docker Environment Info ==="
30+
echo "OS: $(cat /etc/os-release | grep PRETTY_NAME)"
31+
echo "CMAKE: $(cmake --version | head -1)"
32+
echo "Qt5: $(qmake -query QT_VERSION)"
33+
echo "GCC: $(gcc --version | head -1)"
34+
echo ""
35+
36+
echo "=== Starting Build Process ==="
37+
38+
# Create build directory
39+
mkdir -p build-release
40+
cd build-release
41+
42+
# Configure CMake (this should download and build libatari800)
43+
echo "Configuring CMake..."
44+
cmake -DCMAKE_BUILD_TYPE=Release \
45+
-DCMAKE_INSTALL_PREFIX=/usr \
46+
-DFUJISAN_VERSION="${FUJISAN_VERSION:-dev}" \
47+
..
48+
49+
echo "Building Fujisan..."
50+
make -j$(nproc)
51+
52+
# Verify libatari800 integration
53+
echo "=== Verifying Build Results ==="
54+
if [ -f "atari800-src/src/libatari800.a" ]; then
55+
echo "✓ libatari800.a found and integrated"
56+
ls -lh atari800-src/src/libatari800.a
57+
else
58+
echo "❌ libatari800.a not found"
59+
echo "Looking for libatari800 files:"
60+
find . -name "*libatari800*" -o -name "*atari800*" | head -10
61+
exit 1
62+
fi
63+
64+
# Test binary
65+
echo "Testing Fujisan binary..."
66+
if [ -f "Fujisan" ]; then
67+
echo "✓ Fujisan binary created"
68+
ldd Fujisan | head -10
69+
file Fujisan
70+
./Fujisan --help || echo "(Help command may not be available)"
71+
else
72+
echo "❌ Fujisan binary not found"
73+
ls -la
74+
exit 1
75+
fi
76+
77+
echo ""
78+
echo "=== Build Test Completed Successfully! ==="
79+
'
80+
81+
echo ""
82+
echo "=== Docker Build Test Summary ==="
83+
echo "If the build completed successfully, the Linux workflow should work."
84+
echo "If there were errors, we can debug them locally before pushing fixes."

0 commit comments

Comments
 (0)