facebook / idb

idb is a flexible command line interface for automating iOS simulators and devices
https://fbidb.io
MIT License
4.5k stars 432 forks source link

Build companion via github actions workflow #860

Open stoefln opened 7 months ago

stoefln commented 7 months ago

Since I didn't manage to build the project locally, has anyone tried to create a github workflow for this?

flyqie commented 4 months ago

Hello, I'm very sorry to bother you.

I saw in other issues that you have successfully compiled this project. Could you please share your compilation process? Thank you so much!

I keep building failing in macOS 13.6.6 (22G630) + xcode 15.2 (15C500b) + intel cpu, I am using ./idb_build.sh idb_companion build build_output from idb_companion_oss_release.py and it seems to return got an error from grpc -swift:

/Users/dev/idb/build/SourcePackages/checkouts/grpc-swift/Sources/GRPC/GRPCServerPipelineConfigurator.swift:121:7: error: mutation of captured var 'logger' in concurrently-executing code
        logger[metadataKey: MetadataKey.h2StreamID] = "\(streamID)"
        ^
/Users/dev/idb/build/SourcePackages/checkouts/grpc-swift/Sources/GRPC/GRPCServerPipelineConfigurator.swift:125:86: error: reference to captured var 'logger' in concurrently-executing code
          let handler = self.makeHTTP2ToRawGRPCHandler(normalizeHeaders: true, logger: logger)

Any help would be greatly appreciated!

suzukieita commented 4 months ago

I had the same issue, but I could successfully build by

flyqie commented 4 months ago

I had the same issue, but I could successfully build by

Thanks but after adding this I got the following error:

<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "Headers/CompanionLib.h"
        ^
/Users/dev/idb/CompanionLib/CompanionLib.h:8:9: note: in file included from /Users/dev/idb/CompanionLib/CompanionLib.h:8:
#import <CompanionLib/FBIDBCommandExecutor.h>
        ^
/Users/dev/idb/CompanionLib/FBIDBCommandExecutor.h:10:9: error: 'FBControlCore/FBControlCore.h' file not found
#import <FBControlCore/FBControlCore.h>
        ^
<unknown>:0: error: could not build Objective-C module 'CompanionLib'

I'm so sorry, I searched a lot for related solutions but it still seems to be there, which is really frustrating.

Update: Sorry, there are no problems now. The previous problem was caused by me forgetting to install the ios simulator in the new environment.

flyqie commented 4 months ago

Since I didn't manage to build the project locally, has anyone tried to create a github workflow for this?

Not sure if you still need it now.

I have created a github actions workflow that compiles both idb.whl and idb_companion.

https://github.com/flyqie/idb/blob/main/.github/workflows/deploy_packages.yml

stoefln commented 4 months ago

@flyqie can someone enlighten me how to make use of those files? how can I tell my local idb installation to use the updated files?

flyqie commented 4 months ago

@flyqie can someone enlighten me how to make use of those files? how can I tell my local idb installation to use the updated files?

idb finds the location of the idb_companion binary in the following way.

https://github.com/facebook/idb/blob/45666c7476b62f22e1f210e55e1fa31359d8165d/idb/cli/main.py#L120-L123 https://github.com/facebook/idb/blob/45666c7476b62f22e1f210e55e1fa31359d8165d/idb/cli/main.py#L162-L167