15
15
# Build on the oldest supported images, so we have broader compatibility
16
16
# Build with gcc-10 to prevent triggering #14150 (default is still gcc-9 on 20.04)
17
17
jobs :
18
+ setup :
19
+ runs-on : ubuntu-latest
20
+ outputs :
21
+ build_type : ${{ steps.build.outputs.build_type }}
22
+ appimage_tag : ${{ steps.build.outputs.appimage_tag }}
23
+ steps :
24
+ # Nightly uses RelWithDebInfo while stable uses Release (which disables
25
+ # asserts). This helps get better debug info from people brave enough to
26
+ # use the nightly builds.
27
+ - if : github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly')
28
+ run : |
29
+ echo 'CMAKE_BUILD_TYPE=Release' >> $GITHUB_ENV
30
+ echo 'APPIMAGE_TAG=latest' >> $GITHUB_ENV
31
+ - if : github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly')
32
+ run : |
33
+ echo 'CMAKE_BUILD_TYPE=RelWithDebInfo' >> $GITHUB_ENV
34
+ echo 'APPIMAGE_TAG=nightly' >> $GITHUB_ENV
35
+ - name : Export build information
36
+ id : build
37
+ run : |
38
+ printf "build_type=${CMAKE_BUILD_TYPE}\n" >> $GITHUB_OUTPUT
39
+ printf "appimage_tag=${APPIMAGE_TAG}\n" >> $GITHUB_OUTPUT
40
+
18
41
linux :
19
42
runs-on : ubuntu-20.04
43
+ needs : setup
20
44
env :
21
45
CC : gcc-10
22
46
outputs :
27
51
# Perform a full checkout #13471
28
52
fetch-depth : 0
29
53
- run : ./.github/scripts/install_deps.sh
30
- - if : github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly')
31
- run : |
32
- echo 'CMAKE_BUILD_TYPE=Release' >> $GITHUB_ENV
33
- echo 'APPIMAGE_TAG=latest' >> $GITHUB_ENV
34
- - if : github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly')
35
- run : |
36
- echo 'CMAKE_BUILD_TYPE=RelWithDebInfo' >> $GITHUB_ENV
37
- echo 'APPIMAGE_TAG=nightly' >> $GITHUB_ENV
54
+ - run : echo "CMAKE_BUILD_TYPE=${{ needs.setup.outputs.build_type }}" >> $GITHUB_ENV
38
55
- name : appimage
39
- run : ./scripts/genappimage.sh ${APPIMAGE_TAG }
56
+ run : ./scripts/genappimage.sh ${{ needs.setup.outputs.appimage_tag } }
40
57
- name : tar.gz
41
58
run : cpack --config build/CPackConfig.cmake -G TGZ
42
59
- uses : actions/upload-artifact@v4
60
77
printf 'END\n' >> $GITHUB_OUTPUT
61
78
62
79
macos :
80
+ needs : setup
63
81
strategy :
64
82
fail-fast : false
65
83
matrix :
@@ -79,22 +97,18 @@ jobs:
79
97
fetch-depth : 0
80
98
- name : Install dependencies
81
99
run : ./.github/scripts/install_deps.sh
82
- - if : github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly')
83
- run : printf 'CMAKE_BUILD_TYPE=Release\n' >> $GITHUB_ENV
84
- - if : github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly')
85
- run : printf 'CMAKE_BUILD_TYPE=RelWithDebInfo\n' >> $GITHUB_ENV
86
100
87
101
- name : Build deps
88
102
run : |
89
103
cmake -S cmake.deps -B .deps -G Ninja \
90
- -D CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE } \
104
+ -D CMAKE_BUILD_TYPE=${{ needs.setup.outputs.build_type } } \
91
105
-D CMAKE_FIND_FRAMEWORK=NEVER
92
106
cmake --build .deps
93
107
94
108
- name : Build neovim
95
109
run : |
96
110
cmake -B build -G Ninja \
97
- -D CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE } \
111
+ -D CMAKE_BUILD_TYPE=${{ needs.setup.outputs.build_type } } \
98
112
-D ENABLE_LIBINTL=OFF \
99
113
-D CMAKE_FIND_FRAMEWORK=NEVER
100
114
cmake --build build
@@ -109,6 +123,7 @@ jobs:
109
123
retention-days : 1
110
124
111
125
windows :
126
+ needs : setup
112
127
runs-on : windows-2019
113
128
steps :
114
129
- uses : actions/checkout@v4
@@ -118,11 +133,11 @@ jobs:
118
133
- run : .github/scripts/env.ps1
119
134
- name : Build deps
120
135
run : |
121
- cmake -S cmake.deps -B .deps -G Ninja -DCMAKE_BUILD_TYPE='RelWithDebInfo'
136
+ cmake -S cmake.deps -B .deps -G Ninja -DCMAKE_BUILD_TYPE=${{ needs.setup.outputs.build_type }}
122
137
cmake --build .deps
123
138
- name : build package
124
139
run : |
125
- cmake -B build -G Ninja -DCMAKE_BUILD_TYPE='RelWithDebInfo'
140
+ cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=${{ needs.setup.outputs.build_type }}
126
141
cmake --build build --target package
127
142
- uses : actions/upload-artifact@v4
128
143
with :
0 commit comments