Fix Forgejo CI compatibility issues

- Remove GitHub Actions specific syntax (actions/checkout@v4, actions/upload-artifact@v3)
- Replace with Forgejo-compatible alternatives (manual git clone, summary creation)
- Remove actions-rs/toolchain@v1 dependency
- Remove actions/cache@v3 dependency
- All workflows now use pure Forgejo-compatible syntax
- Maintain apt-cacher-ng support and debian:latest containers
This commit is contained in:
joe 2025-08-13 16:28:09 -07:00
parent f8621566fc
commit 9c7cbfffac
4 changed files with 101 additions and 103 deletions

View file

@ -299,13 +299,6 @@ jobs:
echo "❌ No main package found to test"
fi
- name: Upload built packages
uses: actions/upload-artifact@v3
with:
name: apt-ostree-packages
path: ../*.deb ../*.ddeb ../*.changes ../*.buildinfo
retention-days: 30
- name: Publish to Forgejo Package Registry
if: success()
run: |
@ -398,10 +391,4 @@ jobs:
echo "- All build dependencies satisfied ✅" >> BUILD_SUMMARY.md
echo "Build summary created: BUILD_SUMMARY.md"
- name: Upload build summary
uses: actions/upload-artifact@v3
with:
name: build-summary
path: BUILD_SUMMARY.md
retention-days: 30
echo "Build completed successfully! 🎉"

View file

@ -34,9 +34,11 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
run: |
# Clone the repository manually instead of using actions/checkout
git clone https://git.raines.xyz/robojerk/apt-ostree.git /tmp/apt-ostree
cp -r /tmp/apt-ostree/* .
cp -r /tmp/apt-ostree/.* . 2>/dev/null || true
- name: Setup build environment
shell: bash
@ -88,35 +90,31 @@ jobs:
wget
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
override: true
- name: Cache Rust dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
run: |
# Install Rust using rustup
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
. ~/.cargo/env
rustup default stable
rustup target add ${{ matrix.target }}
- name: Build project
run: |
. ~/.cargo/env
cargo build --target ${{ matrix.target }} --verbose
- name: Run unit tests
run: |
. ~/.cargo/env
cargo test --target ${{ matrix.target }} --verbose
- name: Run integration tests
run: |
. ~/.cargo/env
cargo test --target ${{ matrix.target }} --test integration_tests --verbose
- name: Check code quality
run: |
. ~/.cargo/env
cargo clippy --target ${{ matrix.target }} -- -D warnings
cargo fmt --target ${{ matrix.target }} -- --check
@ -127,7 +125,11 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
run: |
# Clone the repository manually instead of using actions/checkout
git clone https://git.raines.xyz/robojerk/apt-ostree.git /tmp/apt-ostree
cp -r /tmp/apt-ostree/* .
cp -r /tmp/apt-ostree/.* . 2>/dev/null || true
- name: Setup environment
shell: bash
@ -163,10 +165,11 @@ jobs:
fi
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
run: |
# Install Rust using rustup
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
. ~/.cargo/env
rustup default stable
- name: Install security tools
run: |
@ -175,11 +178,13 @@ jobs:
- name: Run security audit
run: |
. ~/.cargo/env
cargo audit --version
cargo audit
- name: Check for known vulnerabilities
run: |
. ~/.cargo/env
cargo audit --deny warnings
# Performance benchmarking
@ -189,7 +194,11 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
run: |
# Clone the repository manually instead of using actions/checkout
git clone https://git.raines.xyz/robojerk/apt-ostree.git /tmp/apt-ostree
cp -r /tmp/apt-ostree/* .
cp -r /tmp/apt-ostree/.* . 2>/dev/null || true
- name: Setup environment
shell: bash
@ -225,10 +234,11 @@ jobs:
fi
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
run: |
# Install Rust using rustup
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
. ~/.cargo/env
rustup default stable
- name: Install benchmark dependencies
run: |
@ -243,13 +253,13 @@ jobs:
- name: Run performance benchmarks
run: |
. ~/.cargo/env
cargo bench --verbose
- name: Upload benchmark results
uses: actions/upload-artifact@v3
with:
name: benchmark-results
path: target/criterion
- name: Create benchmark summary
run: |
echo "Benchmark results available in target/criterion/"
echo "Benchmark completed successfully! 🎉"
# Documentation build
docs:
@ -258,7 +268,11 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
run: |
# Clone the repository manually instead of using actions/checkout
git clone https://git.raines.xyz/robojerk/apt-ostree.git /tmp/apt-ostree
cp -r /tmp/apt-ostree/* .
cp -r /tmp/apt-ostree/.* . 2>/dev/null || true
- name: Setup environment
shell: bash
@ -294,10 +308,11 @@ jobs:
fi
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
run: |
# Install Rust using rustup
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
. ~/.cargo/env
rustup default stable
- name: Install documentation dependencies
run: |
@ -312,13 +327,13 @@ jobs:
- name: Build documentation
run: |
. ~/.cargo/env
cargo doc --no-deps --verbose
- name: Upload documentation
uses: actions/upload-artifact@v3
with:
name: documentation
path: target/doc
- name: Create docs summary
run: |
echo "Documentation built successfully in target/doc/"
echo "Documentation build completed! 🎉"
# Debian package build
debian-package:
@ -327,7 +342,11 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
run: |
# Clone the repository manually instead of using actions/checkout
git clone https://git.raines.xyz/robojerk/apt-ostree.git /tmp/apt-ostree
cp -r /tmp/apt-ostree/* .
cp -r /tmp/apt-ostree/.* . 2>/dev/null || true
- name: Setup environment
shell: bash
@ -406,11 +425,11 @@ jobs:
run: |
./build-debian-trixie.sh
- name: Upload Debian package
uses: actions/upload-artifact@v3
with:
name: debian-package
path: deb_packages/
- name: Create package summary
run: |
echo "Debian package built successfully!"
ls -la deb_packages/ 2>/dev/null || echo "No packages found"
echo "Package build completed! 🎉"
# Integration testing with real OSTree
ostree-integration:
@ -419,7 +438,11 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
run: |
# Clone the repository manually instead of using actions/checkout
git clone https://git.raines.xyz/robojerk/apt-ostree.git /tmp/apt-ostree
cp -r /tmp/apt-ostree/* .
cp -r /tmp/apt-ostree/.* . 2>/dev/null || true
- name: Setup environment
shell: bash
@ -455,10 +478,11 @@ jobs:
fi
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
run: |
# Install Rust using rustup
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
. ~/.cargo/env
rustup default stable
- name: Install OSTree testing dependencies
run: |
@ -477,6 +501,7 @@ jobs:
- name: Build apt-ostree
run: |
. ~/.cargo/env
cargo build --release
- name: Run OSTree integration tests
@ -486,11 +511,10 @@ jobs:
ostree init --repo=/tmp/test-ostree
./target/release/apt-ostree status
- name: Upload test artifacts
uses: actions/upload-artifact@v3
with:
name: ostree-test-results
path: /tmp/test-ostree/
- name: Create test summary
run: |
echo "OSTree integration tests completed successfully!"
echo "Integration testing completed! 🎉"
# Code coverage
coverage:
@ -499,7 +523,11 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
run: |
# Clone the repository manually instead of using actions/checkout
git clone https://git.raines.xyz/robojerk/apt-ostree.git /tmp/apt-ostree
cp -r /tmp/apt-ostree/* .
cp -r /tmp/apt-ostree/.* . 2>/dev/null || true
- name: Setup environment
shell: bash
@ -535,10 +563,11 @@ jobs:
fi
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
run: |
# Install Rust using rustup
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
. ~/.cargo/env
rustup default stable
- name: Install coverage tools
run: |
@ -554,13 +583,13 @@ jobs:
- name: Generate coverage report
run: |
. ~/.cargo/env
cargo tarpaulin --out Html --output-dir coverage
- name: Upload coverage report
uses: actions/upload-artifact@v3
with:
name: coverage-report
path: coverage/
- name: Create coverage summary
run: |
echo "Coverage report generated successfully in coverage/"
echo "Code coverage completed! 🎉"
# Final status check
status:
@ -603,10 +632,4 @@ jobs:
EOF
echo "CI summary created: CI_SUMMARY.md"
- name: Upload CI summary
uses: actions/upload-artifact@v3
with:
name: ci-summary
path: CI_SUMMARY.md
retention-days: 30
echo "Comprehensive CI completed! 🎉"

View file

@ -211,10 +211,4 @@ jobs:
EOF
echo "Test summary created: TEST_SUMMARY.md"
- name: Upload test summary
uses: actions/upload-artifact@v3
with:
name: test-summary
path: TEST_SUMMARY.md
retention-days: 30
echo "Test completed successfully! 🎉"

View file

@ -166,10 +166,4 @@ jobs:
EOF
echo "Update summary created: UPDATE_SUMMARY.md"
- name: Upload update summary
uses: actions/upload-artifact@v3
with:
name: update-summary
path: UPDATE_SUMMARY.md
retention-days: 30
echo "README update completed successfully! 🎉"