From f84e121fc2105456b806bc3a1a200b72e9263544 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolphe=20Br=C3=A9ard?= Date: Fri, 22 Aug 2025 14:22:39 +0200 Subject: [PATCH] Migrate the ci to Forgejo actions --- .forgejo/workflows/ci.yml | 69 +++++++++++++++++++++++++++++++++++++++ .github/workflows/ci.yml | 50 ---------------------------- 2 files changed, 69 insertions(+), 50 deletions(-) create mode 100644 .forgejo/workflows/ci.yml delete mode 100644 .github/workflows/ci.yml diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml new file mode 100644 index 0000000..1020823 --- /dev/null +++ b/.forgejo/workflows/ci.yml @@ -0,0 +1,69 @@ +name: ci +on: [push, pull_request] + +jobs: + test: + name: Build & test on Rust ${{ matrix.rust }} + runs-on: codeberg-tiny + strategy: + matrix: + rust: + - 1.81.0 + - 1.82.0 + - 1.83.0 + - 1.84.1 + - 1.85.1 + - 1.86.0 + - 1.87.0 + - 1.88.0 + - 1.89.0 + - stable + - beta + - nightly + steps: + - uses: https://code.forgejo.org/actions/checkout@v4 + - name: Download rustup install script + run: curl --proto '=https' --tlsv1.2 --output 'rustup_install.sh' -sSf https://sh.rustup.rs && chmod a+x 'rustup_install.sh' + - name: Install rustup + run: ./rustup_install.sh -y + - name: Install Rust ${{ matrix.rust }} + run: source "$HOME/.cargo/env" && rustup toolchain install ${{ matrix.rust }} + - name: Run cargo build + run: source "$HOME/.cargo/env" && cargo +${{ matrix.rust }} build --all-features --verbose + - name: Run cargo test + run: source "$HOME/.cargo/env" && cargo +${{ matrix.rust }} test --all-features --verbose + formatting: + name: Cargo fmt + runs-on: codeberg-tiny + steps: + - uses: https://code.forgejo.org/actions/checkout@v4 + - name: Download rustup install script + run: curl --proto '=https' --tlsv1.2 --output 'rustup_install.sh' -sSf https://sh.rustup.rs && chmod a+x 'rustup_install.sh' + - name: Install rustup + run: ./rustup_install.sh -y + - name: Run cargo fmt + run: source "$HOME/.cargo/env" && cargo +stable fmt --all -- --check + clippy: + name: Clippy + runs-on: codeberg-tiny + steps: + - uses: https://code.forgejo.org/actions/checkout@v4 + - name: Download rustup install script + run: curl --proto '=https' --tlsv1.2 --output 'rustup_install.sh' -sSf https://sh.rustup.rs && chmod a+x 'rustup_install.sh' + - name: Install rustup + run: ./rustup_install.sh -y + - name: Run clippy + run: source "$HOME/.cargo/env" && cargo +stable clippy --all-features + cargo-deny: + name: Check dependencies + runs-on: codeberg-tiny + steps: + - uses: https://code.forgejo.org/actions/checkout@v4 + - name: Download rustup install script + run: curl --proto '=https' --tlsv1.2 --output 'rustup_install.sh' -sSf https://sh.rustup.rs && chmod a+x 'rustup_install.sh' + - name: Install rustup + run: ./rustup_install.sh -y + - name: Install cargo-deny + run: source "$HOME/.cargo/env" && cargo install --locked cargo-deny + - name: Run cargo-deny + run: source "$HOME/.cargo/env" && cargo deny --all-features check diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 1f0d522..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: ci -on: [push, pull_request] - -jobs: - test: - name: Cargo build & test - runs-on: ubuntu-latest - strategy: - matrix: - rust: - - 1.81.0 - - 1.82.0 - - 1.83.0 - - 1.84.1 - - 1.85.0 - - stable - - beta - - nightly - steps: - - uses: actions/checkout@v4 - - name: Install Rust ${{ matrix.rust }} - run: rustup toolchain install ${{ matrix.rust }} - - name: Run cargo build - run: cargo +${{ matrix.rust }} build --verbose - - name: Run cargo test - run: cargo +${{ matrix.rust }} test --verbose - formatting: - name: Cargo fmt - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Update Rust - run: rustup update stable - - name: Run cargo fmt - run: cargo +stable fmt --all -- --check - clippy: - name: Clippy - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Update Rust - run: rustup update stable - - name: Run clippy - run: cargo +stable clippy --all-features - cargo-deny: - name: Check dependencies - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: EmbarkStudios/cargo-deny-action@v1