9696 build-lua :
9797 strategy :
9898 matrix : # using ubuntu-22.04 to build a Linux binary targeting older glibc to improve compatibility
99- os : [{name: ubuntu, version: ubuntu-22.04}, {name: macos, version: macos-latest}, {name: windows, version: windows-latest}]
100- lua : [{name: '5.1', directory: lua51}, {name: '5.2', directory: lua52}, {name: '5.3', directory: lua53}, {name: '5.4', directory: lua54}, {name: '5.5', directory: lua55}]
99+ os :
100+ - name : ubuntu
101+ version : ubuntu-22.04
102+ - name : macos
103+ version : macos-latest
104+ - name : windows
105+ version : windows-latest
106+ lua :
107+ - name : ' 5.1'
108+ directory : lua51
109+ - name : ' 5.2'
110+ directory : lua52
111+ - name : ' 5.3'
112+ directory : lua53
113+ - name : ' 5.3 (LUA_32BITS)'
114+ directory : lua53
115+ output : lua53-int32
116+ options : " -DLUA_32BITS"
117+ - name : ' 5.4'
118+ directory : lua54
119+ - name : ' 5.4 (LUA_32BITS)'
120+ directory : lua54
121+ output : lua54-int32
122+ options : " -DLUA_32BITS"
123+ - name : ' 5.5'
124+ directory : lua55
125+ - name : ' 5.5 (LUA_32BITS)'
126+ directory : lua55
127+ output : lua55-int32
128+ options : " -DLUA_32BITS"
101129 fail-fast : false
102130 name : Build Lua ${{ matrix.lua.name }} (${{ matrix.os.name }})
103131 runs-on : ${{ matrix.os.version }}
@@ -116,20 +144,20 @@ jobs:
116144 - name : Build for Windows
117145 if : matrix.os.name == 'windows'
118146 run : |
119- ..\..\CompileLua.bat
147+ ..\..\CompileLua.bat ${{ matrix.lua.options || '' }}
120148 - name : Build for macOS
121149 if : matrix.os.name == 'macos'
122150 run : |
123151 # `make macosx` doesn't allow us to change MYCFLAGS/MYLDFLAGS
124- make all MYCFLAGS="-DLUA_USE_LINUX -arch arm64 -arch x86_64" MYLIBS="-lreadline" MYLDFLAGS="-arch arm64 -arch x86_64"
152+ make all MYCFLAGS="-DLUA_USE_LINUX ${{ matrix.lua.options || '' }} -arch arm64 -arch x86_64" MYLIBS="-lreadline" MYLDFLAGS="-arch arm64 -arch x86_64"
125153 - name : Build for Linux
126154 if : matrix.os.name == 'ubuntu'
127155 run : |
128- make linux
156+ make linux MYCFLAGS="${{ matrix.lua.options || '' }}"
129157 - name : Upload artifact
130158 uses : actions/upload-artifact@v6
131159 with :
132- name : ${{ matrix.lua.directory }}-${{matrix.os.name}}
160+ name : ${{ matrix.lua.output || matrix.lua. directory }}-${{matrix.os.name}}
133161 path : ${{ format(matrix.os.name == 'windows' && '{0}/src/lua.exe' || '{0}/src/lua', matrix.lua.directory) }}
134162 if-no-files-found : error
135163 merge-and-release :
0 commit comments