diff options
| author | dundargoc <gocdundar@gmail.com> | 2024-03-23 21:28:46 +0100 |
|---|---|---|
| committer | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2024-03-24 20:58:30 +0100 |
| commit | 036f86feaccb25d8552c4bf4d216f7f2a9205325 (patch) | |
| tree | 0382c9d76d83cf0018f104d8160d4c7ff1722923 /.github/workflows | |
| parent | 011585f35fee83c27e6db91a4ed0feff362efa75 (diff) | |
| download | rneovim-036f86feaccb25d8552c4bf4d216f7f2a9205325.tar.gz rneovim-036f86feaccb25d8552c4bf4d216f7f2a9205325.tar.bz2 rneovim-036f86feaccb25d8552c4bf4d216f7f2a9205325.zip | |
ci: provide separate macos releases for intel and arm
This will immensely reduce the complexity required to support both
architectures, reduce overall lines of code and unblock follow-up
simplifications.
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/build.yml | 11 | ||||
| -rw-r--r-- | .github/workflows/notes.md | 20 | ||||
| -rw-r--r-- | .github/workflows/release.yml | 60 |
3 files changed, 60 insertions, 31 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bf8356243e..c30748bb78 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,17 +20,6 @@ env: 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 diff --git a/.github/workflows/notes.md b/.github/workflows/notes.md index 294d92ebb5..ba7e55a9c1 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_86.tar.gz** +2. Run `xattr -c ./nvim-macos-x86_86.tar.gz` (to avoid "unknown developer" warning) +3. Extract: `tar xzvf nvim-macos-x86_86.tar.gz` +4. Run `./nvim-macos-x86_86/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/release.yml b/.github/workflows/release.yml index 48a3901955..e0989120f3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -59,8 +59,19 @@ jobs: ./build/bin/nvim --version | head -n 3 >> $GITHUB_OUTPUT printf 'END\n' >> $GITHUB_OUTPUT - macOS: - runs-on: macos-14 + macos: + 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: @@ -72,17 +83,33 @@ jobs: 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=${CMAKE_BUILD_TYPE} \ + -D CMAKE_FIND_FRAMEWORK=NEVER + cmake --build .deps + + - name: Build neovim + run: | + cmake -B build -G Ninja \ + -D CMAKE_BUILD_TYPE=${CMAKE_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: runs-on: windows-2019 - name: windows (MSVC_64) steps: - uses: actions/checkout@v4 with: @@ -106,7 +133,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 +187,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 +211,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/* |