mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-19 14:52:40 +08:00
CI: downgrade macos & xcode version for iOS (#12716)
This commit is contained in:
@@ -290,11 +290,11 @@ jobs:
|
||||
name: "iOS"
|
||||
if:
|
||||
(! contains(github.event.pull_request.body, '[X] does not change any runtime related code or build configuration'))
|
||||
runs-on: macos-latest
|
||||
runs-on: macos-11
|
||||
steps:
|
||||
- uses: maxim-lobanov/setup-xcode@v1
|
||||
with:
|
||||
xcode-version: latest-stable
|
||||
xcode-version: 12.4
|
||||
- uses: actions/checkout@v2
|
||||
- name: Download external libraries
|
||||
shell: bash
|
||||
@@ -323,7 +323,7 @@ jobs:
|
||||
echo "set(CC_USE_VULKAN OFF)" >> build-ios/proj/cfg.cmake
|
||||
echo "set(CC_USE_GLES2 OFF)" >> build-ios/proj/cfg.cmake
|
||||
echo "set(CC_USE_METAL ON)" >> build-ios/proj/cfg.cmake
|
||||
echo "set(TARGET_IOS_VERSION 12.0)" >> build-ios/proj/cfg.cmake
|
||||
echo "set(TARGET_IOS_VERSION 11.0)" >> build-ios/proj/cfg.cmake
|
||||
echo "set(USE_WEBSOCKET_SERVER OFF)" >> build-ios/proj/cfg.cmake
|
||||
echo "set(USE_DRAGONBONES OFF)" >> build-ios/proj/cfg.cmake
|
||||
echo "set(CMAKE_CXX_STANDARD_REQUIRED OFF)" >> build-ios/proj/cfg.cmake
|
||||
|
||||
+10
-3
@@ -28,6 +28,13 @@ System Requirements
|
||||
|
||||
C++ related
|
||||
--------------------------------
|
||||
- use C++17, but can only use these C++17 features
|
||||
- std::string_view
|
||||
- [constexpr if](https://www.codingame.com/playgrounds/2205/7-features-of-c17-that-will-simplify-your-code/constexpr-if)
|
||||
Use C++17.
|
||||
|
||||
These C++17 features are tested and supported by all platforms
|
||||
- `std::string_view`
|
||||
- [`constexpr if`](https://www.codingame.com/playgrounds/2205/7-features-of-c17-that-will-simplify-your-code/constexpr-if)
|
||||
|
||||
The following features are not supported
|
||||
- `std::optional` is not supported by iOS 11.
|
||||
|
||||
Other C++17 features are not tested.
|
||||
@@ -51,7 +51,8 @@ void genericConstructor(const v8::FunctionCallbackInfo<v8::Value> &v8args) {
|
||||
using context_type = typename class_<T>::Context;
|
||||
v8::Isolate *isolate = v8args.GetIsolate();
|
||||
v8::HandleScope handleScope(isolate);
|
||||
std::optional<bool> ret;
|
||||
int ctorInvokeTimes{0};
|
||||
bool constructed{false};
|
||||
bool needDeleteValueArray{false};
|
||||
se::ValueArray &args = se::gValueArrayPool.get(v8args.Length(), needDeleteValueArray);
|
||||
se::CallbackDepthGuard depthGuard{args, se::gValueArrayPool._depth, needDeleteValueArray};
|
||||
@@ -67,18 +68,23 @@ void genericConstructor(const v8::FunctionCallbackInfo<v8::Value> &v8args) {
|
||||
assert(!self->constructors.empty());
|
||||
for (auto &ctor : self->constructors) {
|
||||
if (ctor->argCount == -1 || ctor->argCount == args.size()) {
|
||||
ret = ctor->construct(state);
|
||||
if (ret) break;
|
||||
ctorInvokeTimes++;
|
||||
constructed = ctor->construct(state);
|
||||
if (constructed) break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!ret.has_value()) {
|
||||
if (ctorInvokeTimes == 0) {
|
||||
SE_LOGE("[ERROR] Failed match constructor for class %s, %d args, location: %s:%d\n", self->className.c_str(),
|
||||
static_cast<int>(args.size()), __FILE__, __LINE__);
|
||||
} else if (!ret.value()) {
|
||||
}
|
||||
|
||||
if (!constructed) {
|
||||
SE_LOGE("[ERROR] Failed to invoke %s, location: %s:%d\n", "constructor", __FILE__, __LINE__);
|
||||
}
|
||||
assert(ret); // construction failure is not allowed.
|
||||
|
||||
assert(constructed); // construction failure is not allowed.
|
||||
|
||||
if (!self->finalizeCallbacks.empty()) {
|
||||
state.thisObject()->getPrivateObject()->finalizerData = self;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user