@@ -7,7 +7,7 @@ By the use of ```LuaInstaller.Console```, you can setup continuous integration /
77## Table of Contents
88
99* [ Setup Lua (x86, x64, arm64)] ( #setup-lua-x86-x64-arm64 )
10- * [ Setup Lua and LuaRocks (x86, x64)] ( #setup-lua-and-luarocks-x86-x64 )
10+ * [ Setup Lua and LuaRocks (x86, x64, arm64 )] ( #setup-lua-and-luarocks-x86-x64-arm64 )
1111
1212## Setup Lua (x86, x64, arm64)
1313
2828jobs :
2929
3030 build :
31- runs-on : windows-latest
31+ runs-on : ${{ matrix.os }}
3232 name : Build
3333
3434 strategy :
3535 matrix :
36-
37- lua-version :
38- - 5.1.5
39- - 5.2.4
40- - 5.3.6
41- - 5.4.7
42-
43- arch :
44- - x64
45- - x86
46- - arm64
36+ include :
37+ # x86
38+ - { lua-version: "5.1.5", arch: "x86", os: "windows-latest" }
39+ - { lua-version: "5.2.4", arch: "x86", os: "windows-latest" }
40+ - { lua-version: "5.3.6", arch: "x86", os: "windows-latest" }
41+ - { lua-version: "5.4.7", arch: "x86", os: "windows-latest" }
42+ # x64
43+ - { lua-version: "5.1.5", arch: "x64", os: "windows-latest" }
44+ - { lua-version: "5.2.4", arch: "x64", os: "windows-latest" }
45+ - { lua-version: "5.3.6", arch: "x64", os: "windows-latest" }
46+ - { lua-version: "5.4.7", arch: "x64", os: "windows-latest" }
47+ # arm64
48+ - { lua-version: "5.1.5", arch: "arm64", os: "windows-11-arm" }
49+ - { lua-version: "5.2.4", arch: "arm64", os: "windows-11-arm" }
50+ - { lua-version: "5.3.6", arch: "arm64", os: "windows-11-arm" }
51+ - { lua-version: "5.4.7", arch: "arm64", os: "windows-11-arm" }
4752
4853 steps :
4954
5257 run : |
5358 if (-not ("${{ matrix.lua-version }}" -match "^[0-9]+\.[0-9]+\.[0-9]+$"))
5459 {
55- Write-Host "Invalid Lua version";
56- exit 1;
57- }
58-
59- - name : Sanity check the architecture
60- shell : pwsh
61- run : |
62- if ("${{ matrix.arch }}".ToLower() -ne "arm64" -and -not ("${{ matrix.arch }}" -match "^[xX](64|86)$"))
63- {
64- Write-Host "Invalid architecture";
60+ Write-Host "Invalid Lua version. It must be on format X.Y.Z";
6561 exit 1;
6662 }
6763
@@ -122,7 +118,7 @@ jobs:
122118 Add-Content "${{ github.env }}" "PKG_CONFIG_PATH=${lua_pc_dir};${pkg_config_path}";
123119` ` `
124120
125- ## Setup Lua and LuaRocks (x86, x64)
121+ ## Setup Lua and LuaRocks (x86, x64, arm64 )
126122
127123This time, in another GitHub workflow, we setup Lua and LuaRocks. At the end of the workflow, we install a few libraries using LuaRocks.
128124
@@ -138,21 +134,27 @@ env:
138134jobs :
139135
140136 build :
141- runs-on : windows-latest
137+ runs-on : ${{ matrix.os }}
142138 name : Build
143139
144140 strategy :
145141 matrix :
146-
147- lua-version :
148- - 5.1.5
149- - 5.2.4
150- - 5.3.6
151- - 5.4.7
152-
153- arch :
154- - x64
155- - x86
142+ include :
143+ # x86
144+ - { lua-version: "5.1.5", arch: "x86", os: "windows-latest" }
145+ - { lua-version: "5.2.4", arch: "x86", os: "windows-latest" }
146+ - { lua-version: "5.3.6", arch: "x86", os: "windows-latest" }
147+ - { lua-version: "5.4.7", arch: "x86", os: "windows-latest" }
148+ # x64
149+ - { lua-version: "5.1.5", arch: "x64", os: "windows-latest" }
150+ - { lua-version: "5.2.4", arch: "x64", os: "windows-latest" }
151+ - { lua-version: "5.3.6", arch: "x64", os: "windows-latest" }
152+ - { lua-version: "5.4.7", arch: "x64", os: "windows-latest" }
153+ # arm64
154+ - { lua-version: "5.1.5", arch: "arm64", os: "windows-11-arm" }
155+ - { lua-version: "5.2.4", arch: "arm64", os: "windows-11-arm" }
156+ - { lua-version: "5.3.6", arch: "arm64", os: "windows-11-arm" }
157+ - { lua-version: "5.4.7", arch: "arm64", os: "windows-11-arm" }
156158
157159 steps :
158160
@@ -161,16 +163,7 @@ jobs:
161163 run : |
162164 if (-not ("${{ matrix.lua-version }}" -match "^[0-9]+\.[0-9]+\.[0-9]+$"))
163165 {
164- Write-Host "Invalid Lua version";
165- exit 1;
166- }
167-
168- - name : Sanity check the architecture
169- shell : pwsh
170- run : |
171- if (-not ("${{ matrix.arch }}" -match "^[xX](64|86)$"))
172- {
173- Write-Host "Invalid architecture";
166+ Write-Host "Invalid Lua version. It must be on format X.Y.Z";
174167 exit 1;
175168 }
176169
@@ -234,7 +227,7 @@ jobs:
234227 - name : Set environment variable to LuaRocks download URL depending on arch
235228 shell : pwsh
236229 run : |
237- $allowed_archs = @{ x86 = "32"; x64 = "64" };
230+ $allowed_archs = @{ x86 = "32"; x64 = "64"; arm64 = "64" };
238231 $arch_lower = "${{ matrix.arch }}".ToLower();
239232
240233 if ($allowed_archs.Keys -contains $arch_lower)
@@ -245,7 +238,7 @@ jobs:
245238 }
246239 else
247240 {
248- Write-Host "Invalid arch: x64 or x86 expected, but got ${{ matrix.arch }}";
241+ Write-Host "Invalid arch: x64, x86 or arm64 expected, but got ${{ matrix.arch }}";
249242 exit 1;
250243 }
251244
0 commit comments