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 CI #2140

Merged
merged 1 commit into from
Apr 4, 2024
Merged

Add CI #2140

merged 1 commit into from
Apr 4, 2024

Conversation

link2xt
Copy link
Contributor

@link2xt link2xt commented Apr 4, 2024

I want to add some CI so there are command-line instructions I can run to test the build of deltachat-ios with core changes.

@link2xt link2xt force-pushed the link2xt/ci branch 2 times, most recently from 59ed487 to ac63d97 Compare April 4, 2024 12:23
@link2xt
Copy link
Contributor Author

link2xt commented Apr 4, 2024

Not sure which one should I select:

 xcodebuild: error: Unable to find a destination matching the provided destination specifier:
		{ platform:iOS Simulator, OS:latest, name:iPhone }

	The requested device could not be found because no available devices matched the request.

	Available destinations for the "deltachat-ios" scheme:
		{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }
		{ platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device }
		{ platform:iOS Simulator, id:9E7B05DB-82FA-492D-99E0-B64E10BAC151, OS:16.2, name:iPad (9th generation) }
		{ platform:iOS Simulator, id:2C739430-9D04-485F-B64D-1997177E5193, OS:16.2, name:iPad (10th generation) }
		{ platform:iOS Simulator, id:E8D5104C-4AFE-478D-8D11-608B30384155, OS:16.2, name:iPad Air (4th generation) }
		{ platform:iOS Simulator, id:7AD1F6CF-D1A4-46E1-8FAC-F9FE190FF555, OS:16.2, name:iPad Air (5th generation) }
		{ platform:iOS Simulator, id:1EB6DC74-394B-4B8E-9183-A9E459ADD3D1, OS:16.2, name:iPad Pro (9.7-inch) }
		{ platform:iOS Simulator, id:259CF812-1767-4D7F-9D95-FE11648B6BA5, OS:16.2, name:iPad Pro (11-inch) (3rd generation) }
		{ platform:iOS Simulator, id:80F41343-1E49-47ED-AAA0-DBF64A9B7329, OS:16.2, name:iPad Pro (11-inch) (4th generation) }
		{ platform:iOS Simulator, id:369E6E19-B10C-45CD-A078-7309F9AF01C7, OS:16.2, name:iPad Pro (12.9-inch) (5th generation) }
		{ platform:iOS Simulator, id:621518FC-7B77-41A8-A747-1D3B0D12641D, OS:16.2, name:iPad Pro (12.9-inch) (6th generation) }
		{ platform:iOS Simulator, id:7C579CFB-8A00-45AB-BA67-834B4E627757, OS:16.2, name:iPad mini (6th generation) }
		{ platform:iOS Simulator, id:FA5F65EE-55E6-4DB6-9C44-D82B91ACE38E, OS:16.2, name:iPhone 8 }
		{ platform:iOS Simulator, id:8CB3BD30-0276-4949-B563-C258E9406DF2, OS:16.2, name:iPhone 8 Plus }
		{ platform:iOS Simulator, id:F71FF0DA-A863-444E-B983-51128F1AEF1D, OS:16.2, name:iPhone 11 }
		{ platform:iOS Simulator, id:9304DEC9-F7BB-4774-80AA-16BF7D793D66, OS:16.2, name:iPhone 11 Pro }
		{ platform:iOS Simulator, id:318A689B-B5FF-4722-83DE-EA53A46A99E5, OS:16.2, name:iPhone 11 Pro Max }
		{ platform:iOS Simulator, id:FFB392B4-EF15-4653-84A4-388BDEED9469, OS:16.2, name:iPhone 12 }
		{ platform:iOS Simulator, id:48BE8D0A-D8AD-43D0-BD55-72A2472687D6, OS:16.2, name:iPhone 12 Pro }
		{ platform:iOS Simulator, id:E094F8CC-965E-4A70-ADA6-826A33313491, OS:16.2, name:iPhone 12 Pro Max }
		{ platform:iOS Simulator, id:B487F437-8091-409B-8F13-8014E280C824, OS:16.2, name:iPhone 12 mini }
		{ platform:iOS Simulator, id:3A3C77D8-59B8-479C-8D31-9C82584EABF1, OS:16.2, name:iPhone 13 }
		{ platform:iOS Simulator, id:42609AC1-9422-479A-B08B-525A498721CB, OS:16.2, name:iPhone 13 Pro }
		{ platform:iOS Simulator, id:D9549C27-47FB-445B-BFE5-4AE9D9DC86FA, OS:16.2, name:iPhone 13 Pro Max }
		{ platform:iOS Simulator, id:3DD3CB76-0F0A-44D0-9F3D-C8ED5A761117, OS:16.2, name:iPhone 13 mini }
		{ platform:iOS Simulator, id:A75434CD-3868-4F75-8D51-076DA56FC5D8, OS:16.2, name:iPhone 14 }
		{ platform:iOS Simulator, id:C01AA8F8-921C-4B89-8C7E-A6F34F31F4EE, OS:16.2, name:iPhone 14 Plus }
		{ platform:iOS Simulator, id:E655391D-EC35-4E26-B314-33551C43BDBD, OS:16.2, name:iPhone 14 Pro }
		{ platform:iOS Simulator, id:38CD828F-A7C1-4DCF-9B74-90BC33A9D4ED, OS:16.2, name:iPhone 14 Pro Max }
		{ platform:iOS Simulator, id:B3865B36-C449-4080-A5A0-F817BA4F0A03, OS:16.2, name:iPhone SE (2nd generation) }
		{ platform:iOS Simulator, id:030D005B-649F-4AFE-8A50-8E1B1DA802F2, OS:16.2, name:iPhone SE (3rd generation) }

