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" echo "❌ No main package found to test"
fi 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 - name: Publish to Forgejo Package Registry
if: success() if: success()
run: | run: |
@ -398,10 +391,4 @@ jobs:
echo "- All build dependencies satisfied ✅" >> BUILD_SUMMARY.md echo "- All build dependencies satisfied ✅" >> BUILD_SUMMARY.md
echo "Build summary created: BUILD_SUMMARY.md" echo "Build summary created: BUILD_SUMMARY.md"
echo "Build completed successfully! 🎉"
- name: Upload build summary
uses: actions/upload-artifact@v3
with:
name: build-summary
path: BUILD_SUMMARY.md
retention-days: 30

View file

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

View file

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

View file

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