aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2023-04-22 22:58:14 +0200
committerGitHub <noreply@github.com>2023-04-22 22:58:14 +0200
commit8994389845ae4ca5e6a797b8f957dea76320ff94 (patch)
treeee897aaa12a70fa8f124334b9e1d29a0aa5a346c
parent801ac2accb6a88a58b2d8f486751782921bf689f (diff)
downloadrneovim-8994389845ae4ca5e6a797b8f957dea76320ff94.tar.gz
rneovim-8994389845ae4ca5e6a797b8f957dea76320ff94.tar.bz2
rneovim-8994389845ae4ca5e6a797b8f957dea76320ff94.zip
ci: make all linux releases work with same glibc version
-rwxr-xr-x.github/scripts/build_universal_macos.sh6
-rw-r--r--.github/workflows/release.yml61
-rw-r--r--cmake.packaging/CMakeLists.txt1
-rwxr-xr-xscripts/genappimage.sh2
4 files changed, 30 insertions, 40 deletions
diff --git a/.github/scripts/build_universal_macos.sh b/.github/scripts/build_universal_macos.sh
index 4dfe0d0cf8..6d9400fb96 100755
--- a/.github/scripts/build_universal_macos.sh
+++ b/.github/scripts/build_universal_macos.sh
@@ -35,10 +35,8 @@ cmake -B build -G Ninja \
-D CMAKE_OSX_ARCHITECTURES=arm64\;x86_64 \
-D CMAKE_FIND_FRAMEWORK=NEVER
cmake --build build
-cmake --install build --prefix build/release/nvim-macos
-cd build
# Make sure we build everything for M1 as well
-for macho in bin/* lib/nvim/parser/*.so; do
+for macho in build/bin/* build/lib/nvim/parser/*.so; do
lipo -info "$macho" | grep -q arm64 || exit 1
done
-cpack -C "$NVIM_BUILD_TYPE"
+cpack --config build/CPackConfig.cmake
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index c6d0c39402..90702dc0a6 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -17,39 +17,10 @@ on:
jobs:
linux:
runs-on: ubuntu-20.04
+ env:
+ CC: gcc-10
outputs:
version: ${{ steps.build.outputs.version }}
- release: ${{ steps.build.outputs.release }}
- steps:
- - uses: actions/checkout@v3
- with:
- 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 'NVIM_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
- - name: Build release
- id: build
- run: |
- CC=gcc-10 make CMAKE_BUILD_TYPE=${NVIM_BUILD_TYPE} CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX:PATH="
- printf 'version<<END\n' >> $GITHUB_OUTPUT
- ./build/bin/nvim --version | head -n 3 >> $GITHUB_OUTPUT
- printf 'END\n' >> $GITHUB_OUTPUT
- printf 'release=%s\n' "$(./build/bin/nvim --version | head -n 1)" >> $GITHUB_OUTPUT
- make DESTDIR="$GITHUB_WORKSPACE/build/release/nvim-linux64" install
- cd "$GITHUB_WORKSPACE/build/"
- cpack -C $NVIM_BUILD_TYPE
- - uses: actions/upload-artifact@v3
- with:
- name: nvim-linux64
- path: |
- build/nvim-linux64.tar.gz
- retention-days: 1
-
- appimage:
- runs-on: ubuntu-20.04
container:
image: ubuntu:18.04
options: --privileged # Privileged mode is needed to load fuse module.
@@ -71,11 +42,19 @@ jobs:
- name: Install dependencies
run: |
apt-get update
- apt-get install -y build-essential cmake gettext locales ninja-build pkg-config unzip
+ apt-get install -y build-essential cmake gettext ninja-build unzip
- if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly')
- run: CC=gcc-10 make appimage-latest
+ run: |
+ echo 'NVIM_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: CC=gcc-10 make appimage-nightly
+ run: |
+ echo 'NVIM_BUILD_TYPE=RelWithDebInfo' >> $GITHUB_ENV
+ echo 'APPIMAGE_TAG=nightly' >> $GITHUB_ENV
+ - name: appimage
+ run: ./scripts/genappimage.sh ${APPIMAGE_TAG}
+ - name: tar.gz
+ run: cpack --config build/CPackConfig.cmake -G TGZ
- uses: actions/upload-artifact@v3
with:
name: appimage
@@ -83,6 +62,18 @@ jobs:
build/bin/nvim.appimage
build/bin/nvim.appimage.zsync
retention-days: 1
+ - uses: actions/upload-artifact@v3
+ with:
+ name: nvim-linux64
+ path: |
+ build/nvim-linux64.tar.gz
+ retention-days: 1
+ - name: Export version
+ id: build
+ run: |
+ printf 'version<<END\n' >> $GITHUB_OUTPUT
+ ./build/bin/nvim --version | head -n 3 >> $GITHUB_OUTPUT
+ printf 'END\n' >> $GITHUB_OUTPUT
macOS:
runs-on: macos-11
@@ -137,7 +128,7 @@ jobs:
retention-days: 1
publish:
- needs: [linux, appimage, macOS, windows]
+ needs: [linux, macOS, windows]
runs-on: ubuntu-latest
env:
GH_REPO: ${{ github.repository }}
diff --git a/cmake.packaging/CMakeLists.txt b/cmake.packaging/CMakeLists.txt
index b5c91ac457..c693e2f9ac 100644
--- a/cmake.packaging/CMakeLists.txt
+++ b/cmake.packaging/CMakeLists.txt
@@ -1,6 +1,7 @@
set(CPACK_PACKAGE_NAME "Neovim")
set(CPACK_PACKAGE_VENDOR "neovim.io")
set(CPACK_PACKAGE_FILE_NAME "nvim")
+set(CPACK_PACKAGE_DIRECTORY ${PROJECT_BINARY_DIR})
# From the GitHub About section
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Vim-fork focused on extensibility and usability.")
diff --git a/scripts/genappimage.sh b/scripts/genappimage.sh
index 9944b5eb31..b0bf186f85 100755
--- a/scripts/genappimage.sh
+++ b/scripts/genappimage.sh
@@ -26,7 +26,7 @@ APP_DIR="$APP.AppDir"
########################################################################
# Build and install nvim into the AppImage
-make CMAKE_BUILD_TYPE=RelWithDebInfo CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX=${APP_DIR}/usr -DCMAKE_INSTALL_MANDIR=man"
+make CMAKE_BUILD_TYPE="${NVIM_BUILD_TYPE}" CMAKE_EXTRA_FLAGS="-DCMAKE_INSTALL_PREFIX=${APP_DIR}/usr -DCMAKE_INSTALL_MANDIR=man"
make install
########################################################################