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

Updating trunk.yml for Testing framework #149

Closed
wants to merge 5 commits into from

Conversation

morganzellers
Copy link
Contributor

@morganzellers morganzellers commented Oct 25, 2021

Linked Issue: Closes #110

Checklist:

@codecov-commenter
Copy link

codecov-commenter commented Oct 25, 2021

Codecov Report

Merging #149 (82feac3) into main (63dc1af) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #149   +/-   ##
=======================================
  Coverage   91.28%   91.28%           
=======================================
  Files          92       92           
  Lines        2375     2375           
=======================================
  Hits         2168     2168           
  Misses        207      207           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 500f72f...82feac3. Read the comment docs.

@Richard-Gist Richard-Gist added the enhancement New feature or request label Oct 25, 2021
@morganzellers
Copy link
Contributor Author

morganzellers commented Oct 26, 2021

EOD - Since I forgot it yesterday:

Testing this locally, I'm getting this error:

/Users/zellersm/workspace/SwiftCurrent/Sources/SwiftCurrent_Testing/CustomAssertions.swift:16:18: module SwiftCurrent was not compiled for testing
@testable import SwiftCurrent
~~~~~~~~~~  

** ARCHIVE FAILED **


The following build commands failed:
	CompileSwift normal arm64 (in target 'SwiftCurrent_Testing' from project 'SwiftCurrent')
	CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'SwiftCurrent_Testing' from project 'SwiftCurrent')
(2 failures)

When running this xcodebuild command:

xcodebuild archive -workspace . -scheme SwiftCurrent_Testing -destination generic/platform=iOS -archivePath Release-iphoneos -derivedDataPath .build SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES

I'm guessing since SwiftCurrent is a dependency of SwiftCurrent_Testing, that I need to build SwiftCurrent for testing before building the SwiftCurrent_Testing framework

@morganzellers morganzellers marked this pull request as ready for review November 1, 2021 17:28
@morganzellers morganzellers requested a review from a team as a code owner November 1, 2021 17:28
@Tyler-Keith-Thompson
Copy link
Collaborator

We should verify that this builds such that @testable actually works.

@Tyler-Keith-Thompson
Copy link
Collaborator

Isn't the last thing to do on this just a quick verification that @testable works?

@morganzellers
Copy link
Contributor Author

morganzellers commented Jan 25, 2022

Isn't the last thing to do on this just a quick verification that @testable works?

No, if I remember correctly, the build command in build-frameworks.sh will need to be different for the testing package. I believe the last thing I was doing was trying to find the right build call and encountering the error above

So it looks like the script doesn't need any updates, the SwiftCurrent target just needed "Enable Testing" set on it. I've pushed a commit that does this but given we're only doing this for our pipeline to be able to create the archive, I feel like we may want to change the Package.swift file in a more temporary way.

@morganzellers morganzellers marked this pull request as draft January 25, 2022 20:37
@morganzellers
Copy link
Contributor Author

So this has moved forward some, but not all the way. The build-xcframework.sh script is still failing, I believe now, due to the wrong path being used to copy the modules or frameworks.

@nickkaczmarek
Copy link
Contributor

This will not work as expected. The reason is we're using xcodebuild not swift build for creating the xcframework.

I've tried to look it up and was sorely disappointed: developer.apple.com/forums/thread/125921

This also seems related, but similarly doesn't seem to provide the answer we want. It has some responses from DTS, but our use case might not be supported.

@morganzellers
Copy link
Contributor Author

morganzellers commented Mar 11, 2022

It sounds like this is not something we will be following through on due to the xcodebuild / swift build differences. I plan to close this PR and the associated issue #110.

@Tyler-Keith-Thompson Tyler-Keith-Thompson deleted the sctesting-framework branch March 18, 2022 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

XCFramework for SwiftCurrent_Testing
5 participants