🚀 Upgrade to rust:slim-trixie container - Major performance boost
- ✅ Switch from debian:latest to rust:slim-trixie - 🦀 Rust and git pre-installed (no more 'git: not found' errors) - 📦 Debian Trixie base (matches target platform) - ⚡ Faster builds (skip Rust installation step) - 🔧 Update APT sources to trixie (stable → trixie) - 🎯 Target: Eliminate dependency installation issues
This commit is contained in:
parent
8b96be310d
commit
079e67e9ac
1 changed files with 33 additions and 35 deletions
|
|
@ -17,7 +17,7 @@ jobs:
|
||||||
name: Build and Test
|
name: Build and Test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: debian:latest
|
image: rust:slim-trixie
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Setup environment
|
- name: Setup environment
|
||||||
|
|
@ -35,13 +35,13 @@ jobs:
|
||||||
echo "Checking for apt-cacher-ng availability..."
|
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
|
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..."
|
echo "✅ apt-cacher-ng is available, configuring 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 http://192.168.1.101:3142/ftp.debian.org/debian trixie 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
|
echo "deb-src http://192.168.1.101:3142/ftp.debian.org/debian trixie main contrib non-free" >> /etc/apt/sources.list.d/apt-cacher-ng.list
|
||||||
apt update -y
|
apt update -y
|
||||||
else
|
else
|
||||||
echo "⚠️ apt-cacher-ng not available, using standard Debian sources..."
|
echo "⚠️ apt-cacher-ng not available, using standard Debian sources..."
|
||||||
echo "deb http://deb.debian.org/debian stable main contrib non-free" > /etc/apt/sources.list.d/standard.list
|
echo "deb http://deb.debian.org/debian trixie 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
|
echo "deb-src http://deb.debian.org/debian trixie main contrib non-free" >> /etc/apt/sources.list.d/standard.list
|
||||||
apt update -y
|
apt update -y
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -49,19 +49,17 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
apt update -y
|
apt update -y
|
||||||
apt install -y --no-install-recommends \
|
apt install -y --no-install-recommends \
|
||||||
git curl pkg-config build-essential gnupg wget \
|
pkg-config build-essential gnupg wget \
|
||||||
rustc cargo libapt-pkg-dev libapt-pkg7.0 \
|
libapt-pkg-dev libapt-pkg7.0 libostree-dev \
|
||||||
libostree-dev libssl-dev libdbus-1-dev \
|
libssl-dev libdbus-1-dev libglib2.0-dev \
|
||||||
libglib2.0-dev libzstd-dev devscripts \
|
libzstd-dev devscripts debhelper dh-cargo \
|
||||||
debhelper dh-cargo libcurl4-gnutls-dev \
|
libcurl4-gnutls-dev libsystemd-dev libmount-dev \
|
||||||
libsystemd-dev libmount-dev libselinux1-dev \
|
libselinux1-dev libsepol-dev libarchive-dev \
|
||||||
libsepol-dev libarchive-dev libgpgme-dev \
|
libgpgme-dev libavahi-client-dev libavahi-common-dev \
|
||||||
libavahi-client-dev libavahi-common-dev \
|
libffi-dev libpcre2-dev libxml2-dev zlib1g-dev \
|
||||||
libffi-dev libpcre2-dev libxml2-dev \
|
liblz4-dev liblzma-dev nettle-dev libgmp-dev \
|
||||||
zlib1g-dev liblz4-dev liblzma-dev \
|
libicu-dev libpython3-dev python3-dev \
|
||||||
nettle-dev libgmp-dev libicu-dev \
|
python3-setuptools python3-wheel python3-pip
|
||||||
libpython3-dev python3-dev python3-setuptools \
|
|
||||||
python3-wheel python3-pip
|
|
||||||
|
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -72,7 +70,7 @@ jobs:
|
||||||
|
|
||||||
- name: Verify Rust installation
|
- name: Verify Rust installation
|
||||||
run: |
|
run: |
|
||||||
echo "Using system-installed Rust:"
|
echo "Using pre-installed Rust from rust:slim-trixie:"
|
||||||
rustc --version
|
rustc --version
|
||||||
cargo --version
|
cargo --version
|
||||||
|
|
||||||
|
|
@ -176,7 +174,7 @@ EOF
|
||||||
echo '' >> CI_SUMMARY.md
|
echo '' >> CI_SUMMARY.md
|
||||||
echo '## Build Status' >> CI_SUMMARY.md
|
echo '## Build Status' >> CI_SUMMARY.md
|
||||||
echo '- **Status**: ✅ SUCCESS' >> CI_SUMMARY.md
|
echo '- **Status**: ✅ SUCCESS' >> CI_SUMMARY.md
|
||||||
echo '- **Container**: debian:latest' >> CI_SUMMARY.md
|
echo '- **Container**: rust:slim-trixie' >> CI_SUMMARY.md
|
||||||
echo '- **Rust Version**: '"$(rustc --version)" >> CI_SUMMARY.md
|
echo '- **Rust Version**: '"$(rustc --version)" >> CI_SUMMARY.md
|
||||||
echo '- **Cargo Version**: '"$(cargo --version)" >> CI_SUMMARY.md
|
echo '- **Cargo Version**: '"$(cargo --version)" >> CI_SUMMARY.md
|
||||||
echo '' >> CI_SUMMARY.md
|
echo '' >> CI_SUMMARY.md
|
||||||
|
|
@ -212,7 +210,7 @@ EOF
|
||||||
name: Security Audit
|
name: Security Audit
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: debian:latest
|
image: rust:slim-trixie
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Setup environment
|
- name: Setup environment
|
||||||
|
|
@ -222,20 +220,19 @@ EOF
|
||||||
# Check if apt-cacher-ng is available
|
# Check if apt-cacher-ng is available
|
||||||
if curl -s --connect-timeout 5 http://192.168.1.101:3142/acng-report.html > /dev/null 2>&1; then
|
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..."
|
echo "✅ apt-cacher-ng is available, configuring 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 http://192.168.1.101:3142/ftp.debian.org/debian trixie 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
|
echo "deb-src http://192.168.1.101:3142/ftp.debian.org/debian trixie main contrib non-free" >> /etc/apt/sources.list.d/apt-cacher-ng.list
|
||||||
apt update -y
|
apt update -y
|
||||||
else
|
else
|
||||||
echo "⚠️ apt-cacher-ng not available, using standard Debian sources..."
|
echo "⚠️ apt-cacher-ng not available, using standard Debian sources..."
|
||||||
echo "deb http://deb.debian.org/debian stable main contrib non-free" > /etc/apt/sources.list.d/standard.list
|
echo "deb http://deb.debian.org/debian trixie 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
|
echo "deb-src http://deb.debian.org/debian trixie main contrib non-free" >> /etc/apt/sources.list.d/standard.list
|
||||||
apt update -y
|
apt update -y
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Install Rust and security tools
|
- name: Install security tools
|
||||||
run: |
|
run: |
|
||||||
apt install -y --no-install-recommends \
|
apt install -y --no-install-recommends cargo-audit
|
||||||
rustc cargo cargo-audit
|
|
||||||
|
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -257,7 +254,7 @@ EOF
|
||||||
name: Package Validation
|
name: Package Validation
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: debian:latest
|
image: rust:slim-trixie
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Setup environment
|
- name: Setup environment
|
||||||
|
|
@ -267,20 +264,20 @@ EOF
|
||||||
# Check if apt-cacher-ng is available
|
# Check if apt-cacher-ng is available
|
||||||
if curl -s --connect-timeout 5 http://192.168.1.101:3142/acng-report.html > /dev/null 2>&1; then
|
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..."
|
echo "✅ apt-cacher-ng is available, configuring 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 http://192.168.1.101:3142/ftp.debian.org/debian trixie 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
|
echo "deb-src http://192.168.1.101:3142/ftp.debian.org/debian trixie main contrib non-free" >> /etc/apt/sources.list.d/apt-cacher-ng.list
|
||||||
apt update -y
|
apt update -y
|
||||||
else
|
else
|
||||||
echo "⚠️ apt-cacher-ng not available, using standard Debian sources..."
|
echo "⚠️ apt-cacher-ng not available, using standard Debian sources..."
|
||||||
echo "deb http://deb.debian.org/debian stable main contrib non-free" > /etc/apt/sources.list.d/standard.list
|
echo "deb http://deb.debian.org/debian trixie 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
|
echo "deb-src http://deb.debian.org/debian trixie main contrib non-free" >> /etc/apt/sources.list.d/standard.list
|
||||||
apt update -y
|
apt update -y
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Install package tools
|
- name: Install package tools
|
||||||
run: |
|
run: |
|
||||||
apt install -y --no-install-recommends \
|
apt install -y --no-install-recommends \
|
||||||
rustc cargo devscripts debhelper dh-cargo
|
devscripts debhelper dh-cargo
|
||||||
|
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -316,7 +313,7 @@ EOF
|
||||||
name: Status Report
|
name: Status Report
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: debian:latest
|
image: rust:slim-trixie
|
||||||
needs: [build-and-test, security, package]
|
needs: [build-and-test, security, package]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
@ -339,6 +336,7 @@ EOF
|
||||||
echo "- **Commit**: $(git rev-parse --short HEAD 2>/dev/null || echo 'Unknown')" >> STATUS_REPORT.md
|
echo "- **Commit**: $(git rev-parse --short HEAD 2>/dev/null || echo 'Unknown')" >> STATUS_REPORT.md
|
||||||
echo "- **Branch**: $(git branch --show-current 2>/dev/null || echo 'Unknown')" >> STATUS_REPORT.md
|
echo "- **Branch**: $(git branch --show-current 2>/dev/null || echo 'Unknown')" >> STATUS_REPORT.md
|
||||||
echo "- **Date**: $(date '+%Y-%m-%d %H:%M:%S UTC')" >> STATUS_REPORT.md
|
echo "- **Date**: $(date '+%Y-%m-%d %H:%M:%S UTC')" >> STATUS_REPORT.md
|
||||||
|
echo "- **Container**: rust:slim-trixie" >> STATUS_REPORT.md
|
||||||
echo "" >> STATUS_REPORT.md
|
echo "" >> STATUS_REPORT.md
|
||||||
echo "All CI jobs completed successfully! 🎉" >> STATUS_REPORT.md
|
echo "All CI jobs completed successfully! 🎉" >> STATUS_REPORT.md
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue