diff options
| author | Josh Rahm <joshuarahm@gmail.com> | 2024-05-24 19:18:11 +0000 |
|---|---|---|
| committer | Josh Rahm <joshuarahm@gmail.com> | 2024-05-24 19:18:11 +0000 |
| commit | ff7ed8f586589d620a806c3758fac4a47a8e7e15 (patch) | |
| tree | 729bbcb92231538fa61dab6c3d890b025484b7f5 /.github/workflows | |
| parent | 376914f419eb08fdf4c1a63a77e1f035898a0f10 (diff) | |
| parent | 28c04948a1c887a1cc0cb64de79fa32631700466 (diff) | |
| download | rneovim-ff7ed8f586589d620a806c3758fac4a47a8e7e15.tar.gz rneovim-ff7ed8f586589d620a806c3758fac4a47a8e7e15.tar.bz2 rneovim-ff7ed8f586589d620a806c3758fac4a47a8e7e15.zip | |
Merge remote-tracking branch 'upstream/master' into mix_20240309
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/backport.yml | 16 | ||||
| -rw-r--r-- | .github/workflows/build.yml | 20 | ||||
| -rw-r--r-- | .github/workflows/codeql.yml | 6 | ||||
| -rw-r--r-- | .github/workflows/notes.md | 20 | ||||
| -rw-r--r-- | .github/workflows/optional.yml | 11 | ||||
| -rw-r--r-- | .github/workflows/release.yml | 105 | ||||
| -rw-r--r-- | .github/workflows/test.yml | 71 | ||||
| -rw-r--r-- | .github/workflows/test_windows.yml | 72 | ||||
| -rw-r--r-- | .github/workflows/vim_patches.yml | 2 |
9 files changed, 200 insertions, 123 deletions
diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index 88cddcded4..9fbe837106 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -12,11 +12,25 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Create backport PRs + - name: Create backport PR + id: backport uses: korthout/backport-action@v2 with: + pull_title: "${pull_title}" + label_pattern: "^ci:backport ([^ ]+)$" # https://github.com/korthout/backport-action/pull/399 experimental: > { "detect_merge_method": true } + + - if: ${{steps.backport.outputs.was_successful == 'true'}} + uses: actions/github-script@v7 + with: + script: | + github.rest.issues.addLabels({ + issue_number: ${{steps.backport.outputs.created_pull_numbers}}, + owner: context.repo.owner, + repo: context.repo.repo, + labels: ['target:release'] + }) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 13fa692be1..a2316f3f0f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,30 +10,20 @@ on: - '**/CMakePresets.json' - 'cmake.*/**' - '.github/**' + workflow_dispatch: concurrency: - group: ${{ github.workflow }}-${{ github.head_ref }} - cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} env: BIN_DIR: ${{ github.workspace }}/bin INSTALL_PREFIX: ${{ github.workspace }}/nvim-install jobs: - macos-universal: - runs-on: macos-14 - timeout-minutes: 20 - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/setup - - run: printf 'CMAKE_BUILD_TYPE=Release\n' >> $GITHUB_ENV - - - name: Build universal binary - run: ./.github/scripts/build_universal_macos.sh - old-cmake: name: Test oldest supported cmake - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest timeout-minutes: 15 env: CMAKE_URL: 'https://cmake.org/files/v3.13/cmake-3.13.0-Linux-x86_64.sh' @@ -66,7 +56,7 @@ jobs: use-existing-src: name: Test USE_EXISTING_SRC_DIR=ON builds with no network access - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: ./.github/actions/setup diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index c2db78dd25..9c85d606da 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -1,8 +1,8 @@ name: "codeql" concurrency: - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} - cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} on: push: @@ -10,6 +10,8 @@ on: pull_request: # The branches below must be a subset of the branches above branches: [ "master" ] + workflow_dispatch: + jobs: analyze: name: Analyze diff --git a/.github/workflows/notes.md b/.github/workflows/notes.md index 294d92ebb5..f67a098687 100644 --- a/.github/workflows/notes.md +++ b/.github/workflows/notes.md @@ -18,12 +18,19 @@ ${NVIM_VERSION} 2. Run the MSI 3. Run `nvim.exe` on your CLI of choice -### macOS +### macOS (x86_64) -1. Download **nvim-macos.tar.gz** -2. Run `xattr -c ./nvim-macos.tar.gz` (to avoid "unknown developer" warning) -3. Extract: `tar xzvf nvim-macos.tar.gz` -4. Run `./nvim-macos/bin/nvim` +1. Download **nvim-macos-x86_64.tar.gz** +2. Run `xattr -c ./nvim-macos-x86_64.tar.gz` (to avoid "unknown developer" warning) +3. Extract: `tar xzvf nvim-macos-x86_64.tar.gz` +4. Run `./nvim-macos-x86_64/bin/nvim` + +### macOS (arm64) + +1. Download **nvim-macos-arm64.tar.gz** +2. Run `xattr -c ./nvim-macos-arm64.tar.gz` (to avoid "unknown developer" warning) +3. Extract: `tar xzvf nvim-macos-arm64.tar.gz` +4. Run `./nvim-macos-arm64/bin/nvim` ### Linux (x64) @@ -56,7 +63,8 @@ https://github.com/neovim/neovim-releases. ${SHA_LINUX_64_TAR} ${SHA_APP_IMAGE} ${SHA_APP_IMAGE_ZSYNC} -${SHA_MACOS} +${SHA_MACOS_X86_64} +${SHA_MACOS_ARM64} ${SHA_WIN_64_ZIP} ${SHA_WIN_64_MSI} ``` diff --git a/.github/workflows/optional.yml b/.github/workflows/optional.yml index c9a8205f87..742d51377f 100644 --- a/.github/workflows/optional.yml +++ b/.github/workflows/optional.yml @@ -5,8 +5,8 @@ on: workflow_dispatch: concurrency: - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} - cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} env: INSTALL_PREFIX: ${{ github.workspace }}/nvim-install @@ -46,3 +46,10 @@ jobs: runuser -u qemuci -- cmake -B build -G Ninja -D CI_BUILD=ON -D PREFER_LUA=ON && runuser -u qemuci -- make ${{ matrix.test }} " + + windows-asan: + if: contains(github.event.pull_request.labels.*.name, 'ci:windows-asan') || github.event_name == 'workflow_dispatch' + uses: ./.github/workflows/test_windows.yml + with: + build_flags: "-D ENABLE_ASAN_UBSAN=ON" + functionaltest_timeout: 40 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 48a3901955..6abdd588ba 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,8 +15,32 @@ on: # Build on the oldest supported images, so we have broader compatibility # Build with gcc-10 to prevent triggering #14150 (default is still gcc-9 on 20.04) jobs: + setup: + runs-on: ubuntu-latest + outputs: + build_type: ${{ steps.build.outputs.build_type }} + appimage_tag: ${{ steps.build.outputs.appimage_tag }} + steps: + # Nightly uses RelWithDebInfo while stable uses Release (which disables + # asserts). This helps get better debug info from people brave enough to + # use the nightly builds. + - if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly') + run: | + 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 'CMAKE_BUILD_TYPE=RelWithDebInfo' >> $GITHUB_ENV + echo 'APPIMAGE_TAG=nightly' >> $GITHUB_ENV + - name: Export build information + id: build + run: | + printf "build_type=${CMAKE_BUILD_TYPE}\n" >> $GITHUB_OUTPUT + printf "appimage_tag=${APPIMAGE_TAG}\n" >> $GITHUB_OUTPUT + linux: runs-on: ubuntu-20.04 + needs: setup env: CC: gcc-10 outputs: @@ -27,16 +51,9 @@ jobs: # 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: | - 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 'CMAKE_BUILD_TYPE=RelWithDebInfo' >> $GITHUB_ENV - echo 'APPIMAGE_TAG=nightly' >> $GITHUB_ENV + - run: echo "CMAKE_BUILD_TYPE=${{ needs.setup.outputs.build_type }}" >> $GITHUB_ENV - name: appimage - run: ./scripts/genappimage.sh ${APPIMAGE_TAG} + run: ./scripts/genappimage.sh ${{ needs.setup.outputs.appimage_tag }} - name: tar.gz run: cpack --config build/CPackConfig.cmake -G TGZ - uses: actions/upload-artifact@v4 @@ -59,8 +76,20 @@ jobs: ./build/bin/nvim --version | head -n 3 >> $GITHUB_OUTPUT printf 'END\n' >> $GITHUB_OUTPUT - macOS: - runs-on: macos-14 + macos: + needs: setup + strategy: + fail-fast: false + matrix: + runner: [ macos-12, macos-14 ] + include: + - runner: macos-12 + arch: x86_64 + - runner: macos-14 + arch: arm64 + runs-on: ${{ matrix.runner }} + env: + MACOSX_DEPLOYMENT_TARGET: 11.0 steps: - uses: actions/checkout@v4 with: @@ -68,21 +97,34 @@ jobs: 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') - 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 'CMAKE_BUILD_TYPE=RelWithDebInfo\n' >> $GITHUB_ENV - - name: Build universal binary - run: ./.github/scripts/build_universal_macos.sh + + - name: Build deps + run: | + cmake -S cmake.deps -B .deps -G Ninja \ + -D CMAKE_BUILD_TYPE=${{ needs.setup.outputs.build_type }} \ + -D CMAKE_FIND_FRAMEWORK=NEVER + cmake --build .deps + + - name: Build neovim + run: | + cmake -B build -G Ninja \ + -D CMAKE_BUILD_TYPE=${{ needs.setup.outputs.build_type }} \ + -D ENABLE_LIBINTL=OFF \ + -D CMAKE_FIND_FRAMEWORK=NEVER + cmake --build build + + - name: Package + run: cpack --config build/CPackConfig.cmake + - uses: actions/upload-artifact@v4 with: - name: nvim-macos - path: build/nvim-macos.tar.gz + name: nvim-macos-${{ matrix.arch }} + path: build/nvim-macos-${{ matrix.arch }}.tar.gz retention-days: 1 windows: + needs: setup runs-on: windows-2019 - name: windows (MSVC_64) steps: - uses: actions/checkout@v4 with: @@ -91,11 +133,11 @@ jobs: - run: .github/scripts/env.ps1 - name: Build deps run: | - cmake -S cmake.deps -B .deps -G Ninja -DCMAKE_BUILD_TYPE='RelWithDebInfo' + cmake -S cmake.deps -B .deps -G Ninja -DCMAKE_BUILD_TYPE=${{ needs.setup.outputs.build_type }} cmake --build .deps - name: build package run: | - cmake -B build -G Ninja -DCMAKE_BUILD_TYPE='RelWithDebInfo' + cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=${{ needs.setup.outputs.build_type }} cmake --build build --target package - uses: actions/upload-artifact@v4 with: @@ -106,7 +148,7 @@ jobs: retention-days: 1 publish: - needs: [linux, macOS, windows] + needs: [linux, macos, windows] runs-on: ubuntu-latest env: GH_REPO: ${{ github.repository }} @@ -160,11 +202,16 @@ jobs: cd ./appimage sha256sum nvim.appimage.zsync > nvim.appimage.zsync.sha256sum echo "SHA_APP_IMAGE_ZSYNC=$(cat nvim.appimage.zsync.sha256sum)" >> $GITHUB_ENV - - name: Generate macOS SHA256 checksums + - name: Generate macos x86_64 SHA256 checksums + run: | + cd ./nvim-macos-x86_64 + sha256sum nvim-macos-x86_64.tar.gz > nvim-macos-x86_64.tar.gz.sha256sum + echo "SHA_MACOS_X86_64=$(cat nvim-macos-x86_64.tar.gz.sha256sum)" >> $GITHUB_ENV + - name: Generate macos arm64 SHA256 checksums run: | - cd ./nvim-macos - sha256sum nvim-macos.tar.gz > nvim-macos.tar.gz.sha256sum - echo "SHA_MACOS=$(cat nvim-macos.tar.gz.sha256sum)" >> $GITHUB_ENV + cd ./nvim-macos-arm64 + sha256sum nvim-macos-arm64.tar.gz > nvim-macos-arm64.tar.gz.sha256sum + echo "SHA_MACOS_ARM64=$(cat nvim-macos-arm64.tar.gz.sha256sum)" >> $GITHUB_ENV - name: Generate Win64 SHA256 checksums run: | cd ./nvim-win64 @@ -179,6 +226,6 @@ jobs: run: | envsubst < "$GITHUB_WORKSPACE/.github/workflows/notes.md" > "$RUNNER_TEMP/notes.md" 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/* + gh release create stable $PRERELEASE --notes-file "$RUNNER_TEMP/notes.md" --title "$SUBJECT" --target $GITHUB_SHA nvim-macos-x86_64/* nvim-macos-arm64/* 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/* + gh release create $TAG_NAME $PRERELEASE --notes-file "$RUNNER_TEMP/notes.md" --title "$SUBJECT" --target $GITHUB_SHA nvim-macos-x86_64/* nvim-macos-arm64/* nvim-linux64/* appimage/* nvim-win64/* diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6bd40b8561..d0ee18ab73 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,10 +10,11 @@ on: - 'release-[0-9]+.[0-9]+' paths-ignore: - 'contrib/**' + workflow_dispatch: concurrency: - group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} - cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} env: ASAN_OPTIONS: detect_leaks=1:check_initialization_order=1:log_path=${{ github.workspace }}/build/log/asan:intercept_tls_get_addr=0 @@ -113,8 +114,6 @@ 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 }} @@ -133,10 +132,6 @@ jobs: - if: ${{ matrix.test != 'unittest' }} name: Set up interpreter packages run: | - # Use default CC to avoid compilation problems when installing Python modules. - echo "Install neovim module for Python." - CC=cc python3 -m pip -q install --user --upgrade pynvim - echo "Install neovim RubyGem." gem install --no-document --bindir "$BIN_DIR" --user-install --pre neovim @@ -193,65 +188,7 @@ jobs: run: cat $(find "$LOG_DIR" -type f) windows: - runs-on: windows-2022 - timeout-minutes: 45 - strategy: - fail-fast: false - matrix: - test: [functional, old] - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/setup - - - name: Build deps - run: | - cmake -S cmake.deps -B .deps -G Ninja -D CMAKE_BUILD_TYPE='RelWithDebInfo' - cmake --build .deps - - - name: Build - run: | - cmake --preset ci -D CMAKE_BUILD_TYPE='RelWithDebInfo' - cmake --build build - - - name: Install test deps - run: | - $PSNativeCommandArgumentPassing = 'Legacy' - - & build\bin\nvim.exe "--version" - - # Ensure that the "win32" feature is set. - & build\bin\nvim -u NONE --headless -c 'exe !has(\"win32\").\"cq\"' - - python -m pip install pynvim - # Sanity check - python -c "import pynvim; print(str(pynvim))" - - node --version - npm.cmd --version - - npm.cmd install -g neovim - Get-Command -CommandType Application neovim-node-host.cmd - npm.cmd link neovim - - - if: ${{ matrix.test == 'functional' }} - name: functionaltest - timeout-minutes: 20 - run: cmake --build build --target functionaltest - - - if: ${{ matrix.test == 'old' }} - uses: msys2/setup-msys2@v2 - with: - update: true - pacboy: >- - make:p gcc:p diffutils:p - release: false - - - if: ${{ matrix.test == 'old' }} - name: oldtest - shell: msys2 {0} - run: | - cd test/old/testdir - mingw32-make VERBOSE=1 + uses: ./.github/workflows/test_windows.yml # This job tests the following things: # - Check if Release, MinSizeRel and RelWithDebInfo compiles correctly. diff --git a/.github/workflows/test_windows.yml b/.github/workflows/test_windows.yml new file mode 100644 index 0000000000..d92993a08c --- /dev/null +++ b/.github/workflows/test_windows.yml @@ -0,0 +1,72 @@ +name: windows +on: + workflow_call: + inputs: + build_flags: + type: string + functionaltest_timeout: + default: 20 + type: number + workflow_dispatch: + +jobs: + windows: + runs-on: windows-2022 + timeout-minutes: 45 + strategy: + fail-fast: false + matrix: + test: [functional, old] + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/setup + + - name: Build deps + run: | + cmake -S cmake.deps -B .deps -G Ninja -D CMAKE_BUILD_TYPE='RelWithDebInfo' + cmake --build .deps + + - name: Build + run: | + cmake --preset ci -D CMAKE_BUILD_TYPE='RelWithDebInfo' ${{ inputs.build_flags }} + cmake --build build + + - name: Install test deps + run: | + $PSNativeCommandArgumentPassing = 'Legacy' + + & build\bin\nvim.exe "--version" + + # Ensure that the "win32" feature is set. + & build\bin\nvim -u NONE --headless -c 'exe !has(\"win32\").\"cq\"' + + python -m pip install pynvim + # Sanity check + python -c "import pynvim; print(str(pynvim))" + + node --version + npm.cmd --version + + npm.cmd install -g neovim + Get-Command -CommandType Application neovim-node-host.cmd + npm.cmd link neovim + + - if: ${{ matrix.test == 'functional' }} + name: functionaltest + timeout-minutes: ${{ inputs.functionaltest_timeout }} + run: cmake --build build --target functionaltest + + - if: ${{ matrix.test == 'old' }} + uses: msys2/setup-msys2@v2 + with: + update: true + pacboy: >- + make:p gcc:p diffutils:p + release: false + + - if: ${{ matrix.test == 'old' }} + name: oldtest + shell: msys2 {0} + run: | + cd test/old/testdir + mingw32-make VERBOSE=1 diff --git a/.github/workflows/vim_patches.yml b/.github/workflows/vim_patches.yml index 711ddae815..f4251336c7 100644 --- a/.github/workflows/vim_patches.yml +++ b/.github/workflows/vim_patches.yml @@ -50,6 +50,6 @@ jobs: if: ${{ steps.update-version.outputs.NEW_PATCHES != 0 }} run: | git add -u - git commit -m 'version.c: update [skip ci]' + git commit -m 'docs: update version.c [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 |