Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Xcode 12 and Swift 5.3 #168

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 40 additions & 3 deletions .github/workflows/build-framework-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,51 @@ jobs:
- name: Test All Thunks
run: make clean-test

build-xcode-11_3_1:
name: Xcode 11.3.1 toolchain
build-xcode-12:
name: Xcode 12 toolchain
runs-on: macOS-latest

steps:
- uses: actions/checkout@v2
- name: Set Up Environment
run: sudo xcode-select -s /Applications/Xcode_11.3.1.app/Contents/Developer
run: sudo xcode-select -s /Applications/Xcode_12.app/Contents/Developer
- name: Print Debug Info
run: make print-debug-info
- name: Set Up Project
run: make setup-project
- name: Clean
run: make clean
- name: Build Framework
run: make build-framework
- name: Build and Install CLI
run: |
make print-debug-info | grep "Mockingbird rpath: /var/tmp/mockingbird/$(make get-version)/libs"
PREFIX=$(pwd) USE_RELATIVE_RPATH=1 make print-debug-info
PREFIX=$(pwd) USE_RELATIVE_RPATH=1 make install
- name: Set Up Target
run: |
./bin/mockingbird install \
--target MockingbirdTests \
--source MockingbirdTestsHost \
--support Sources/MockingbirdSupport \
--output Tests/MockingbirdTests/Mocks/MockingbirdTestsHostMocks.generated.swift \
--header '// Header line 1' '// Header line 2' \
--diagnostics all \
--loglevel verbose \
--verbose
- name: Test
run: make clean-test
- name: Cached Test
run: make test

build-xcode-11_7:
name: Xcode 11.7 toolchain
runs-on: macOS-latest

steps:
- uses: actions/checkout@v2
- name: Set Up Environment
run: sudo xcode-select -s /Applications/Xcode_11.7.app/Contents/Developer
- name: Print Debug Info
run: make print-debug-info
- name: Set Up Project
Expand Down
4 changes: 0 additions & 4 deletions .xcode/GeneratedModuleMap/_CSwiftSyntax/module.modulemap

This file was deleted.

4 changes: 0 additions & 4 deletions .xcode/GeneratedModuleMap/llbuildBasic/module.modulemap

This file was deleted.

4 changes: 0 additions & 4 deletions .xcode/GeneratedModuleMap/llbuildBuildSystem/module.modulemap

This file was deleted.

4 changes: 0 additions & 4 deletions .xcode/GeneratedModuleMap/llbuildCore/module.modulemap

This file was deleted.

4 changes: 0 additions & 4 deletions .xcode/GeneratedModuleMap/llvmSupport/module.modulemap

This file was deleted.

