diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8757522..8bbdd9c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -123,7 +123,6 @@ jobs: target: ${{ matrix.target }} override: true - name: Run ${{ matrix.lua }} tests - if: ${{ matrix.os != 'macos-latest' || matrix.lua != 'luajit' }} run: | cargo test --release --features "${{ matrix.lua }} vendored" cargo test --release --features "${{ matrix.lua }} vendored async send serialize" @@ -135,27 +134,6 @@ jobs: TRYBUILD=overwrite cargo test --release --features "${{ matrix.lua }} vendored async send serialize" -- --ignored shell: bash - test_luajit_macos: - name: Test LuaJIT on macOS - runs-on: macos-latest - needs: build - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: nightly - target: x86_64-apple-darwin - override: true - - name: Run LuaJIT 2.0.5 tests - run: | - brew install luajit - cargo test --tests --release --features "luajit async send serialize" -- --test-threads=1 - shell: bash - - name: Run LuaJIT vendored tests - run: | - cargo test --release --features "luajit vendored async send serialize" - shell: bash - test_modules: name: Test modules runs-on: ${{ matrix.os }} diff --git a/benches/benchmark.rs b/benches/benchmark.rs index 7f59ce2..3056662 100644 --- a/benches/benchmark.rs +++ b/benches/benchmark.rs @@ -1,15 +1,3 @@ -#![cfg_attr( - all(feature = "luajit", target_os = "macos", target_arch = "x86_64"), - feature(link_args) -)] - -#[cfg_attr( - all(feature = "luajit", target_os = "macos", target_arch = "x86_64"), - link_args = "-pagezero_size 10000 -image_base 100000000", - allow(unused_attributes) -)] -extern "system" {} - use criterion::{criterion_group, criterion_main, BatchSize, Criterion}; use std::time::Duration; use tokio::runtime::Runtime; diff --git a/tests/async.rs b/tests/async.rs index 7d87b49..aa9a5b7 100644 --- a/tests/async.rs +++ b/tests/async.rs @@ -1,15 +1,4 @@ #![cfg(feature = "async")] -#![cfg_attr( - all(feature = "luajit", target_os = "macos", target_arch = "x86_64"), - feature(link_args) -)] - -#[cfg_attr( - all(feature = "luajit", target_os = "macos", target_arch = "x86_64"), - link_args = "-pagezero_size 10000 -image_base 100000000", - allow(unused_attributes) -)] -extern "system" {} use std::cell::Cell; use std::rc::Rc; diff --git a/tests/byte_string.rs b/tests/byte_string.rs index 22752c8..3b05ee5 100644 --- a/tests/byte_string.rs +++ b/tests/byte_string.rs @@ -1,15 +1,3 @@ -#![cfg_attr( - all(feature = "luajit", target_os = "macos", target_arch = "x86_64"), - feature(link_args) -)] - -#[cfg_attr( - all(feature = "luajit", target_os = "macos", target_arch = "x86_64"), - link_args = "-pagezero_size 10000 -image_base 100000000", - allow(unused_attributes) -)] -extern "system" {} - use bstr::{BStr, BString}; use mlua::{Lua, Result}; diff --git a/tests/function.rs b/tests/function.rs index f7ce7c0..dd34ae6 100644 --- a/tests/function.rs +++ b/tests/function.rs @@ -1,15 +1,3 @@ -#![cfg_attr( - all(feature = "luajit", target_os = "macos", target_arch = "x86_64"), - feature(link_args) -)] - -#[cfg_attr( - all(feature = "luajit", target_os = "macos", target_arch = "x86_64"), - link_args = "-pagezero_size 10000 -image_base 100000000", - allow(unused_attributes) -)] -extern "system" {} - use mlua::{Function, Lua, Result, String}; #[test] diff --git a/tests/hooks.rs b/tests/hooks.rs index a1dd3d6..6c4a3e4 100644 --- a/tests/hooks.rs +++ b/tests/hooks.rs @@ -1,15 +1,3 @@ -#![cfg_attr( - all(feature = "luajit", target_os = "macos", target_arch = "x86_64"), - feature(link_args) -)] - -#[cfg_attr( - all(feature = "luajit", target_os = "macos", target_arch = "x86_64"), - link_args = "-pagezero_size 10000 -image_base 100000000", - allow(unused_attributes) -)] -extern "system" {} - use std::cell::RefCell; use std::ops::Deref; use std::str; diff --git a/tests/memory.rs b/tests/memory.rs index b51ca3d..aa0a809 100644 --- a/tests/memory.rs +++ b/tests/memory.rs @@ -1,15 +1,3 @@ -#![cfg_attr( - all(feature = "luajit", target_os = "macos", target_arch = "x86_64"), - feature(link_args) -)] - -#[cfg_attr( - all(feature = "luajit", target_os = "macos", target_arch = "x86_64"), - link_args = "-pagezero_size 10000 -image_base 100000000", - allow(unused_attributes) -)] -extern "system" {} - use std::sync::Arc; use mlua::{Lua, Result, UserData}; diff --git a/tests/scope.rs b/tests/scope.rs index 9a9c44b..fe7e4f4 100644 --- a/tests/scope.rs +++ b/tests/scope.rs @@ -1,15 +1,3 @@ -#![cfg_attr( - all(feature = "luajit", target_os = "macos", target_arch = "x86_64"), - feature(link_args) -)] - -#[cfg_attr( - all(feature = "luajit", target_os = "macos", target_arch = "x86_64"), - link_args = "-pagezero_size 10000 -image_base 100000000", - allow(unused_attributes) -)] -extern "system" {} - use std::cell::Cell; use std::rc::Rc; diff --git a/tests/serde.rs b/tests/serde.rs index 50e0fd2..6cbccf7 100644 --- a/tests/serde.rs +++ b/tests/serde.rs @@ -1,15 +1,4 @@ #![cfg(feature = "serialize")] -#![cfg_attr( - all(feature = "luajit", target_os = "macos", target_arch = "x86_64"), - feature(link_args) -)] - -#[cfg_attr( - all(feature = "luajit", target_os = "macos", target_arch = "x86_64"), - link_args = "-pagezero_size 10000 -image_base 100000000", - allow(unused_attributes) -)] -extern "system" {} use mlua::{Error, Lua, LuaSerdeExt, Result as LuaResult, UserData, Value}; use serde::{Deserialize, Serialize}; diff --git a/tests/string.rs b/tests/string.rs index f7e551e..abe8aaa 100644 --- a/tests/string.rs +++ b/tests/string.rs @@ -1,15 +1,3 @@ -#![cfg_attr( - all(feature = "luajit", target_os = "macos", target_arch = "x86_64"), - feature(link_args) -)] - -#[cfg_attr( - all(feature = "luajit", target_os = "macos", target_arch = "x86_64"), - link_args = "-pagezero_size 10000 -image_base 100000000", - allow(unused_attributes) -)] -extern "system" {} - use std::borrow::Cow; use mlua::{Lua, Result, String}; diff --git a/tests/table.rs b/tests/table.rs index 2417619..6378e5c 100644 --- a/tests/table.rs +++ b/tests/table.rs @@ -1,15 +1,3 @@ -#![cfg_attr( - all(feature = "luajit", target_os = "macos", target_arch = "x86_64"), - feature(link_args) -)] - -#[cfg_attr( - all(feature = "luajit", target_os = "macos", target_arch = "x86_64"), - link_args = "-pagezero_size 10000 -image_base 100000000", - allow(unused_attributes) -)] -extern "system" {} - use mlua::{Lua, Nil, Result, Table, TableExt, Value}; #[test] diff --git a/tests/tests.rs b/tests/tests.rs index 4f07843..dc16c15 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -1,15 +1,3 @@ -#![cfg_attr( - all(feature = "luajit", target_os = "macos", target_arch = "x86_64"), - feature(link_args) -)] - -#[cfg_attr( - all(feature = "luajit", target_os = "macos", target_arch = "x86_64"), - link_args = "-pagezero_size 10000 -image_base 100000000", - allow(unused_attributes) -)] -extern "system" {} - use std::iter::FromIterator; use std::panic::{catch_unwind, AssertUnwindSafe}; use std::sync::Arc; diff --git a/tests/thread.rs b/tests/thread.rs index 1094052..fd2f20c 100644 --- a/tests/thread.rs +++ b/tests/thread.rs @@ -1,15 +1,3 @@ -#![cfg_attr( - all(feature = "luajit", target_os = "macos", target_arch = "x86_64"), - feature(link_args) -)] - -#[cfg_attr( - all(feature = "luajit", target_os = "macos", target_arch = "x86_64"), - link_args = "-pagezero_size 10000 -image_base 100000000", - allow(unused_attributes) -)] -extern "system" {} - use std::panic::catch_unwind; use mlua::{Error, Function, Lua, Result, Thread, ThreadStatus}; diff --git a/tests/types.rs b/tests/types.rs index bbec13d..72f9484 100644 --- a/tests/types.rs +++ b/tests/types.rs @@ -1,15 +1,3 @@ -#![cfg_attr( - all(feature = "luajit", target_os = "macos", target_arch = "x86_64"), - feature(link_args) -)] - -#[cfg_attr( - all(feature = "luajit", target_os = "macos", target_arch = "x86_64"), - link_args = "-pagezero_size 10000 -image_base 100000000", - allow(unused_attributes) -)] -extern "system" {} - use std::os::raw::c_void; use mlua::{Function, LightUserData, Lua, Result}; diff --git a/tests/userdata.rs b/tests/userdata.rs index 6146aed..08159c5 100644 --- a/tests/userdata.rs +++ b/tests/userdata.rs @@ -1,15 +1,3 @@ -#![cfg_attr( - all(feature = "luajit", target_os = "macos", target_arch = "x86_64"), - feature(link_args) -)] - -#[cfg_attr( - all(feature = "luajit", target_os = "macos", target_arch = "x86_64"), - link_args = "-pagezero_size 10000 -image_base 100000000", - allow(unused_attributes) -)] -extern "system" {} - use std::sync::Arc; #[cfg(feature = "lua54")] diff --git a/tests/value.rs b/tests/value.rs index 7b59a51..9beb68c 100644 --- a/tests/value.rs +++ b/tests/value.rs @@ -1,15 +1,3 @@ -#![cfg_attr( - all(feature = "luajit", target_os = "macos", target_arch = "x86_64"), - feature(link_args) -)] - -#[cfg_attr( - all(feature = "luajit", target_os = "macos", target_arch = "x86_64"), - link_args = "-pagezero_size 10000 -image_base 100000000", - allow(unused_attributes) -)] -extern "system" {} - use mlua::{Lua, Result, Value}; #[test]