Simplify Docker approach: run build commands directly in container
Some checks failed
Build libfuse / Build and Test (push) Failing after 1m28s

- Remove separate script file creation that was causing file sharing issues
- Execute all build commands directly in Docker container using bash -c
- Eliminate host/container file sharing complexity
- Fix 'No such file or directory' error from run #7

This approach avoids the script file sharing issues by running everything
directly in the container without intermediate files.
This commit is contained in:
robojerk 2025-09-07 16:38:23 -07:00
parent 2a4c04988b
commit 6f8d076d4b

View file

@ -41,20 +41,22 @@ jobs:
- name: Build libfuse in Debian container
run: |
# Create workspace directory if it doesn't exist
mkdir -p /workspace/particle-os/libfuse
# Create a script to run inside the container
cat > /workspace/particle-os/libfuse/build_libfuse.sh << 'EOF'
# Run the build directly in Debian container
docker run --rm \
--add-host=host.docker.internal:host-gateway \
-v /workspace/particle-os/libfuse:/workspace \
-w /workspace \
debian:trixie \
bash -c '
set -e
# Configure apt to use cacher if available
if curl -s http://host.docker.internal:3143/acng-report.html > /dev/null 2>&1; then
echo "Configuring apt to use cacher"
echo 'Acquire::http::Proxy "http://host.docker.internal:3143";' > /etc/apt/apt.conf.d/01proxy
echo 'Acquire::https::Proxy "http://host.docker.internal:3143";' >> /etc/apt/apt.conf.d/01proxy
echo 'Acquire::http::Proxy::security.debian.org "DIRECT";' >> /etc/apt/apt.conf.d/01proxy
echo 'Acquire::http::Proxy::deb.debian.org "DIRECT";' >> /etc/apt/apt.conf.d/01proxy
echo "Acquire::http::Proxy \"http://host.docker.internal:3143\";" > /etc/apt/apt.conf.d/01proxy
echo "Acquire::https::Proxy \"http://host.docker.internal:3143\";" >> /etc/apt/apt.conf.d/01proxy
echo "Acquire::http::Proxy::security.debian.org \"DIRECT\";" >> /etc/apt/apt.conf.d/01proxy
echo "Acquire::http::Proxy::deb.debian.org \"DIRECT\";" >> /etc/apt/apt.conf.d/01proxy
else
echo "Apt-cacher-ng not available, using direct connection"
fi
@ -116,7 +118,7 @@ jobs:
cp /usr/lib/pkgconfig/fuse3.pc libfuse3-3_3.10.0-1_amd64/usr/lib/pkgconfig/
# Create control file
cat > libfuse3-3_3.10.0-1_amd64/DEBIAN/control << 'CONTROL_EOF'
cat > libfuse3-3_3.10.0-1_amd64/DEBIAN/control << "CONTROL_EOF"
Package: libfuse3-3
Version: 3.10.0-1
Section: libs
@ -142,21 +144,7 @@ jobs:
# Verify the library is available
ldconfig -p | grep libfuse3
pkg-config --exists fuse3 && echo "fuse3.pc found" || echo "fuse3.pc not found"
EOF
# Make the script executable
chmod +x /workspace/particle-os/libfuse/build_libfuse.sh
# Verify the script exists and is executable
ls -la /workspace/particle-os/libfuse/build_libfuse.sh
# Run the build script in Debian container
docker run --rm \
--add-host=host.docker.internal:host-gateway \
-v /workspace/particle-os/libfuse:/workspace \
-w /workspace \
debian:trixie \
bash build_libfuse.sh
'
- name: Prepare artifacts
run: |