61 changes: 31 additions & 30 deletions .xcode/xcschemes/MockingbirdCli.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,15 @@
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "--targets MockingbirdTestsHost"
argument = "--target MockingbirdTests"
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "--destination MockingbirdTests"
argument = "--sources MockingbirdTestsHost"
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "--outputs ./MockingbirdTests/Mocks.generated.swift"
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "--asynchronous"
argument = "--outputs ./Tests/MockingbirdTests/Mocks/MockingbirdTestsHostMocks.generated.swift"
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
Expand All @@ -99,43 +95,35 @@
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "--targets MockingbirdTestsHost"
argument = "--target MockingbirdTestsHost"
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "generate"
isEnabled = "YES">
</CommandLineArgument>
<CommandLineArgument
argument = "--project /Users/andrew/api-ios/ios/Bird.xcodeproj"
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "--target BirdInterface"
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "--output /Users/andrew/api-ios/ios/Modules/BirdFoundation/BirdFoundationTestHelpers/Mocks.generated.swift"
isEnabled = "NO">
argument = "--project ./Mockingbird.xcodeproj"
isEnabled = "YES">
</CommandLineArgument>
<CommandLineArgument
argument = "--output /tmp/Mocks.generated.swift"
isEnabled = "NO">
argument = "--target MockingbirdTestsHost"
isEnabled = "YES">
</CommandLineArgument>
<CommandLineArgument
argument = "--project ./Mockingbird.xcodeproj"
isEnabled = "NO">
argument = "--output ./Tests/MockingbirdTests/Mocks/MockingbirdTestsHostMocks.generated.swift"
isEnabled = "YES">
</CommandLineArgument>
<CommandLineArgument
argument = "--target MockingbirdTestsHost"
argument = "--support ./Sources/MockingbirdSupport"
isEnabled = "YES">
</CommandLineArgument>
<CommandLineArgument
argument = "--output ./MockingbirdTests/Mocks.generated.swift"
isEnabled = "NO">
argument = "--verbose"
isEnabled = "YES">
</CommandLineArgument>
<CommandLineArgument
argument = "--disable-cache"
argument = "--diagnostics all"
isEnabled = "YES">
</CommandLineArgument>
<CommandLineArgument
Expand All @@ -154,11 +142,24 @@
argument = "version"
isEnabled = "NO">
</CommandLineArgument>
<CommandLineArgument
argument = "--verbose"
isEnabled = "YES">
</CommandLineArgument>
</CommandLineArguments>
<EnvironmentVariables>
<EnvironmentVariable
key = "TARGET_NAME"
value = "WhatsAppTests"
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
key = "SRCROOT"
value = "/Users/typealias/whatsapp-ios"
isEnabled = "YES">
</EnvironmentVariable>
<EnvironmentVariable
key = "PROJECT_FILE_PATH"
value = "/Users/typealias/whatsapp-ios/WhatsApp.xcodeproj"
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
</LaunchAction>
<ProfileAction
buildConfiguration = "Profile"
Expand Down
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ $(eval MOCKINGBIRD_RPATH = $(shell [[ $(USE_RELATIVE_RPATH) -eq 1 ]] && echo '@e

SIMULATOR_NAME=iphone11-mockingbird
SIMULATOR_DEVICE_TYPE=com.apple.CoreSimulator.SimDeviceType.iPhone-11
SIMULATOR_RUNTIME=com.apple.CoreSimulator.SimRuntime.iOS-13-6
SIMULATOR_RUNTIME=$(shell xcrun simctl list runtimes | pcregrep -o1 '(com\.apple\.CoreSimulator\.SimRuntime\.iOS\-.*)')

SWIFT_BUILD_FLAGS=--configuration release -Xlinker -weak-l_InternalSwiftSyntaxParser $(RELATIVE_RPATH_FLAG)
XCODEBUILD_FLAGS=-project 'Mockingbird.xcodeproj' DSTROOT=$(TEMPORARY_FOLDER)
Expand Down Expand Up @@ -129,9 +129,7 @@ clean: clean-mocks clean-xcode clean-swift clean-installables clean-dylibs

.PHONY: setup-project
setup-project:
(cd Sources && swift package resolve)
cp -rf .xcode/xcschemes/*.xcscheme Mockingbird.xcodeproj/xcshareddata/xcschemes
rsync -vhr .xcode/GeneratedModuleMap/** Mockingbird.xcodeproj/GeneratedModuleMap

.PHONY: bootstrap
bootstrap: setup-project
Expand All @@ -157,6 +155,7 @@ print-debug-info:
$(eval XCODEBUILD_VERSION = $(shell xcodebuild -version))
@echo "Xcodebuild version: $(XCODEBUILD_VERSION)"
@echo "Swift build flags: $(SWIFT_BUILD_FLAGS)"
@echo "Simulator runtime: $(SIMULATOR_RUNTIME)"

.PHONY: generate-embedded-dylibs
generate-embedded-dylibs:
Expand Down
25 changes: 0 additions & 25 deletions Mockingbird.xcodeproj/AEXML_Info.plist

This file was deleted.

25 changes: 0 additions & 25 deletions Mockingbird.xcodeproj/Basic_Info.plist

This file was deleted.

25 changes: 0 additions & 25 deletions Mockingbird.xcodeproj/CYaml_Info.plist

This file was deleted.

25 changes: 0 additions & 25 deletions Mockingbird.xcodeproj/Clang_C_Info.plist

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

25 changes: 0 additions & 25 deletions Mockingbird.xcodeproj/POSIX_Info.plist

This file was deleted.

25 changes: 0 additions & 25 deletions Mockingbird.xcodeproj/PathKit_Info.plist

This file was deleted.

Loading