From 52d738826cc091099ca6b25f718b9ca36d7b4b4e Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 30 Nov 2023 21:03:25 +0800 Subject: ci(release): perform a full checkout when building (#26323) Ref #13471 --- .github/workflows/release.yml | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b19019d06d..e304196e99 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,6 +23,9 @@ jobs: version: ${{ steps.build.outputs.version }} steps: - uses: actions/checkout@v4 + with: + # Perform a full checkout #13471 + fetch-depth: 0 - run: ./.github/scripts/install_deps.sh - if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly') run: | @@ -60,6 +63,9 @@ jobs: runs-on: macos-11 steps: - uses: actions/checkout@v4 + with: + # Perform a full checkout #13471 + fetch-depth: 0 - name: Install dependencies run: ./.github/scripts/install_deps.sh - if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly') @@ -79,6 +85,9 @@ jobs: name: windows (MSVC_64) steps: - uses: actions/checkout@v4 + with: + # Perform a full checkout #13471 + fetch-depth: 0 - run: .github/scripts/env.ps1 - name: Build deps run: | -- cgit From ce6fefbab9b6a902e725534c91ba3aa1025e5957 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Thu, 30 Nov 2023 12:05:13 +0100 Subject: ci: create setup action This deduplicates common operations. --- .github/workflows/api-docs.yml | 4 ++-- .github/workflows/build.yml | 10 +++------- .github/workflows/codeql.yml | 9 ++------- .github/workflows/coverity.yml | 4 +--- .github/workflows/lintcommit.yml | 4 ++-- .github/workflows/test.yml | 27 ++++++++------------------- 6 files changed, 18 insertions(+), 40 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml index 6f8fe107d2..181e3a1a41 100644 --- a/.github/workflows/api-docs.yml +++ b/.github/workflows/api-docs.yml @@ -18,11 +18,11 @@ jobs: pull-requests: write steps: - uses: actions/checkout@v4 + - uses: ./.github/actions/setup + - name: Install dependencies run: | - ./.github/scripts/install_deps.sh sudo apt-get install -y doxygen python3-msgpack - - uses: ./.github/actions/cache - name: Generate docs run: | diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d6e11fcdcb..3044a4fae0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,7 +25,7 @@ jobs: timeout-minutes: 20 steps: - uses: actions/checkout@v4 - - run: ./.github/scripts/install_deps.sh + - uses: ./.github/actions/setup - run: printf 'NVIM_BUILD_TYPE=Release\n' >> $GITHUB_ENV - name: Build universal binary @@ -40,11 +40,7 @@ jobs: CMAKE_VERSION: '3.10.0' steps: - uses: actions/checkout@v4 - - run: ./.github/scripts/install_deps.sh - - - name: Set up environment - run: echo "$BIN_DIR" >> $GITHUB_PATH - + - uses: ./.github/actions/setup - name: Install minimum required version of cmake run: | @@ -73,7 +69,7 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - - run: ./.github/scripts/install_deps.sh + - uses: ./.github/actions/setup - name: Build bundled dependencies run: make deps diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 365c3fdf56..033dd5aef4 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -20,19 +20,14 @@ jobs: security-events: write steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Install dependencies - run: ./.github/scripts/install_deps.sh + - uses: actions/checkout@v4 + - uses: ./.github/actions/setup - name: Initialize CodeQL uses: github/codeql-action/init@v2 with: languages: cpp - - uses: ./.github/actions/cache - - run: make - name: Perform CodeQL Analysis diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml index 3eed1e51df..998678daf0 100644 --- a/.github/workflows/coverity.yml +++ b/.github/workflows/coverity.yml @@ -9,9 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - - name: Install dependencies - run: ./.github/scripts/install_deps.sh + - uses: ./.github/actions/setup - name: Download Coverity run: | diff --git a/.github/workflows/lintcommit.yml b/.github/workflows/lintcommit.yml index 8f56c057ae..f27b22f35f 100644 --- a/.github/workflows/lintcommit.yml +++ b/.github/workflows/lintcommit.yml @@ -14,8 +14,8 @@ jobs: fetch-depth: 0 ref: ${{ github.event.pull_request.head.sha }} - - run: ./.github/scripts/install_deps.sh - - uses: ./.github/actions/cache + - uses: ./.github/actions/setup + - name: Build run: | cmake -S cmake.deps --preset ci diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index acf0f195b9..67d33fc1f6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -35,15 +35,13 @@ jobs: CC: clang steps: - uses: actions/checkout@v4 - - run: ./.github/scripts/install_deps.sh - - uses: ./.github/actions/cache + - uses: ./.github/actions/setup - name: Install stylua run: | URL=$(curl -L https://api.github.com/repos/JohnnyMorganz/StyLua/releases/latest | jq -r '.assets[] | select(.name == "stylua-linux-x86_64.zip") | .browser_download_url') wget --directory-prefix="$BIN_DIR" "$URL" (cd "$BIN_DIR"; unzip stylua*.zip) - echo "$BIN_DIR" >> $GITHUB_PATH - name: Build third-party deps run: | @@ -88,8 +86,7 @@ jobs: CC: clang steps: - uses: actions/checkout@v4 - - run: ./.github/scripts/install_deps.sh - - uses: ./.github/actions/cache + - uses: ./.github/actions/setup - name: Build third-party deps run: | cmake -S cmake.deps --preset ci @@ -124,13 +121,9 @@ jobs: CC: ${{ matrix.build.cc }} steps: - uses: actions/checkout@v4 - - run: ./.github/scripts/install_deps.sh --test - - uses: ./.github/actions/cache - - - name: Set up environment - run: | - ulimit -c unlimited - echo "$BIN_DIR" >> $GITHUB_PATH + - uses: ./.github/actions/setup + with: + install_flags: "--test" - name: Create log dir run: mkdir -p "$LOG_DIR" @@ -213,8 +206,7 @@ jobs: test: [functional, old] steps: - uses: actions/checkout@v4 - - uses: ./.github/actions/cache - - run: .github/scripts/env.ps1 + - uses: ./.github/actions/setup - name: Build deps run: | @@ -281,8 +273,7 @@ jobs: CC: gcc steps: - uses: actions/checkout@v4 - - run: ./.github/scripts/install_deps.sh - - uses: ./.github/actions/cache + - uses: ./.github/actions/setup - name: Build third-party deps run: | @@ -308,11 +299,11 @@ jobs: CC: gcc steps: - uses: actions/checkout@v4 + - uses: ./.github/actions/setup - name: Install dependencies run: | sudo add-apt-repository ppa:neovim-ppa/stable - ./.github/scripts/install_deps.sh sudo apt-get install -y \ libluajit-5.1-dev \ libmsgpack-dev \ @@ -329,8 +320,6 @@ jobs: # Remove comments from packages once we start using these external # dependencies. - - uses: ./.github/actions/cache - - name: Build third-party deps run: | cmake -S cmake.deps --preset external_deps -- cgit From 32c8f951bb117bcff39460c3b4dd4f05112af6b3 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Fri, 24 Nov 2023 14:11:26 +0100 Subject: ci: use the latest stylua version Using `jq` is not needed as github provides a "latest" shortcut to do what download the latest release. --- .github/workflows/test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 67d33fc1f6..82fc31e874 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -39,8 +39,7 @@ jobs: - name: Install stylua run: | - URL=$(curl -L https://api.github.com/repos/JohnnyMorganz/StyLua/releases/latest | jq -r '.assets[] | select(.name == "stylua-linux-x86_64.zip") | .browser_download_url') - wget --directory-prefix="$BIN_DIR" "$URL" + wget --directory-prefix="$BIN_DIR" https://github.com/JohnnyMorganz/StyLua/releases/latest/download/stylua-linux-x86_64.zip (cd "$BIN_DIR"; unzip stylua*.zip) - name: Build third-party deps -- cgit From f707ce76acb86e064d549dc762f5636af072d3c5 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Thu, 7 Dec 2023 13:50:17 +0100 Subject: ci: remove python workaround The provider tests seems to work now without this workaround. --- .github/workflows/test.yml | 7 ------- 1 file changed, 7 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 82fc31e874..941393497a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -127,13 +127,6 @@ jobs: - name: Create log dir run: mkdir -p "$LOG_DIR" - # FIXME(dundargoc): this workaround is needed for macos as the python3 - # provider tests suddenly started to become extremely flaky, and this - # removes the flakiness for some reason. - - uses: actions/setup-python@v4 - with: - python-version: '3.11' - - if: ${{ matrix.test != 'unittest' }} name: Set up interpreter packages run: | -- cgit From 9706ee59d0e2143d40d40b9e01cd63f8a17a09ab Mon Sep 17 00:00:00 2001 From: dundargoc Date: Fri, 8 Dec 2023 10:41:11 +0100 Subject: ci: bump actions/labeler from 4 to 5 --- .github/workflows/labeler.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 52682d93dd..cd4bd660aa 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -9,9 +9,10 @@ jobs: contents: read pull-requests: write steps: - - uses: actions/labeler@v4 + - uses: actions/checkout@v4 + - uses: actions/labeler@v5 with: - sync-labels: "" + configuration-path: .github/scripts/labeler_configuration.yml type-scope: needs: triage -- cgit From dd81e1e3345b91c4cb4653b697c1054526f6b924 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Sun, 12 Nov 2023 21:40:24 +0100 Subject: ci: refactor CI files Mostly rename file and variable names to be more consistent. This makes it easier to locate them in the "Actions" tab on github. --- .github/workflows/add-reviewers.yml | 19 ------------ .github/workflows/api-docs.yml | 34 --------------------- .github/workflows/backport.yml | 2 +- .github/workflows/codeql.yml | 2 +- .github/workflows/coverity.yml | 2 +- .github/workflows/docs.yml | 32 ++++++++++++++++++++ .github/workflows/issue-open-check.yml | 34 --------------------- .github/workflows/labeler.yml | 40 ------------------------- .github/workflows/labeler_issue.yml | 31 +++++++++++++++++++ .github/workflows/labeler_pr.yml | 40 +++++++++++++++++++++++++ .github/workflows/lintcommit.yml | 2 +- .github/workflows/news.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/remove-reviewers.yml | 17 ----------- .github/workflows/reviewers_add.yml | 19 ++++++++++++ .github/workflows/reviewers_remove.yml | 17 +++++++++++ .github/workflows/test.yml | 4 +-- .github/workflows/vim-patches.yml | 55 ---------------------------------- .github/workflows/vim_patches.yml | 55 ++++++++++++++++++++++++++++++++++ 19 files changed, 202 insertions(+), 207 deletions(-) delete mode 100644 .github/workflows/add-reviewers.yml delete mode 100644 .github/workflows/api-docs.yml create mode 100644 .github/workflows/docs.yml delete mode 100644 .github/workflows/issue-open-check.yml delete mode 100644 .github/workflows/labeler.yml create mode 100644 .github/workflows/labeler_issue.yml create mode 100644 .github/workflows/labeler_pr.yml delete mode 100644 .github/workflows/remove-reviewers.yml create mode 100644 .github/workflows/reviewers_add.yml create mode 100644 .github/workflows/reviewers_remove.yml delete mode 100644 .github/workflows/vim-patches.yml create mode 100644 .github/workflows/vim_patches.yml (limited to '.github/workflows') diff --git a/.github/workflows/add-reviewers.yml b/.github/workflows/add-reviewers.yml deleted file mode 100644 index 22c68b6ef7..0000000000 --- a/.github/workflows/add-reviewers.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: "Request reviews" -on: - pull_request_target: - types: [labeled, ready_for_review, reopened] - workflow_call: -jobs: - request-reviewer: - if: github.event.pull_request.state == 'open' && github.event.pull_request.draft == false - runs-on: ubuntu-latest - permissions: - pull-requests: write - steps: - - uses: actions/checkout@v4 - - name: 'Request reviewers' - uses: actions/github-script@v7 - with: - script: | - const script = require('./.github/scripts/reviews.js') - await script({github, context}) diff --git a/.github/workflows/api-docs.yml b/.github/workflows/api-docs.yml deleted file mode 100644 index 181e3a1a41..0000000000 --- a/.github/workflows/api-docs.yml +++ /dev/null @@ -1,34 +0,0 @@ -# Check if any PR needs to run the autogenerate script -name: Autogenerate API docs and types -on: - pull_request: - types: [opened, synchronize, reopened, ready_for_review] - paths: - - 'src/nvim/api/*.[ch]' - - 'src/nvim/eval.lua' - - 'runtime/lua/**.lua' - - 'runtime/doc/**' - -jobs: - regen-api-docs-and-types: - runs-on: ubuntu-latest - if: github.event.pull_request.draft == false - permissions: - contents: write - pull-requests: write - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/setup - - - name: Install dependencies - run: | - sudo apt-get install -y doxygen python3-msgpack - - - name: Generate docs - run: | - make doc - if [ -n "$(git status --porcelain)" ]; then - echo "::error::Job failed, run 'make doc' and commit your doc changes." - echo "::error::The doc generation produces the following changes:" - git diff --color --exit-code - fi diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index 321cd02b0c..3ed5573262 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -1,4 +1,4 @@ -name: Backport +name: backport on: pull_request_target: types: [closed, labeled] diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 033dd5aef4..75c932b0a6 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -1,4 +1,4 @@ -name: "CodeQL" +name: "codeql" concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml index 998678daf0..db0f878de4 100644 --- a/.github/workflows/coverity.yml +++ b/.github/workflows/coverity.yml @@ -1,4 +1,4 @@ -name: Coverity +name: coverity on: schedule: - cron: '10 0 * * *' # Run every day at 00:10 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000000..c47df46b28 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,32 @@ +name: docs +on: + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + paths: + - 'src/nvim/api/*.[ch]' + - 'src/nvim/eval.lua' + - 'runtime/lua/**.lua' + - 'runtime/doc/**' +jobs: + docs: + runs-on: ubuntu-latest + if: github.event.pull_request.draft == false + permissions: + contents: write + pull-requests: write + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/setup + + - name: Install dependencies + run: | + sudo apt-get install -y doxygen python3-msgpack + + - name: Generate docs + run: | + make doc + if [ -n "$(git status --porcelain)" ]; then + echo "::error::Job failed, run 'make doc' and commit your doc changes." + echo "::error::The doc generation produces the following changes:" + git diff --color --exit-code + fi diff --git a/.github/workflows/issue-open-check.yml b/.github/workflows/issue-open-check.yml deleted file mode 100644 index eac1c2ee4d..0000000000 --- a/.github/workflows/issue-open-check.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Issue Open Check - -on: - issues: - types: [opened] - -jobs: - issue-open-check: - permissions: - issues: write - runs-on: ubuntu-latest - steps: - - name: check issue title - id: check-issue - uses: actions/github-script@v7 - with: - script: | - const title = context.payload.issue.title; - const titleSplit = title.split(/\s+/).map(e => e.toLowerCase()); - const keywords = ['api', 'treesitter', 'ui', 'lsp']; - var match = new Set(); - for (const keyword of keywords) { - if (titleSplit.includes(keyword)) { - match.add(keyword) - } - } - if (match.size !== 0) { - github.rest.issues.addLabels({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number, - labels: Array.from(match) - }) - } diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml deleted file mode 100644 index cd4bd660aa..0000000000 --- a/.github/workflows/labeler.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: "Pull Request Labeler" -on: - pull_request_target: - types: [opened] -jobs: - triage: - runs-on: ubuntu-latest - permissions: - contents: read - pull-requests: write - steps: - - uses: actions/checkout@v4 - - uses: actions/labeler@v5 - with: - configuration-path: .github/scripts/labeler_configuration.yml - - type-scope: - needs: triage - runs-on: ubuntu-latest - permissions: - contents: write - pull-requests: write - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GH_REPO: ${{ github.repository }} - PR_NUMBER: ${{ github.event.pull_request.number }} - PR_TITLE: ${{ github.event.pull_request.title }} - steps: - - name: "Extract commit type and add as label" - run: gh pr edit "$PR_NUMBER" --add-label "$(echo "$PR_TITLE" | sed -E 's|([[:alpha:]]+)(\(.*\))?!?:.*|\1|')" || true - - name: "Extract commit scope and add as label" - run: gh pr edit "$PR_NUMBER" --add-label "$(echo "$PR_TITLE" | sed -E 's|[[:alpha:]]+\((.+)\)!?:.*|\1|')" || true - - name: "Extract if the PR is a breaking change and add it as label" - run: gh pr edit "$PR_NUMBER" --add-label "$(echo "$PR_TITLE" | sed -E 's|[[:alpha:]]+(\(.*\))?!:.*|breaking-change|')" || true - - request-reviewer: - needs: ["triage", "type-scope"] - permissions: - pull-requests: write - uses: ./.github/workflows/add-reviewers.yml diff --git a/.github/workflows/labeler_issue.yml b/.github/workflows/labeler_issue.yml new file mode 100644 index 0000000000..0da4c0f707 --- /dev/null +++ b/.github/workflows/labeler_issue.yml @@ -0,0 +1,31 @@ +name: "labeler: issue" +on: + issues: + types: [opened] +jobs: + labeler: + permissions: + issues: write + runs-on: ubuntu-latest + steps: + - name: check issue title + uses: actions/github-script@v7 + with: + script: | + const title = context.payload.issue.title; + const titleSplit = title.split(/\s+/).map(e => e.toLowerCase()); + const keywords = ['api', 'treesitter', 'ui', 'lsp']; + var match = new Set(); + for (const keyword of keywords) { + if (titleSplit.includes(keyword)) { + match.add(keyword) + } + } + if (match.size !== 0) { + github.rest.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + labels: Array.from(match) + }) + } diff --git a/.github/workflows/labeler_pr.yml b/.github/workflows/labeler_pr.yml new file mode 100644 index 0000000000..7f2514069e --- /dev/null +++ b/.github/workflows/labeler_pr.yml @@ -0,0 +1,40 @@ +name: "labeler: PR" +on: + pull_request_target: + types: [opened] +jobs: + labeler: + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write + steps: + - uses: actions/checkout@v4 + - uses: actions/labeler@v5 + with: + configuration-path: .github/scripts/labeler_configuration.yml + + type-scope: + needs: triage + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_REPO: ${{ github.repository }} + PR_NUMBER: ${{ github.event.pull_request.number }} + PR_TITLE: ${{ github.event.pull_request.title }} + steps: + - name: "Extract commit type and add as label" + run: gh pr edit "$PR_NUMBER" --add-label "$(echo "$PR_TITLE" | sed -E 's|([[:alpha:]]+)(\(.*\))?!?:.*|\1|')" || true + - name: "Extract commit scope and add as label" + run: gh pr edit "$PR_NUMBER" --add-label "$(echo "$PR_TITLE" | sed -E 's|[[:alpha:]]+\((.+)\)!?:.*|\1|')" || true + - name: "Extract if the PR is a breaking change and add it as label" + run: gh pr edit "$PR_NUMBER" --add-label "$(echo "$PR_TITLE" | sed -E 's|[[:alpha:]]+(\(.*\))?!:.*|breaking-change|')" || true + + request-reviewer: + needs: ["triage", "type-scope"] + permissions: + pull-requests: write + uses: ./.github/workflows/reviewers_add.yml diff --git a/.github/workflows/lintcommit.yml b/.github/workflows/lintcommit.yml index f27b22f35f..3d140532cd 100644 --- a/.github/workflows/lintcommit.yml +++ b/.github/workflows/lintcommit.yml @@ -1,4 +1,4 @@ -name: "Commit Linter" +name: "lintcommit" on: pull_request: types: [opened, synchronize, reopened, ready_for_review] diff --git a/.github/workflows/news.yml b/.github/workflows/news.yml index d4f8e5ad65..09337a0356 100644 --- a/.github/workflows/news.yml +++ b/.github/workflows/news.yml @@ -1,4 +1,4 @@ -name: "news.txt check" +name: "news.txt" on: pull_request: types: [opened, synchronize, reopened, ready_for_review] diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e304196e99..feacb29533 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: Release +name: release on: schedule: - cron: '5 5 * * *' diff --git a/.github/workflows/remove-reviewers.yml b/.github/workflows/remove-reviewers.yml deleted file mode 100644 index 3fe7493b93..0000000000 --- a/.github/workflows/remove-reviewers.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: "Remove reviewers" -on: - pull_request_target: - types: [converted_to_draft, closed] -jobs: - remove-reviewers: - runs-on: ubuntu-latest - permissions: - pull-requests: write - steps: - - uses: actions/checkout@v4 - - name: 'Remove reviewers' - uses: actions/github-script@v7 - with: - script: | - const script = require('./.github/scripts/remove-reviewers.js') - await script({github, context}) diff --git a/.github/workflows/reviewers_add.yml b/.github/workflows/reviewers_add.yml new file mode 100644 index 0000000000..b116bca29b --- /dev/null +++ b/.github/workflows/reviewers_add.yml @@ -0,0 +1,19 @@ +name: "reviewers: add" +on: + pull_request_target: + types: [labeled, ready_for_review, reopened] + workflow_call: +jobs: + request-reviewer: + if: github.event.pull_request.state == 'open' && github.event.pull_request.draft == false + runs-on: ubuntu-latest + permissions: + pull-requests: write + steps: + - uses: actions/checkout@v4 + - name: 'Request reviewers' + uses: actions/github-script@v7 + with: + script: | + const script = require('./.github/scripts/reviewers_add.js') + await script({github, context}) diff --git a/.github/workflows/reviewers_remove.yml b/.github/workflows/reviewers_remove.yml new file mode 100644 index 0000000000..b10d8c3d23 --- /dev/null +++ b/.github/workflows/reviewers_remove.yml @@ -0,0 +1,17 @@ +name: "reviewers: remove" +on: + pull_request_target: + types: [converted_to_draft, closed] +jobs: + remove-reviewers: + runs-on: ubuntu-latest + permissions: + pull-requests: write + steps: + - uses: actions/checkout@v4 + - name: 'Remove reviewers' + uses: actions/github-script@v7 + with: + script: | + const script = require('./.github/scripts/reviewers_remove.js') + await script({github, context}) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 941393497a..43fd76dd39 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -104,14 +104,14 @@ jobs: { runner: ubuntu-22.04, flavor: tsan, cc: clang, flags: -D ENABLE_TSAN=ON }, { runner: ubuntu-22.04, cc: gcc }, { runner: macos-12, cc: clang, flags: -D CMAKE_FIND_FRAMEWORK=NEVER, deps_flags: -D CMAKE_FIND_FRAMEWORK=NEVER }, - { runner: ubuntu-22.04, flavor: functionaltest-lua, cc: gcc, deps_flags: -D USE_BUNDLED_LUAJIT=OFF -D USE_BUNDLED_LUA=ON, flags: -D PREFER_LUA=ON }, + { runner: ubuntu-22.04, flavor: puc-lua, cc: gcc, deps_flags: -D USE_BUNDLED_LUAJIT=OFF -D USE_BUNDLED_LUA=ON, flags: -D PREFER_LUA=ON }, ] test: [unittest, functionaltest, oldtest] exclude: - test: unittest build: { flavor: tsan } - test: unittest - build: { flavor: functionaltest-lua } + build: { flavor: puc-lua } - test: oldtest build: { flavor: tsan } runs-on: ${{ matrix.build.runner }} diff --git a/.github/workflows/vim-patches.yml b/.github/workflows/vim-patches.yml deleted file mode 100644 index 711ddae815..0000000000 --- a/.github/workflows/vim-patches.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: vim-patches -on: - schedule: - - cron: '3 3 * * *' - workflow_dispatch: - -jobs: - update-vim-patches: - runs-on: ubuntu-latest - permissions: - contents: write - pull-requests: write - env: - VIM_SOURCE_DIR: ${{ github.workspace }}/vim-src - VERSION_BRANCH: marvim/ci-version-update - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - uses: actions/checkout@v4 - with: - repository: vim/vim - path: ${{ env.VIM_SOURCE_DIR }} - fetch-depth: 0 - - - run: sudo apt-get install libfuse2 - - - run: | - gh release download -R neovim/neovim -p nvim.appimage - chmod a+x nvim.appimage - mkdir -p $HOME/.local/bin - mv nvim.appimage $HOME/.local/bin/nvim - printf '%s\n' "$HOME/.local/bin" >> $GITHUB_PATH - - - name: Set up git config - run: | - git config --global user.name 'marvim' - git config --global user.email 'marvim@users.noreply.github.com' - - - name: Update src/version.c - id: update-version - run: | - git checkout -b ${VERSION_BRANCH} - nvim -V1 -es -i NONE +'luafile scripts/vimpatch.lua' +q - printf 'NEW_PATCHES=%s\n' $([ -z "$(git diff)" ]; echo $?) >> $GITHUB_OUTPUT - - - name: Automatic PR - if: ${{ steps.update-version.outputs.NEW_PATCHES != 0 }} - run: | - git add -u - git commit -m 'version.c: update [skip ci]' - git push --force https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY} ${VERSION_BRANCH} - gh pr create --draft --fill --label vim-patch --base ${GITHUB_REF#refs/heads/} --head ${VERSION_BRANCH} || true diff --git a/.github/workflows/vim_patches.yml b/.github/workflows/vim_patches.yml new file mode 100644 index 0000000000..711ddae815 --- /dev/null +++ b/.github/workflows/vim_patches.yml @@ -0,0 +1,55 @@ +name: vim-patches +on: + schedule: + - cron: '3 3 * * *' + workflow_dispatch: + +jobs: + update-vim-patches: + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + env: + VIM_SOURCE_DIR: ${{ github.workspace }}/vim-src + VERSION_BRANCH: marvim/ci-version-update + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: actions/checkout@v4 + with: + repository: vim/vim + path: ${{ env.VIM_SOURCE_DIR }} + fetch-depth: 0 + + - run: sudo apt-get install libfuse2 + + - run: | + gh release download -R neovim/neovim -p nvim.appimage + chmod a+x nvim.appimage + mkdir -p $HOME/.local/bin + mv nvim.appimage $HOME/.local/bin/nvim + printf '%s\n' "$HOME/.local/bin" >> $GITHUB_PATH + + - name: Set up git config + run: | + git config --global user.name 'marvim' + git config --global user.email 'marvim@users.noreply.github.com' + + - name: Update src/version.c + id: update-version + run: | + git checkout -b ${VERSION_BRANCH} + nvim -V1 -es -i NONE +'luafile scripts/vimpatch.lua' +q + printf 'NEW_PATCHES=%s\n' $([ -z "$(git diff)" ]; echo $?) >> $GITHUB_OUTPUT + + - name: Automatic PR + if: ${{ steps.update-version.outputs.NEW_PATCHES != 0 }} + run: | + git add -u + git commit -m 'version.c: update [skip ci]' + git push --force https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY} ${VERSION_BRANCH} + gh pr create --draft --fill --label vim-patch --base ${GITHUB_REF#refs/heads/} --head ${VERSION_BRANCH} || true -- cgit From 31fbd38066a2c3195355faa059ff4f815a0ccf32 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 10 Dec 2023 06:40:51 +0800 Subject: ci: fix PR labeler --- .github/workflows/labeler_pr.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/labeler_pr.yml b/.github/workflows/labeler_pr.yml index 7f2514069e..8fd93bfb6d 100644 --- a/.github/workflows/labeler_pr.yml +++ b/.github/workflows/labeler_pr.yml @@ -3,7 +3,7 @@ on: pull_request_target: types: [opened] jobs: - labeler: + changed-files: runs-on: ubuntu-latest permissions: contents: read @@ -15,7 +15,7 @@ jobs: configuration-path: .github/scripts/labeler_configuration.yml type-scope: - needs: triage + needs: changed-files runs-on: ubuntu-latest permissions: contents: write @@ -34,7 +34,7 @@ jobs: run: gh pr edit "$PR_NUMBER" --add-label "$(echo "$PR_TITLE" | sed -E 's|[[:alpha:]]+(\(.*\))?!:.*|breaking-change|')" || true request-reviewer: - needs: ["triage", "type-scope"] + needs: ["changed-files", "type-scope"] permissions: pull-requests: write uses: ./.github/workflows/reviewers_add.yml -- cgit From 7db9992445a69df16eb12d349d49ab8968e9a505 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Dec 2023 14:16:35 +0100 Subject: ci: bump github/codeql-action from 2 to 3 Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/v2...v3) --- .github/workflows/codeql.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 75c932b0a6..c2db78dd25 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -24,11 +24,11 @@ jobs: - uses: ./.github/actions/setup - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: cpp - run: make - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 -- cgit From 046340303076c3680cf767f01c6748d9dd5c8fa5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 Dec 2023 13:51:51 +0100 Subject: ci: bump actions/download-artifact from 3 to 4 Notable changes: - Downloads are significantly faster, upwards of 90% improvement in worst case scenarios. - Artifacts can be downloaded from other workflow runs and repositories when supplied with a PAT. --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index feacb29533..3553f5f1fe 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -118,7 +118,7 @@ jobs: # before running, and would therefore delete the downloaded artifacts - uses: actions/checkout@v4 - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 - name: Install dependencies run: sudo apt-get update && sudo apt-get install -y gettext-base @@ -196,7 +196,7 @@ jobs: token: ${{ secrets.WINGET_TOKEN }} - name: Fetch nightly build msi from previous job if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly') - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 - if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly') name: Get version from nightly build msi id: get-version -- cgit From d82168e41c21a3a107e52c139abc90dbe41f2010 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 Dec 2023 13:53:14 +0100 Subject: ci: bump actions/upload-artifact from 3 to 4 Uploads are significantly faster, upwards of 90% improvement in worst case scenarios. --- .github/workflows/release.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3553f5f1fe..da6bd66198 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,14 +39,14 @@ jobs: run: ./scripts/genappimage.sh ${APPIMAGE_TAG} - name: tar.gz run: cpack --config build/CPackConfig.cmake -G TGZ - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: appimage path: | build/bin/nvim.appimage build/bin/nvim.appimage.zsync retention-days: 1 - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: nvim-linux64 path: | @@ -74,7 +74,7 @@ jobs: run: printf 'NVIM_BUILD_TYPE=RelWithDebInfo\n' >> $GITHUB_ENV - name: Build universal binary run: ./.github/scripts/build_universal_macos.sh - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: nvim-macos path: build/nvim-macos.tar.gz @@ -97,7 +97,7 @@ jobs: run: | cmake -B build -G Ninja -DCMAKE_BUILD_TYPE='RelWithDebInfo' cmake --build build --target package - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: nvim-win64 path: | -- cgit From 7840760776cf8dbaa580ced87aec0222dbb693d7 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Sat, 14 Oct 2023 13:12:48 +0200 Subject: build: bump minimum cmake version to 3.13 The benefits are primarily being able to use FetchContent, which allows for a more flexible dependency handling. Other various quality-of-life features such as `-B` and `-S` flags are also included. This also removes broken `--version` generation as it does not work for version 3.10 and 3.11 due to the `JOIN` generator expression. Reference: https://github.com/neovim/neovim/issues/24004 --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3044a4fae0..f1468d2547 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,8 +36,8 @@ jobs: runs-on: ubuntu-22.04 timeout-minutes: 15 env: - CMAKE_URL: 'https://cmake.org/files/v3.10/cmake-3.10.0-Linux-x86_64.sh' - CMAKE_VERSION: '3.10.0' + CMAKE_URL: 'https://cmake.org/files/v3.13/cmake-3.13.0-Linux-x86_64.sh' + CMAKE_VERSION: '3.13.0' steps: - uses: actions/checkout@v4 - uses: ./.github/actions/setup -- cgit From 1beef6cd21acff0c7ef083dc90f768689dceb7ca Mon Sep 17 00:00:00 2001 From: James McCoy Date: Mon, 18 Dec 2023 17:46:25 -0500 Subject: ci(s390x): double TEST_TIMEOUT since tests are running via qemu --- .github/workflows/optional.yml | 2 ++ 1 file changed, 2 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/optional.yml b/.github/workflows/optional.yml index ebaf23d29b..850b62b225 100644 --- a/.github/workflows/optional.yml +++ b/.github/workflows/optional.yml @@ -9,6 +9,8 @@ concurrency: env: INSTALL_PREFIX: ${{ github.workspace }}/nvim-install + # Double test timeout since it's running via qemu + TEST_TIMEOUT: 2400 # TEST_FILE: test/functional/shada # TEST_FILTER: foo -- cgit From 3d8cd0c5d3ac10f13921d3c6adca1f6cf29668d2 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Mon, 18 Dec 2023 19:02:47 -0500 Subject: ci(s390x): run build & test as a non-root user --- .github/workflows/optional.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/optional.yml b/.github/workflows/optional.yml index 850b62b225..0cd82550f3 100644 --- a/.github/workflows/optional.yml +++ b/.github/workflows/optional.yml @@ -27,17 +27,21 @@ jobs: - run: docker run --rm --privileged multiarch/qemu-user-static:register --reset - uses: docker://multiarch/ubuntu-core:s390x-focal with: + # Docker runs the command as root, but we want the build/test to run + # as non-root so permissions based tests run correctly args: > bash -c " apt-get -y update && DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential cmake curl gettext ninja-build locales-all cpanminus git attr libattr1-dev && - git clone --depth=1 https://github.com/neovim/neovim.git && + useradd --create-home qemuci && + chown -R qemuci. . && + runuser -u qemuci -- git clone --depth=1 https://github.com/neovim/neovim.git && cd neovim && - git fetch origin ${{ github.ref }}:pr && - git switch pr && - cmake -S cmake.deps -B .deps -G Ninja -D USE_BUNDLED_LUAJIT=OFF -D USE_BUNDLED_LUA=ON && - cmake --build .deps && - cmake -B build -G Ninja -D PREFER_LUA=ON && - make ${{ matrix.test }} + runuser -u qemuci -- git fetch origin ${{ github.ref }}:pr && + runuser -u qemuci -- git switch pr && + runuser -u qemuci -- cmake -S cmake.deps -B .deps -G Ninja -D USE_BUNDLED_LUAJIT=OFF -D USE_BUNDLED_LUA=ON && + runuser -u qemuci -- cmake --build .deps && + runuser -u qemuci -- cmake -B build -G Ninja -D PREFER_LUA=ON && + runuser -u qemuci -- make ${{ matrix.test }} " -- cgit From 99d1e7da28061c2559c523f76b58b8bb113475ff Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 20 Dec 2023 21:53:30 +0800 Subject: ci(release): create version tag after "stable" tag (#26671) --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index da6bd66198..ae3f10d74e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -178,10 +178,10 @@ jobs: DEBUG: api run: | envsubst < "$GITHUB_WORKSPACE/.github/workflows/notes.md" > "$RUNNER_TEMP/notes.md" - gh release create $TAG_NAME $PRERELEASE --notes-file "$RUNNER_TEMP/notes.md" --title "$SUBJECT" --target $GITHUB_SHA nvim-macos/* nvim-linux64/* appimage/* nvim-win64/* if [ "$TAG_NAME" != "nightly" ]; then gh release create stable $PRERELEASE --notes-file "$RUNNER_TEMP/notes.md" --title "$SUBJECT" --target $GITHUB_SHA nvim-macos/* nvim-linux64/* appimage/* nvim-win64/* fi + gh release create $TAG_NAME $PRERELEASE --notes-file "$RUNNER_TEMP/notes.md" --title "$SUBJECT" --target $GITHUB_SHA nvim-macos/* nvim-linux64/* appimage/* nvim-win64/* publish-winget: needs: publish -- cgit From 0da50da6e243df449c5fb64164aa44338f2a6d4b Mon Sep 17 00:00:00 2001 From: dundargoc Date: Tue, 26 Dec 2023 20:48:56 +0100 Subject: ci: remove winget workflow All releases that aren't directly maintained by us should live in the `neovim/neovim-releases` repository to make it clear that neovim isn't directly responsible for it and to correctly manage expectations that it's provided on a best-effort case. Closes https://github.com/neovim/neovim/issues/26717. --- .github/workflows/release.yml | 30 ------------------------------ 1 file changed, 30 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ae3f10d74e..6452de9036 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -182,33 +182,3 @@ jobs: gh release create stable $PRERELEASE --notes-file "$RUNNER_TEMP/notes.md" --title "$SUBJECT" --target $GITHUB_SHA nvim-macos/* nvim-linux64/* appimage/* nvim-win64/* fi gh release create $TAG_NAME $PRERELEASE --notes-file "$RUNNER_TEMP/notes.md" --title "$SUBJECT" --target $GITHUB_SHA nvim-macos/* nvim-linux64/* appimage/* nvim-win64/* - - publish-winget: - needs: publish - runs-on: windows-latest - steps: - - if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly') - name: Publish stable - uses: vedantmgoyal2009/winget-releaser@v2 - with: - identifier: Neovim.Neovim - release-tag: ${{ github.event.inputs.tag_name || github.ref_name }} - token: ${{ secrets.WINGET_TOKEN }} - - name: Fetch nightly build msi from previous job - if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly') - uses: actions/download-artifact@v4 - - if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly') - name: Get version from nightly build msi - id: get-version - run: | - Install-Module -Name 'Carbon.Windows.Installer' -Force - $VERSION = (Get-CMsi (Resolve-Path .\nvim-win64\nvim-win64.msi).Path).ProductVersion - "version=$VERSION" >> $env:GITHUB_OUTPUT - - if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly') - name: Publish nightly - uses: vedantmgoyal2009/winget-releaser@v2 - with: - identifier: Neovim.Neovim.Nightly - version: ${{ steps.get-version.outputs.version }} - release-tag: nightly - token: ${{ secrets.WINGET_TOKEN }} -- cgit From 9aed26079c3021bc194d4261ac4fa8011476cf3e Mon Sep 17 00:00:00 2001 From: dundargoc Date: Fri, 29 Dec 2023 19:19:58 +0100 Subject: ci: add workflow_dispatch to optional.yml workflow This makes it convenient to test optional.yml on release branch. --- .github/workflows/optional.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/optional.yml b/.github/workflows/optional.yml index 0cd82550f3..655799cec8 100644 --- a/.github/workflows/optional.yml +++ b/.github/workflows/optional.yml @@ -2,6 +2,7 @@ name: optional on: pull_request: types: [labeled, opened, synchronize, reopened] + workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} @@ -16,7 +17,7 @@ env: jobs: s390x: - if: contains(github.event.pull_request.labels.*.name, 'ci-s390x') + if: contains(github.event.pull_request.labels.*.name, 'ci-s390x') || github.event_name == 'workflow_dispatch' strategy: fail-fast: false matrix: -- cgit From bcd111bd12b9d6db58a88fac728fc51af4d96c12 Mon Sep 17 00:00:00 2001 From: Jongwook Choi Date: Mon, 1 Jan 2024 08:35:35 -0500 Subject: ci: write the correct cherry-picked commit id when backporting Problem: Commits backport-merged to release branches are cherry-picked from the original commits in the PR from a fork repository, NOT the actual commit that are merged to neovim/neovim (HEAD). Therefore the commit reference in the commit message `cherry picked from commit ...` usually refers to a commit that does NOT exist in the repository, given that our preferred way of merging PR (rebasing, squashing, etc.) would rewrite commits. Solution: Turn on new feature 'detect_merge_method' of backport-action workflow. --- .github/workflows/backport.yml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index 3ed5573262..88cddcded4 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -14,3 +14,9 @@ jobs: - uses: actions/checkout@v4 - name: Create backport PRs uses: korthout/backport-action@v2 + with: + # https://github.com/korthout/backport-action/pull/399 + experimental: > + { + "detect_merge_method": true + } -- cgit From 965dbd0e019ab2e2d7db1af57f406d7cf57716d7 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Sun, 14 Jan 2024 12:29:13 +0100 Subject: ci(s390x): enable CI_BUILD --- .github/workflows/optional.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/optional.yml b/.github/workflows/optional.yml index 655799cec8..62d7707928 100644 --- a/.github/workflows/optional.yml +++ b/.github/workflows/optional.yml @@ -43,6 +43,6 @@ jobs: runuser -u qemuci -- git switch pr && runuser -u qemuci -- cmake -S cmake.deps -B .deps -G Ninja -D USE_BUNDLED_LUAJIT=OFF -D USE_BUNDLED_LUA=ON && runuser -u qemuci -- cmake --build .deps && - runuser -u qemuci -- cmake -B build -G Ninja -D PREFER_LUA=ON && + runuser -u qemuci -- cmake -B build -G Ninja -D CI_BUILD=ON -D PREFER_LUA=ON && runuser -u qemuci -- make ${{ matrix.test }} " -- cgit From 7421a4d8b5eba4dbbbcbcd21fed918813827e8b8 Mon Sep 17 00:00:00 2001 From: Junghyeon Park Date: Fri, 26 Jan 2024 14:35:06 +0900 Subject: ci: update notes.md Change the link to point to INSTALL.md. The contents were moved in https://github.com/neovim/neovim/pull/26533 --- .github/workflows/notes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/notes.md b/.github/workflows/notes.md index 8c518b0bdb..294d92ebb5 100644 --- a/.github/workflows/notes.md +++ b/.github/workflows/notes.md @@ -48,7 +48,7 @@ https://github.com/neovim/neovim-releases. ### Other -- Install by [package manager](https://github.com/neovim/neovim/wiki/Installing-Neovim) +- Install by [package manager](https://github.com/neovim/neovim/blob/master/INSTALL.md#install-from-package) ## SHA256 Checksums -- cgit From 01e82eba209a96f932d3497e580ab0ca749efafa Mon Sep 17 00:00:00 2001 From: Jongwook Choi Date: Sun, 28 Jan 2024 17:22:39 -0500 Subject: build(docs): separate lint job to validate vimdoc #27227 Summary: Separate the lint job (`make lintdoc`) to validate runtime/doc, it is no longer as a part of functionaltest (help_spec). Build (cmake) and CI: - `make lintdoc`: validate vimdoc files and test-generate HTML docs. CI will run this as a part of the "docs" workflow. - `scripts/lintdoc.lua` is added as an entry point (executable script) for validating vimdoc files. scripts/gen_help_html.lua: - Move the tests for validating docs and generating HTMLs from `help_spec.lua` to `gen_help_html`. Added: - `gen_help_html.run_validate()`. - `gen_help_html.test_gen()`. - Do not hard-code `help_dir` to `build/runtime/doc`, but resolve from `$VIMRUNTIME`. Therefore, the `make lintdoc` job will check doc files on `./runtime/doc`, not on `./build/runtime/doc`. - Add type annotations for gen_help_html. --- .github/workflows/docs.yml | 5 +++++ 1 file changed, 5 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index c47df46b28..83e7c77dc9 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -7,6 +7,8 @@ on: - 'src/nvim/eval.lua' - 'runtime/lua/**.lua' - 'runtime/doc/**' + - 'scripts/gen_vimdoc.py' + - 'scripts/gen_help_html.lua' jobs: docs: runs-on: ubuntu-latest @@ -30,3 +32,6 @@ jobs: echo "::error::The doc generation produces the following changes:" git diff --color --exit-code fi + + - name: Validate docs + run: make lintdoc -- cgit From 4c91194611086916c833d61e28e2f5e689316e83 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Sat, 27 Jan 2024 19:10:41 +0100 Subject: build: various fixes - Consistently use the variable CMAKE_BUILD_TYPE to select build type. - Remove broken `doc_html` target. - Remove swap files created by oldtest when cleaning. - Only rerun `lintdoc` if any documentation files has changed. --- .github/workflows/build.yml | 2 +- .github/workflows/release.yml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f1468d2547..5dd53150ea 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,7 +26,7 @@ jobs: steps: - uses: actions/checkout@v4 - uses: ./.github/actions/setup - - run: printf 'NVIM_BUILD_TYPE=Release\n' >> $GITHUB_ENV + - run: printf 'CMAKE_BUILD_TYPE=Release\n' >> $GITHUB_ENV - name: Build universal binary run: ./.github/scripts/build_universal_macos.sh diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6452de9036..815e7554cf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,11 +29,11 @@ jobs: - run: ./.github/scripts/install_deps.sh - if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly') run: | - echo 'NVIM_BUILD_TYPE=Release' >> $GITHUB_ENV + echo 'CMAKE_BUILD_TYPE=Release' >> $GITHUB_ENV echo 'APPIMAGE_TAG=latest' >> $GITHUB_ENV - if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly') run: | - echo 'NVIM_BUILD_TYPE=RelWithDebInfo' >> $GITHUB_ENV + echo 'CMAKE_BUILD_TYPE=RelWithDebInfo' >> $GITHUB_ENV echo 'APPIMAGE_TAG=nightly' >> $GITHUB_ENV - name: appimage run: ./scripts/genappimage.sh ${APPIMAGE_TAG} @@ -69,9 +69,9 @@ jobs: - name: Install dependencies run: ./.github/scripts/install_deps.sh - if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly') - run: printf 'NVIM_BUILD_TYPE=Release\n' >> $GITHUB_ENV + run: printf 'CMAKE_BUILD_TYPE=Release\n' >> $GITHUB_ENV - if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly') - run: printf 'NVIM_BUILD_TYPE=RelWithDebInfo\n' >> $GITHUB_ENV + run: printf 'CMAKE_BUILD_TYPE=RelWithDebInfo\n' >> $GITHUB_ENV - name: Build universal binary run: ./.github/scripts/build_universal_macos.sh - uses: actions/upload-artifact@v4 -- cgit From 7f4627fe4812da5526b62f9463459cf12931f10e Mon Sep 17 00:00:00 2001 From: dundargoc Date: Tue, 6 Feb 2024 12:21:12 +0100 Subject: ci(release): bump mac runner version to macos-12 --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 815e7554cf..059372cf2a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -60,7 +60,7 @@ jobs: printf 'END\n' >> $GITHUB_OUTPUT macOS: - runs-on: macos-11 + runs-on: macos-12 steps: - uses: actions/checkout@v4 with: -- cgit From ea0737c838b029fc96b1321c4ac15e0dc7e29b84 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 17 Feb 2024 18:35:25 +0800 Subject: ci(test.yml): explicitly set build type (#27503) Explicitly set the build type for both deps and Nvim. They are already explicitly set on Windows to RelWithDebInfo. Now also explicitly set them to Debug on POSIX. --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 43fd76dd39..86f11fcd99 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -146,12 +146,12 @@ jobs: - name: Build third-party deps run: | - cmake -S cmake.deps --preset ci ${{ matrix.build.deps_flags }} + cmake -S cmake.deps --preset ci -D CMAKE_BUILD_TYPE=Debug ${{ matrix.build.deps_flags }} cmake --build .deps - name: Build run: | - cmake --preset ci -D CMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX ${{ matrix.build.flags }} + cmake --preset ci -D CMAKE_BUILD_TYPE=Debug -D CMAKE_INSTALL_PREFIX:PATH=$INSTALL_PREFIX ${{ matrix.build.flags }} cmake --build build - name: ${{ matrix.test }} -- cgit From bf830a53f5b015e055383ef5c2a3ae923d9c393f Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sat, 17 Feb 2024 13:12:39 +0100 Subject: ci: test on macOS M1 (#27276) Problem: No test coverage on ARM. Solution: Add `macos-14` tests, which now run on M1. Skip unit tests as these don't work on M1, see #26145. Also test universal build on M1. Note: `macos-14` will be `macos-latest` in Q2 2024, so we'll want to switch these to keep Intel and unittest coverage on macos (while GH still offers Intel runners). --- .github/workflows/build.yml | 2 +- .github/workflows/test.yml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5dd53150ea..13fa692be1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,7 +21,7 @@ env: jobs: macos-universal: - runs-on: macos-latest + runs-on: macos-14 timeout-minutes: 20 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 86f11fcd99..6bd40b8561 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -104,6 +104,7 @@ jobs: { runner: ubuntu-22.04, flavor: tsan, cc: clang, flags: -D ENABLE_TSAN=ON }, { runner: ubuntu-22.04, cc: gcc }, { runner: macos-12, cc: clang, flags: -D CMAKE_FIND_FRAMEWORK=NEVER, deps_flags: -D CMAKE_FIND_FRAMEWORK=NEVER }, + { runner: macos-14, cc: clang, flags: -D CMAKE_FIND_FRAMEWORK=NEVER, deps_flags: -D CMAKE_FIND_FRAMEWORK=NEVER }, { runner: ubuntu-22.04, flavor: puc-lua, cc: gcc, deps_flags: -D USE_BUNDLED_LUAJIT=OFF -D USE_BUNDLED_LUA=ON, flags: -D PREFER_LUA=ON }, ] test: [unittest, functionaltest, oldtest] @@ -112,6 +113,8 @@ jobs: build: { flavor: tsan } - test: unittest build: { flavor: puc-lua } + - test: unittest + build: { runner: macos-14 } # unittests don't work on M1 #26145 - test: oldtest build: { flavor: tsan } runs-on: ${{ matrix.build.runner }} -- cgit From 01c15a30c0ab56e14342f9996bea3ad86a68a343 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sat, 17 Feb 2024 13:35:47 +0100 Subject: ci(release): run universal_macos build on M1 (#27505) Run the release workflow on macos-14 to use faster M1 runners. Lock the deployment target to the oldest supported version (11.0, due to libuv support) instead of relying on the host OS version. --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 059372cf2a..48a3901955 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -60,7 +60,7 @@ jobs: printf 'END\n' >> $GITHUB_OUTPUT macOS: - runs-on: macos-12 + runs-on: macos-14 steps: - uses: actions/checkout@v4 with: -- cgit From d94adff48b1882f9078b0ae94b677be5d29e5fd2 Mon Sep 17 00:00:00 2001 From: casswedson <58050969+casswedson@users.noreply.github.com> Date: Sun, 18 Feb 2024 06:29:07 -0500 Subject: ci(labeler_issue): split on word boundaries Splitting it on word boundaries rather than only spaces allows for better detection. The issue labeler previously didn't catch titles such as `treesitter: noisy "Invalid node type" error`. Co-authored-by: casswedson --- .github/workflows/labeler_issue.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/labeler_issue.yml b/.github/workflows/labeler_issue.yml index 0da4c0f707..deba3cd5a5 100644 --- a/.github/workflows/labeler_issue.yml +++ b/.github/workflows/labeler_issue.yml @@ -13,7 +13,7 @@ jobs: with: script: | const title = context.payload.issue.title; - const titleSplit = title.split(/\s+/).map(e => e.toLowerCase()); + const titleSplit = title.split(/\b/).map(e => e.toLowerCase()); const keywords = ['api', 'treesitter', 'ui', 'lsp']; var match = new Set(); for (const keyword of keywords) { -- cgit From 9beb40a4db5613601fc1a4b828a44e5977eca046 Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Thu, 15 Feb 2024 17:16:04 +0000 Subject: feat(docs): replace lua2dox.lua Problem: The documentation flow (`gen_vimdoc.py`) has several issues: - it's not very versatile - depends on doxygen - doesn't work well with Lua code as it requires an awkward filter script to convert it into pseudo-C. - The intermediate XML files and filters makes it too much like a rube goldberg machine. Solution: Re-implement the flow using Lua, LPEG and treesitter. - `gen_vimdoc.py` is now replaced with `gen_vimdoc.lua` and replicates a portion of the logic. - `lua2dox.lua` is gone! - No more XML files. - Doxygen is now longer used and instead we now use: - LPEG for comment parsing (see `scripts/luacats_grammar.lua` and `scripts/cdoc_grammar.lua`). - LPEG for C parsing (see `scripts/cdoc_parser.lua`) - Lua patterns for Lua parsing (see `scripts/luacats_parser.lua`). - Treesitter for Markdown parsing (see `scripts/text_utils.lua`). - The generated `runtime/doc/*.mpack` files have been removed. - `scripts/gen_eval_files.lua` now instead uses `scripts/cdoc_parser.lua` directly. - Text wrapping is implemented in `scripts/text_utils.lua` and appears to produce more consistent results (the main contributer to the diff of this change). --- .github/workflows/docs.yml | 4 ---- 1 file changed, 4 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 83e7c77dc9..c91f2945fb 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -20,10 +20,6 @@ jobs: - uses: actions/checkout@v4 - uses: ./.github/actions/setup - - name: Install dependencies - run: | - sudo apt-get install -y doxygen python3-msgpack - - name: Generate docs run: | make doc -- cgit From 8ba552bd59b0ed9f316ad1473126b603f35c912a Mon Sep 17 00:00:00 2001 From: dundargoc Date: Fri, 8 Mar 2024 14:07:27 +0100 Subject: ci: allow skipping news workflow with a label Setting the label `ci:skip-news` will skip the job. This is useful for maintainers to indicate to contributors that a feature isn't big enough to warrant a news entry, or for contributors who dislike red CI even if there's nothing wrong. Also change label `ci-s390x` to `ci:s390x`; this way it'll be easier to see that `ci:` are a subcategory of labels that affect CI in some way. --- .github/workflows/news.yml | 4 ++-- .github/workflows/optional.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/news.yml b/.github/workflows/news.yml index 09337a0356..8d21b86e8e 100644 --- a/.github/workflows/news.yml +++ b/.github/workflows/news.yml @@ -1,13 +1,13 @@ name: "news.txt" on: pull_request: - types: [opened, synchronize, reopened, ready_for_review] + types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled] branches: - 'master' jobs: check: runs-on: ubuntu-latest - if: github.event.pull_request.draft == false + if: github.event.pull_request.draft == false && !contains(github.event.pull_request.labels.*.name, 'ci:skip-news') steps: - uses: actions/checkout@v4 with: diff --git a/.github/workflows/optional.yml b/.github/workflows/optional.yml index 62d7707928..c9a8205f87 100644 --- a/.github/workflows/optional.yml +++ b/.github/workflows/optional.yml @@ -17,7 +17,7 @@ env: jobs: s390x: - if: contains(github.event.pull_request.labels.*.name, 'ci-s390x') || github.event_name == 'workflow_dispatch' + if: contains(github.event.pull_request.labels.*.name, 'ci:s390x') || github.event_name == 'workflow_dispatch' strategy: fail-fast: false matrix: -- cgit