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
@@ -79,22 +96,18 @@ jobs:
79
96
fetch-depth : 0
80
97
- name : Install dependencies
81
98
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
99
87
100
- name : Build deps
88
101
run : |
89
102
cmake -S cmake.deps -B .deps -G Ninja \
90
- -D CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE } \
103
+ -D CMAKE_BUILD_TYPE=${{ needs.setup.outputs.build_type } } \
91
104
-D CMAKE_FIND_FRAMEWORK=NEVER
92
105
cmake --build .deps
93
106
94
107
- name : Build neovim
95
108
run : |
96
109
cmake -B build -G Ninja \
97
- -D CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE } \
110
+ -D CMAKE_BUILD_TYPE=${{ needs.setup.outputs.build_type } } \
98
111
-D ENABLE_LIBINTL=OFF \
99
112
-D CMAKE_FIND_FRAMEWORK=NEVER
100
113
cmake --build build
@@ -118,11 +131,11 @@ jobs:
118
131
- run : .github/scripts/env.ps1
119
132
- name : Build deps
120
133
run : |
121
- cmake -S cmake.deps -B .deps -G Ninja -DCMAKE_BUILD_TYPE='RelWithDebInfo'
134
+ cmake -S cmake.deps -B .deps -G Ninja -DCMAKE_BUILD_TYPE=${{ needs.setup.outputs.build_type }}
122
135
cmake --build .deps
123
136
- name : build package
124
137
run : |
125
- cmake -B build -G Ninja -DCMAKE_BUILD_TYPE='RelWithDebInfo'
138
+ cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=${{ needs.setup.outputs.build_type }}
126
139
cmake --build build --target package
127
140
- uses : actions/upload-artifact@v4
128
141
with :
0 commit comments