blob: 9c47287b4c0a8af7c15fd36a90d37de8f6f33013 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
|
name: release
on:
schedule:
- cron: '5 5 * * *'
workflow_dispatch:
inputs:
tag_name:
description: 'Tag name for release'
required: false
default: nightly
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
permissions:
contents: read
# Build on the oldest supported images, so we have broader compatibility
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:
needs: setup
strategy:
fail-fast: false
matrix:
runner: [ ubuntu-22.04, ubuntu-22.04-arm ]
include:
- runner: ubuntu-22.04
arch: x86_64
- runner: ubuntu-22.04-arm
arch: arm64
runs-on: ${{ matrix.runner }}
env:
CC: ${{ matrix.cc }}
LDAI_NO_APPSTREAM: 1 # skip checking (broken) AppStream metadata for issues
outputs:
version: ${{ steps.build.outputs.version }}
steps:
- uses: actions/checkout@v7.0.1
with:
# Perform a full checkout #13471
fetch-depth: 0
persist-credentials: false
- run: ./.github/scripts/install_deps.sh
- run: sudo apt-get install -y libfuse2
- run: echo "CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}" >> $GITHUB_ENV
env:
CMAKE_BUILD_TYPE: ${{ needs.setup.outputs.build_type }}
- name: appimage
env:
APPIMAGE_TAG: ${{ needs.setup.outputs.appimage_tag }}
run: |
./scripts/genappimage.sh "${APPIMAGE_TAG}"
- name: tar.gz
run: cpack --config build/CPackConfig.cmake -G TGZ
- uses: actions/upload-artifact@v7
with:
name: nvim-appimage-${{ matrix.arch }}
path: |
build/bin/nvim-linux-${{ matrix.arch }}.appimage
build/bin/nvim-linux-${{ matrix.arch }}.appimage.zsync
retention-days: 1
- uses: actions/upload-artifact@v7
with:
name: nvim-linux-${{ matrix.arch }}
path: |
build/nvim-linux-${{ matrix.arch }}.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:
needs: setup
strategy:
fail-fast: false
matrix:
runner: [ macos-15-intel, macos-15 ]
include:
- runner: macos-15-intel
arch: x86_64
- runner: macos-15
arch: arm64
runs-on: ${{ matrix.runner }}
env:
CMAKE_BUILD_TYPE: ${{ needs.setup.outputs.build_type }}
MACOSX_DEPLOYMENT_TARGET: 11.0
steps:
- uses: actions/checkout@v7.0.1
with:
# Perform a full checkout #13471
fetch-depth: 0
persist-credentials: false
- name: Install dependencies
run: ./.github/scripts/install_deps.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@v7
with:
name: nvim-macos-${{ matrix.arch }}
path: build/nvim-macos-${{ matrix.arch }}.tar.gz
retention-days: 1
windows:
needs: setup
strategy:
matrix:
include:
- runner: windows-2022
arch: x86_64
archive_name: nvim-win64
- runner: windows-11-arm
arch: arm64
archive_name: nvim-win-arm64
runs-on: ${{ matrix.runner }}
env:
CMAKE_BUILD_TYPE: ${{ needs.setup.outputs.build_type }}
steps:
- uses: actions/checkout@v7.0.1
with:
# Perform a full checkout #13471
fetch-depth: 0
persist-credentials: false
- run: .github/scripts/env.ps1
env:
BUILD_ARCH: ${{ matrix.arch }}
- name: Install Wix
run: |
Invoke-WebRequest -Uri "https://github.com/wixtoolset/wix3/releases/download/wix3141rtm/wix314-binaries.zip" -OutFile "wix314-binaries.zip"
Expand-Archive -Path "wix314-binaries.zip" -DestinationPath "C:/wix"
echo "C:\wix" >> $env:GITHUB_PATH
- name: Build deps
shell: pwsh
run: |
cmake -S cmake.deps -B .deps -G Ninja -DCMAKE_BUILD_TYPE="${env:CMAKE_BUILD_TYPE}"
cmake --build .deps
- name: Build package
shell: pwsh
run: |
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE="${env:CMAKE_BUILD_TYPE}"
cmake --build build --target package
- name: Upload artifact
uses: actions/upload-artifact@v7
with:
name: nvim-win-${{ matrix.arch }}
path: |
build/${{ matrix.archive_name }}.zip
build/${{ matrix.archive_name }}.msi
retention-days: 1
wasm:
needs: setup
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v7
with:
persist-credentials: false
- name: Set up Zig
uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2.2.1
with:
version: 0.16.0
use-cache: false
- name: Install system deps
run: |
sudo apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y \
python3 python3-pip curl unzip zip
- name: Install Emscripten SDK
run: |
set -euo pipefail
git clone https://github.com/emscripten-core/emsdk.git ./.emsdk
cd ./.emsdk
./emsdk install 6.0.2
./emsdk activate 6.0.2
cd -
- name: Build nvim.wasm
run: .github/scripts/build_wasm.sh
env:
BUNDLE_WASM: "1"
- name: Upload wasm artifact
uses: actions/upload-artifact@v7
with:
name: nvim-wasm-emscripten
path: nvim-wasm-emscripten.zip
retention-days: 1
publish:
needs: [linux, macos, windows, wasm]
runs-on: ubuntu-latest
env:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
# Must perform checkout first, since it deletes the target directory
# before running, and would therefore delete the downloaded artifacts
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- uses: actions/download-artifact@v8
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y gettext-base
- if: github.event_name == 'workflow_dispatch'
env:
TAG_NAME: ${{ github.event.inputs.tag_name }}
run: echo "TAG_NAME=${TAG_NAME}" >> $GITHUB_ENV
- if: github.event_name == 'schedule'
run: echo 'TAG_NAME=nightly' >> $GITHUB_ENV
- if: github.event_name == 'push'
run: |
echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- if: env.TAG_NAME == 'nightly'
run: |
(echo 'SUBJECT=Nvim development (prerelease) build';
echo 'PRERELEASE=--prerelease') >> $GITHUB_ENV
gh release delete nightly --yes || true
git push https://${GITHUB_ACTOR}:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY} :nightly || true
- if: env.TAG_NAME != 'nightly'
run: |
(echo 'SUBJECT=Nvim release build';
echo 'PRERELEASE=') >> $GITHUB_ENV
gh release delete stable --yes || true
git push https://${GITHUB_ACTOR}:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY} :stable || true
- name: Publish release
env:
NVIM_VERSION: ${{ needs.linux.outputs.version }}
NVIM_COMMIT: ${{ github.sha }}
DEBUG: api
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-x86_64/* nvim-macos-arm64/* nvim-linux-x86_64/* nvim-linux-arm64/* nvim-appimage-x86_64/* nvim-appimage-arm64/* nvim-win-x86_64/* nvim-win-arm64/* nvim-wasm-emscripten/*
fi
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-linux-x86_64/* nvim-linux-arm64/* nvim-appimage-x86_64/* nvim-appimage-arm64/* nvim-win-x86_64/* nvim-win-arm64/* nvim-wasm-emscripten/*
|