77 runs-on : ${{ matrix.os }}
88 strategy :
99 matrix :
10- os : [ubuntu-22.04 , macos-latest, windows-latest]
10+ os : [ubuntu-latest , macos-latest, windows-latest]
1111 rust : [stable]
1212 lua : [lua54, lua53, lua52, lua51, luajit, luau, luau-jit, luau-vector4]
1313 include :
14- - os : ubuntu-22.04
14+ - os : ubuntu-latest
1515 target : x86_64-unknown-linux-gnu
1616 - os : macos-latest
1717 target : x86_64-apple-darwin
1818 - os : windows-latest
1919 target : x86_64-pc-windows-msvc
2020 steps :
21- - uses : actions/checkout@v4
21+ - uses : actions/checkout@main
2222 - uses : dtolnay/rust-toolchain@stable
2323 with :
2424 toolchain : ${{ matrix.rust }}
3131 cargo build --features "${{ matrix.lua }},vendored,async,serialize,macros,send"
3232 shell : bash
3333 - name : Build ${{ matrix.lua }} pkg-config
34- if : ${{ matrix.os == 'ubuntu-22.04 ' }}
34+ if : ${{ matrix.os == 'ubuntu-latest ' }}
3535 run : |
3636 sudo apt-get update
3737 sudo apt-get install -y --no-install-recommends liblua5.4-dev liblua5.3-dev liblua5.2-dev liblua5.1-0-dev libluajit-5.1-dev
4545 matrix :
4646 lua : [lua54, lua53, lua52, lua51, luajit]
4747 steps :
48- - uses : actions/checkout@v4
48+ - uses : actions/checkout@main
4949 - uses : dtolnay/rust-toolchain@stable
5050 with :
5151 toolchain : stable
@@ -55,13 +55,13 @@ jobs:
5555
5656 build_aarch64_cross_ubuntu :
5757 name : Cross-compile to aarch64-unknown-linux-gnu
58- runs-on : ubuntu-22.04
58+ runs-on : ubuntu-latest
5959 needs : build
6060 strategy :
6161 matrix :
6262 lua : [lua54, lua53, lua52, lua51, luajit]
6363 steps :
64- - uses : actions/checkout@v4
64+ - uses : actions/checkout@main
6565 - uses : dtolnay/rust-toolchain@stable
6666 with :
6767 toolchain : stable
@@ -77,13 +77,13 @@ jobs:
7777
7878 build_armv7_cross_ubuntu :
7979 name : Cross-compile to armv7-unknown-linux-gnueabihf
80- runs-on : ubuntu-22.04
80+ runs-on : ubuntu-latest
8181 needs : build
8282 strategy :
8383 matrix :
8484 lua : [lua54, lua53, lua52, lua51]
8585 steps :
86- - uses : actions/checkout@v4
86+ - uses : actions/checkout@main
8787 - uses : dtolnay/rust-toolchain@stable
8888 with :
8989 toolchain : stable
@@ -103,18 +103,18 @@ jobs:
103103 needs : build
104104 strategy :
105105 matrix :
106- os : [ubuntu-22.04 , macos-latest, windows-latest]
106+ os : [ubuntu-latest , macos-latest, windows-latest]
107107 rust : [stable, nightly]
108108 lua : [lua54, lua53, lua52, lua51, luajit, luajit52, luau, luau-jit, luau-vector4]
109109 include :
110- - os : ubuntu-22.04
110+ - os : ubuntu-latest
111111 target : x86_64-unknown-linux-gnu
112112 - os : macos-latest
113113 target : x86_64-apple-darwin
114114 - os : windows-latest
115115 target : x86_64-pc-windows-msvc
116116 steps :
117- - uses : actions/checkout@v4
117+ - uses : actions/checkout@main
118118 - uses : dtolnay/rust-toolchain@stable
119119 with :
120120 toolchain : ${{ matrix.rust }}
@@ -139,14 +139,14 @@ jobs:
139139 needs : build
140140 strategy :
141141 matrix :
142- os : [ubuntu-22.04 ]
142+ os : [ubuntu-latest ]
143143 rust : [nightly]
144144 lua : [lua54, lua53, lua52, lua51, luajit, luau, luau-jit, luau-vector4]
145145 include :
146- - os : ubuntu-22.04
146+ - os : ubuntu-latest
147147 target : x86_64-unknown-linux-gnu
148148 steps :
149- - uses : actions/checkout@v4
149+ - uses : actions/checkout@main
150150 - uses : dtolnay/rust-toolchain@stable
151151 with :
152152 toolchain : ${{ matrix.rust }}
@@ -160,22 +160,48 @@ jobs:
160160 env :
161161 RUSTFLAGS : -Z sanitizer=address
162162
163+ test_with_memory_limit :
164+ name : Test with memory limit
165+ runs-on : ${{ matrix.os }}
166+ needs : build
167+ strategy :
168+ matrix :
169+ os : [ubuntu-latest]
170+ rust : [nightly]
171+ lua : [lua54, lua53, lua52, lua51, luajit, luau, luau-jit, luau-vector4]
172+ include :
173+ - os : ubuntu-latest
174+ target : x86_64-unknown-linux-gnu
175+ steps :
176+ - uses : actions/checkout@main
177+ - uses : dtolnay/rust-toolchain@stable
178+ with :
179+ toolchain : ${{ matrix.rust }}
180+ target : ${{ matrix.target }}
181+ - uses : Swatinem/rust-cache@v2
182+ - name : Run ${{ matrix.lua }} tests with forced memory limit
183+ run : |
184+ cargo test --tests --features "${{ matrix.lua }},vendored,async,send,serialize,macros"
185+ shell : bash
186+ env :
187+ RUSTFLAGS : --cfg=force_memory_limit
188+
163189 test_modules :
164190 name : Test modules
165191 runs-on : ${{ matrix.os }}
166192 needs : build
167193 strategy :
168194 matrix :
169- os : [ubuntu-22.04 , macos-latest]
195+ os : [ubuntu-latest , macos-latest]
170196 rust : [stable]
171197 lua : [lua54, lua53, lua52, lua51, luajit, luau]
172198 include :
173- - os : ubuntu-22.04
199+ - os : ubuntu-latest
174200 target : x86_64-unknown-linux-gnu
175201 - os : macos-latest
176202 target : x86_64-apple-darwin
177203 steps :
178- - uses : actions/checkout@v4
204+ - uses : actions/checkout@main
179205 - uses : dtolnay/rust-toolchain@stable
180206 with :
181207 toolchain : ${{ matrix.rust }}
@@ -199,7 +225,7 @@ jobs:
199225 shell : msys2 {0}
200226 steps :
201227 - uses : msys2/setup-msys2@v2
202- - uses : actions/checkout@v4
228+ - uses : actions/checkout@main
203229 - name : Install Rust & Lua
204230 run : |
205231 pacman -S --noconfirm mingw-w64-x86_64-rust mingw-w64-x86_64-lua mingw-w64-x86_64-luajit mingw-w64-x86_64-pkg-config
@@ -210,13 +236,13 @@ jobs:
210236
211237 test_wasm32_emscripten :
212238 name : Test on wasm32-unknown-emscripten
213- runs-on : ubuntu-22.04
239+ runs-on : ubuntu-latest
214240 needs : build
215241 strategy :
216242 matrix :
217243 lua : [lua54, lua53, lua52, lua51, luau]
218244 steps :
219- - uses : actions/checkout@v4
245+ - uses : actions/checkout@main
220246 - uses : dtolnay/rust-toolchain@stable
221247 with :
222248 toolchain : stable
@@ -232,22 +258,22 @@ jobs:
232258
233259 rustfmt :
234260 name : Rustfmt
235- runs-on : ubuntu-22.04
261+ runs-on : ubuntu-latest
236262 steps :
237- - uses : actions/checkout@v4
263+ - uses : actions/checkout@main
238264 - uses : dtolnay/rust-toolchain@nightly
239265 with :
240266 components : rustfmt
241267 - run : cargo fmt -- --check
242268
243269 clippy :
244270 name : Clippy
245- runs-on : ubuntu-22.04
271+ runs-on : ubuntu-latest
246272 strategy :
247273 matrix :
248274 lua : [lua54, lua53, lua52, lua51, luajit, luau, luau-jit, luau-vector4]
249275 steps :
250- - uses : actions/checkout@v4
276+ - uses : actions/checkout@main
251277 - uses : dtolnay/rust-toolchain@stable
252278 with :
253279 toolchain : nightly
0 commit comments