delta.chat website says we support "iOS 12, iPhone 5s or iPad 5/Air/Mini 2"

@link2xt
Copy link
Contributor Author

link2xt commented Apr 4, 2024

Fails with /Users/runner/work/deltachat-ios/deltachat-ios/DcNotificationService/NotificationService.swift:2:8: error: no such module 'DcCore'

@zeitschlag
Copy link
Collaborator

zeitschlag commented Apr 4, 2024

Oh, nice! A few remarks/thoughts:

  • You might want to use the .xcworkspace
  • Also somethingsomething git module init (for the Rust-Core-thing)
  • The iOS-version of the simulator doesn't matter as it's the Simulator
  • And all the other steps listed in README.md (How to build with Xcode)

@link2xt
Copy link
Contributor Author

link2xt commented Apr 4, 2024

Seems I didn't see DcCore scheme because of missing -workspace:

deltachat-ios % xcodebuild -list        
Command line invocation:
    /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -list

User defaults from command line:
    IDEPackageSupportUseBuiltinSCM = YES

Information about project "deltachat-ios":
    Targets:
        deltachat-ios
        DcShare
        DcNotificationService

    Build Configurations:
        Debug
        Release

    If no build configuration is specified and -scheme is not passed then "Release" is used.

    Schemes:
        DcNotificationService
        DcShare
        deltachat-ios

@link2xt
Copy link
Contributor Author

link2xt commented Apr 4, 2024

 /Users/runner/work/deltachat-ios/deltachat-ios/deltachat-ios/Controller/QrViewController.swift:112:30: error: reference to property 'dcContext' in closure requires explicit use of 'self' to make capture semantics explicit
            guard let code = dcContext.getSecurejoinQr(chatId: self.chatId) else { return }
                             ^
/Users/runner/work/deltachat-ios/deltachat-ios/deltachat-ios/Controller/QrViewController.swift:110:122: note: weak capture of 'self' here does not enable implicit 'self'
        alert.addAction(UIAlertAction(title: String.localized("withdraw_qr_code"), style: .destructive, handler: { [weak self] _ in
                                                                                                                         ^

@link2xt
Copy link
Contributor Author

link2xt commented Apr 4, 2024

For the record, I can build locally with 1f8cb9c (current main) commit, command xcodebuild -workspace deltachat-ios.xcworkspace -scheme deltachat-ios -destination "platform=iOS Simulator,name=iPhone SE (3rd generation)" and core tag v1.136.6.

@link2xt
Copy link
Contributor Author

link2xt commented Apr 4, 2024

Upgraded swift from 5.7.2 to swift 5.10, maybe it will not generate errors now.

@r10s
Copy link
Member

r10s commented Apr 4, 2024

yip, i also wanted to remark that the compile issues probably come from the swift version, there were changes in that area.

we're using "Swift 5" according to Xcode - it does not tell the minor version, but in general, we have zero warnings, and also do all minor updates

@link2xt link2xt marked this pull request as ready for review April 4, 2024 19:21
Copy link
Member

@r10s r10s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wow! this is the first time i'm seeing this ...

Screenshot 2024-04-04 at 21 25 04

... for deltachat-ios 😊 thanks a lot!

is also core somehow trying to build for ios now? so that we can see possible troubles sooner maybe? just asking, no worries or no request! super-happy with the current change! again, thanks a lot!

@link2xt
Copy link
Contributor Author

link2xt commented Apr 4, 2024

is also core somehow trying to build for ios now?

In the core repo we only build for macos. But with this CI you can open PRs that update core to deltachat-ios repo and see if it works before merging.

@link2xt link2xt merged commit a8fdbfe into main Apr 4, 2024
1 check passed
@link2xt link2xt deleted the link2xt/ci branch April 4, 2024 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants