From 0de2bd9d6817d4f96d7412b14f0fee33597f5fab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Fr=C3=B3es=20Franco?= Date: Wed, 3 Jun 2026 23:36:11 +0000 Subject: [PATCH] revert e530b3d62354f7fdf2c1e2b26e7bfb5b1f5a5425 revert Ci improvements (#3) Reviewed-on: https://code.gfran.co/gffranco/nuwiki/pulls/3 --- .gitea/workflows/ci.yaml | 42 +++++------------ .gitea/workflows/release.yaml | 85 ++++++++++++----------------------- 2 files changed, 40 insertions(+), 87 deletions(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index fecb581..ae37c90 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -2,44 +2,27 @@ name: CI on: push: - branches: [main] pull_request: - branches: [main] - -concurrency: - group: ci-${{ github.ref }} - cancel-in-progress: true env: CARGO_TERM_COLOR: always - RUST_BACKTRACE: "1" + RUST_BACKTRACE: short RUSTFLAGS: -D warnings jobs: fmt: name: cargo fmt --check runs-on: ubuntu-latest - timeout-minutes: 5 steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@1.83 with: components: rustfmt - - uses: actions/cache@v4 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - target - key: ${{ runner.os }}-cargo-fmt-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }} - restore-keys: - - ${{ runner.os }}-cargo-fmt- - run: cargo fmt --all -- --check clippy: name: cargo clippy runs-on: ubuntu-latest - timeout-minutes: 5 steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@1.83 @@ -52,14 +35,13 @@ jobs: ~/.cargo/git target key: ${{ runner.os }}-cargo-clippy-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }} - restore-keys: - - ${{ runner.os }}-cargo-clippy- + restore-keys: | + ${{ runner.os }}-cargo-clippy- - run: cargo clippy --workspace --all-targets -- -D warnings test: name: cargo test runs-on: ubuntu-latest - timeout-minutes: 5 steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@1.83 @@ -70,8 +52,8 @@ jobs: ~/.cargo/git target key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }} - restore-keys: - - ${{ runner.os }}-cargo-test- + restore-keys: | + ${{ runner.os }}-cargo-test- - run: cargo test --workspace --all-targets keymaps: @@ -92,15 +74,15 @@ jobs: ~/.cargo/git target key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }} - restore-keys: - - ${{ runner.os }}-cargo-test- - - name: install Neovim + Vim + restore-keys: | + ${{ runner.os }}-cargo-test- + - name: install Neovim 0.11 + Vim run: | set -euo pipefail - # Test the minimum supported Neovim version (0.11.0) so we - # catch API regressions at the bottom of the supported range. - # Pinning to a specific patch version; bump when 0.12 ships. - NVIM_VER=v0.11.0 + # Apt's neovim is too old (Ubuntu LTS ships 0.6/0.7), missing + # `vim.lsp.get_clients` and rejecting `@group.modifier` + # highlight names. Pull the official static tarball instead. + NVIM_VER=v0.11.3 curl -fsSL -o /tmp/nvim.tar.gz \ "https://github.com/neovim/neovim/releases/download/${NVIM_VER}/nvim-linux-x86_64.tar.gz" sudo tar -xzf /tmp/nvim.tar.gz -C /opt diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index f9cde6a..f8a67cf 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -11,7 +11,6 @@ permissions: env: CARGO_TERM_COLOR: always RUST_BACKTRACE: short - RUSTFLAGS: -D warnings jobs: build: @@ -23,19 +22,19 @@ jobs: include: - target: x86_64-unknown-linux-gnu apt: "" - rustflags: "-D warnings" + rustflags: "" - target: aarch64-unknown-linux-gnu # gcc-aarch64-linux-gnu ships the cross compiler/binutils # but no target libc; libc6-dev-arm64-cross adds Scrt1.o, # crti.o, and friends needed at link time. apt: "gcc-aarch64-linux-gnu libc6-dev-arm64-cross" - rustflags: "-D warnings" + rustflags: "" - target: x86_64-unknown-linux-musl apt: "musl-tools" - rustflags: "-D warnings" + rustflags: "" - target: aarch64-unknown-linux-musl apt: "" - rustflags: "-D warnings -C linker=rust-lld -C link-self-contained=yes" + rustflags: "-C linker=rust-lld -C link-self-contained=yes" steps: - uses: actions/checkout@v4 @@ -57,8 +56,8 @@ jobs: ~/.cargo/git target key: ${{ runner.os }}-cargo-release-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }} - restore-keys: - - ${{ runner.os }}-cargo-release-${{ matrix.target }}- + restore-keys: | + ${{ runner.os }}-cargo-release-${{ matrix.target }}- - name: Build nuwiki-ls env: @@ -80,24 +79,28 @@ jobs: echo "archive=$archive" >> "$GITHUB_OUTPUT" - name: Upload build artifact - uses: actions/upload-artifact@v4 + # Gitea Actions doesn't support upload-artifact v4 (uses a + # GitHub-only backend API); pin to v3. + uses: actions/upload-artifact@v3 with: name: nuwiki-ls-${{ matrix.target }} path: ${{ steps.package.outputs.archive }} if-no-files-found: error + retention-days: 7 release: name: gitea release needs: build runs-on: ubuntu-latest steps: + - uses: actions/checkout@v4 + - name: Download all build artifacts - # upload-artifact@v4 + download-artifact@v4 with merge-multiple - # flattens all artifacts into the download path directly. - uses: actions/download-artifact@v4 + # Paired with upload-artifact@v3 above. v3 has no merge-multiple + # option and nests each artifact under its own subdirectory. + uses: actions/download-artifact@v3 with: path: ./artifacts - merge-multiple: true - name: Ensure jq + curl run: | @@ -108,26 +111,6 @@ jobs: apt-get update && apt-get install -y --no-install-recommends curl fi - - name: Generate release notes - id: notes - run: | - set -euo pipefail - # Get commits since the previous tag (or the first commit if this is the first release). - prev_tag=$(git tag --sort=-version:refname | awk "NR==2" || echo "") - if [ -n "$prev_tag" ]; then - log=$(git log --oneline "$prev_tag"..HEAD) - else - log=$(git log --oneline --max-parents=0..HEAD) - fi - # Write notes to a file for later use. - cat > release-notes.txt </), so recurse.