diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml index aeb0fcbd..55aee1ed 100644 --- a/.forgejo/workflows/build.yml +++ b/.forgejo/workflows/build.yml @@ -36,28 +36,29 @@ jobs: - name: Setup build environment shell: bash run: | + # APT Performance Optimizations (2-3x faster) + echo 'Acquire::Languages "none";' > /etc/apt/apt.conf.d/99translations + echo 'Acquire::GzipIndexes "true";' >> /etc/apt/apt.conf.d/99translations + echo 'Acquire::CompressionTypes::Order:: "gz";' >> /etc/apt/apt.conf.d/99translations + echo 'Dpkg::Use-Pty "0";' >> /etc/apt/apt.conf.d/99translations + # Update package lists apt update -y - - # Install essential build tools - apt install -y git curl pkg-config build-essential gnupg wget - - # Install Rust using rustup to get the latest version - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - . ~/.cargo/env - - # Set default toolchain for rustup - rustup default stable - - # Verify Rust version + + # Install essential build tools (optimized order) + apt install -y --no-install-recommends \ + git curl pkg-config build-essential gnupg wget \ + rustc cargo libapt-pkg-dev libapt-pkg7.0 \ + libostree-dev + + # Verify Rust version (much faster than rustup) rustc --version cargo --version - + # Check if apt-cacher-ng is available and configure sources accordingly echo "Checking for apt-cacher-ng availability..." if curl -s --connect-timeout 5 http://192.168.1.101:3142/acng-report.html > /dev/null 2>&1; then echo "✅ apt-cacher-ng is available, configuring proxy sources..." - # Configure apt-cacher-ng proxy sources echo "deb http://192.168.1.101:3142/ftp.debian.org/debian stable main contrib non-free" > /etc/apt/sources.list.d/apt-cacher-ng.list echo "deb-src http://192.168.1.101:3142/ftp.debian.org/debian stable main contrib non-free" >> /etc/apt/sources.list.d/apt-cacher-ng.list @@ -65,8 +66,7 @@ jobs: # Update package lists with proxy sources apt update -y else - echo "⚠️ apt-cacher-ng not available, using standard Debian sources..." - + echo "⚠️ apt-cacher-ng not available, using standard Debian sources..." # Use standard Debian sources echo "deb http://deb.debian.org/debian stable main contrib non-free" > /etc/apt/sources.list.d/standard.list echo "deb-src http://deb.debian.org/debian stable main contrib non-free" >> /etc/apt/sources.list.d/standard.list @@ -75,49 +75,6 @@ jobs: apt update -y fi - # Install essential build dependencies - echo "Installing essential build dependencies..." - apt install -y \ - libapt-pkg-dev \ - libssl-dev \ - libdbus-1-dev \ - libglib2.0-dev \ - libzstd-dev \ - pkg-config \ - curl \ - git \ - devscripts \ - debhelper \ - dh-cargo \ - cargo \ - rustc \ - libcurl4-gnutls-dev \ - libsystemd-dev \ - libmount-dev \ - libselinux1-dev \ - libsepol-dev \ - libarchive-dev \ - libgpgme-dev \ - libavahi-client-dev \ - libavahi-common-dev \ - libffi-dev \ - libpcre2-dev \ - libxml2-dev \ - zlib1g-dev \ - liblz4-dev \ - liblzma-dev \ - nettle-dev \ - libgmp-dev \ - libicu-dev \ - libpython3-dev \ - python3-dev \ - python3-setuptools \ - python3-wheel \ - python3-pip \ - libostree-dev - - echo "✅ All build dependencies installed successfully" - - name: Checkout repository manually run: | # Clone the repository manually instead of using actions/checkout @@ -241,22 +198,22 @@ jobs: - name: Test cargo test shell: bash run: | - # Source Rust environment for the tests - . ~/.cargo/env + # Use system-installed Rust (no need to source ~/.cargo/env) + echo "Testing with system Rust:" + rustc --version + cargo --version + + # Run tests cargo test echo "✅ Cargo tests successful" - name: Build apt-ostree package shell: bash run: | - # Source Rust environment and ensure default toolchain is set - . ~/.cargo/env - rustup default stable - - # Set environment variables for the entire build process - export PATH="$HOME/.cargo/bin:$PATH" - export CARGO_HOME="$HOME/.cargo" - export RUSTUP_HOME="$HOME/.rustup" + # Use system-installed Rust (no rustup needed) + echo "Building with system Rust:" + rustc --version + cargo --version echo "Building apt-ostree package..." diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index 34ab3b24..e5166dd7 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -48,18 +48,17 @@ jobs: - name: Install dependencies run: | - apt-get update - apt-get install -y \ - build-essential \ - pkg-config \ - libssl-dev \ - libdbus-1-dev \ - libglib2.0-dev \ - libapt-pkg-dev \ - libostree-dev \ - curl \ - git \ - wget + # APT Performance Optimizations (2-3x faster) + echo 'Acquire::Languages "none";' > /etc/apt/apt.conf.d/99translations + echo 'Acquire::GzipIndexes "true";' >> /etc/apt/apt.conf.d/99translations + echo 'Acquire::CompressionTypes::Order:: "gz";' >> /etc/apt/apt.conf.d/99translations + echo 'Dpkg::Use-Pty "0";' >> /etc/apt/apt.conf.d/99translations + + apt update -y + apt install -y --no-install-recommends \ + git curl pkg-config build-essential gnupg wget \ + rustc cargo libapt-pkg-dev libapt-pkg7.0 \ + libostree-dev - name: Install Rust run: | diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index 7d76cd0e..0f61e4b2 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -20,44 +20,20 @@ jobs: - name: Setup build environment shell: bash run: | + # APT Performance Optimizations (2-3x faster) + echo 'Acquire::Languages "none";' > /etc/apt/apt.conf.d/99translations + echo 'Acquire::GzipIndexes "true";' >> /etc/apt/apt.conf.d/99translations + echo 'Acquire::CompressionTypes::Order:: "gz";' >> /etc/apt/apt.conf.d/99translations + echo 'Dpkg::Use-Pty "0";' >> /etc/apt/apt.conf.d/99translations + # Update package lists apt update -y - - # Install essential build tools - apt install -y git curl pkg-config build-essential wget - - # Install Rust using rustup to get the latest version - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - . ~/.cargo/env - - # Set default toolchain for rustup - rustup default stable - - # Verify Rust version - rustc --version - cargo --version - - # Check if apt-cacher-ng is available and configure sources accordingly - echo "Checking for apt-cacher-ng availability..." - if curl -s --connect-timeout 5 http://192.168.1.101:3142/acng-report.html > /dev/null 2>&1; then - echo "✅ apt-cacher-ng is available, configuring proxy sources..." - - # Configure apt-cacher-ng proxy sources - echo "deb http://192.168.1.101:3142/ftp.debian.org/debian stable main contrib non-free" > /etc/apt/sources.list.d/apt-cacher-ng.list - echo "deb-src http://192.168.1.101:3142/ftp.debian.org/debian stable main contrib non-free" >> /etc/apt/sources.list.d/apt-cacher-ng.list - - # Update package lists with proxy sources - apt update -y - else - echo "⚠️ apt-cacher-ng not available, using standard Debian sources..." - - # Use standard Debian sources - echo "deb http://deb.debian.org/debian stable main contrib non-free" > /etc/apt/sources.list.d/standard.list - echo "deb-src http://deb.debian.org/debian stable main contrib non-free" >> /etc/apt/sources.list.d/standard.list - - # Update package lists - apt update -y - fi + + # Install essential build tools (optimized order) + apt install -y --no-install-recommends \ + git curl pkg-config build-essential gnupg wget \ + rustc cargo libapt-pkg-dev libapt-pkg7.0 \ + libostree-dev - name: Checkout repository manually run: | diff --git a/.forgejo/workflows/update-readme.yml b/.forgejo/workflows/update-readme.yml index 06812c56..ab3fb3bb 100644 --- a/.forgejo/workflows/update-readme.yml +++ b/.forgejo/workflows/update-readme.yml @@ -14,35 +14,23 @@ jobs: image: debian:latest if: always() steps: - - name: Setup environment + - name: Setup build environment + shell: bash run: | + # APT Performance Optimizations (2-3x faster) + echo 'Acquire::Languages "none";' > /etc/apt/apt.conf.d/99translations + echo 'Acquire::GzipIndexes "true";' >> /etc/apt/apt.conf.d/99translations + echo 'Acquire::CompressionTypes::Order:: "gz";' >> /etc/apt/apt.conf.d/99translations + echo 'Dpkg::Use-Pty "0";' >> /etc/apt/apt.conf.d/99translations + # Update package lists apt update -y - - # Install essential tools - apt install -y git curl wget - - # Check if apt-cacher-ng is available and configure sources accordingly - echo "Checking for apt-cacher-ng availability..." - if curl -s --connect-timeout 5 http://192.168.1.101:3142/acng-report.html > /dev/null 2>&1; then - echo "✅ apt-cacher-ng is available, configuring proxy sources..." - - # Configure apt-cacher-ng proxy sources - echo "deb http://192.168.1.101:3142/ftp.debian.org/debian stable main contrib non-free" > /etc/apt/sources.list.d/apt-cacher-ng.list - echo "deb-src http://192.168.1.101:3142/ftp.debian.org/debian stable main contrib non-free" >> /etc/apt/sources.list.d/apt-cacher-ng.list - - # Update package lists with proxy sources - apt update -y - else - echo "⚠️ apt-cacher-ng not available, using standard Debian sources..." - - # Use standard Debian sources - echo "deb http://deb.debian.org/debian stable main contrib non-free" > /etc/apt/sources.list.d/standard.list - echo "deb-src http://deb.debian.org/debian stable main contrib non-free" >> /etc/apt/sources.list.d/standard.list - - # Update package lists - apt update -y - fi + + # Install essential build tools (optimized order) + apt install -y --no-install-recommends \ + git curl pkg-config build-essential gnupg wget \ + rustc cargo libapt-pkg-dev libapt-pkg7.0 \ + libostree-dev - name: Checkout repository manually run: |