Simplify Docker approach: run build commands directly in container
Some checks failed
Build libfuse / Build and Test (push) Failing after 1m28s
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:
parent
2a4c04988b
commit
6f8d076d4b
1 changed files with 13 additions and 25 deletions
|
|
@ -41,20 +41,22 @@ jobs:
|
||||||
|
|
||||||
- name: Build libfuse in Debian container
|
- name: Build libfuse in Debian container
|
||||||
run: |
|
run: |
|
||||||
# Create workspace directory if it doesn't exist
|
# Run the build directly in Debian container
|
||||||
mkdir -p /workspace/particle-os/libfuse
|
docker run --rm \
|
||||||
|
--add-host=host.docker.internal:host-gateway \
|
||||||
# Create a script to run inside the container
|
-v /workspace/particle-os/libfuse:/workspace \
|
||||||
cat > /workspace/particle-os/libfuse/build_libfuse.sh << 'EOF'
|
-w /workspace \
|
||||||
|
debian:trixie \
|
||||||
|
bash -c '
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Configure apt to use cacher if available
|
# Configure apt to use cacher if available
|
||||||
if curl -s http://host.docker.internal:3143/acng-report.html > /dev/null 2>&1; then
|
if curl -s http://host.docker.internal:3143/acng-report.html > /dev/null 2>&1; then
|
||||||
echo "Configuring apt to use cacher"
|
echo "Configuring apt to use cacher"
|
||||||
echo 'Acquire::http::Proxy "http://host.docker.internal:3143";' > /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::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::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::deb.debian.org \"DIRECT\";" >> /etc/apt/apt.conf.d/01proxy
|
||||||
else
|
else
|
||||||
echo "Apt-cacher-ng not available, using direct connection"
|
echo "Apt-cacher-ng not available, using direct connection"
|
||||||
fi
|
fi
|
||||||
|
|
@ -116,7 +118,7 @@ jobs:
|
||||||
cp /usr/lib/pkgconfig/fuse3.pc libfuse3-3_3.10.0-1_amd64/usr/lib/pkgconfig/
|
cp /usr/lib/pkgconfig/fuse3.pc libfuse3-3_3.10.0-1_amd64/usr/lib/pkgconfig/
|
||||||
|
|
||||||
# Create control file
|
# 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
|
Package: libfuse3-3
|
||||||
Version: 3.10.0-1
|
Version: 3.10.0-1
|
||||||
Section: libs
|
Section: libs
|
||||||
|
|
@ -142,21 +144,7 @@ jobs:
|
||||||
# Verify the library is available
|
# Verify the library is available
|
||||||
ldconfig -p | grep libfuse3
|
ldconfig -p | grep libfuse3
|
||||||
pkg-config --exists fuse3 && echo "fuse3.pc found" || echo "fuse3.pc not found"
|
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
|
- name: Prepare artifacts
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue