Fix CI and make libcurl a hard-dependency when using libobjc2 (#447)

* Do not enable Win32 threads and locks when using GCC

* Fix compiler check when CC has arguments appended

* Add NSConstantString literal as global variable to avoid linker error

* Make libcurl a hard-dependency on ObjC 2.0 Toolchain

* Bump TOOLS_WINDOWS_MSVC_RELEASE_TAG

* Remove x86 runner for MSVC toolchain

* Add libcurl to MinGW x64 Clang toolchain

* MSVC toolchain requires Windows 1903 and newer but windows-2019 runner is Redstone 5 (1809)

* MinGW GCC adds .exe suffix

* Some tests timeout after 30s. Increase timeout

* Mark late unregister as hopeful on Win32 with GCC

* Mark NSURL test depending on network connection as hopeful
This commit is contained in:
Hugo Melder 2024-10-10 11:16:47 +02:00 committed by GitHub
parent 1c5f581a46
commit 273776a3c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 121 additions and 149 deletions

View file

@ -45,6 +45,8 @@ int main()
str = [url scheme];
PASS([str isEqual: @"file"], "Scheme of file URL is file");
// Test depends on network connection
testHopeful = YES;
url = [NSURL URLWithString: @"http://example.com/"];
data = [url resourceDataUsingCache: NO];
PASS(data != nil,
@ -52,19 +54,20 @@ int main()
num = [url propertyForKey: NSHTTPPropertyStatusCodeKey];
PASS([num isKindOfClass: [NSNumber class]] && [num intValue] == 200,
"Status of load is 200 for example.com");
testHopeful = NO;
url = [NSURL URLWithString:@"this isn't a URL"];
PASS(url == nil, "URL with 'this isn't a URL' returns nil");
// Test depends on network connection
testHopeful = YES;
url = [NSURL URLWithString: @"https://httpbin.org/silly-file-name"];
data = [url resourceDataUsingCache: NO];
num = [url propertyForKey: NSHTTPPropertyStatusCodeKey];
#if defined(_WIN64) && defined(_MSC_VER)
testHopeful = YES;
#endif
PASS_EQUAL(num, [NSNumber numberWithInt: 404],
"Status of load is 404 for httpbin.org/silly-file-name");
testHopeful = NO;
#if defined(_WIN64) && defined(_MSC_VER)
testHopeful = YES;
#endif