Comments (6)
If I understand correctly, I think you could handle this by selecting tool-C
differently based on the architecture:
if CONFIG.OS == 'darwin':
filegroup(
name = "tool-C",
srcs = ["tool-C-bin"],
)
else:
go_binary( # or whatever
name = "tool-C",
....
)
from please.
This does mean that tool-C-bin
has to be put inside the tool-C
folder as a file output. And it can not be consumed by transferring the plz-out/gen/tool-C
folder to Phase B. Correct?
from please.
If it would be possible to use the cached results on the MacOS machine in Phase B that would be even better in our setup. But when I try to run tool-D on MacOS with the build using tool-C dependencies it would have different hash key because of different build config like the OS variable. So it become unusable.
I would rather keep it as one chain. Because actually we have Phase C too where results are combined again with dependencies from Phase A and B.
from please.
I'm a little confused so forgive me if I've misunderstood. If you need to build a tool on linux and then use it on a macos box, then if you're using something like github actions you could do the following:
Set up a config option for the tool. This can be done in your .plzconfig like so:
[buildconfig]
my-tool = //tools:linux_tool
and then use this in your build rules like so:
genrule(
...,
tools = [CONFIG.MY_TOOL],
)
Then you can:
- build the tool on linux
- save this as an artefact to your ci build e.g. to
/tmp/workspace/my-tool
- set a
.plzconfig.macos_ci
(or use-o buildenv.mytool:/tmp/workspace/my-tool
) that configures the tool path - do your macos build
.plzconfig.macos_ci
might look like:
[buildconfig]
my-tool = /tmp/workspace/my-tool
from please.
That is a great way indeed. I had not thought of that. Currently I use rules that uses the link
label to output it to the folder of the package. Something like this will be found in tool-A and tool-B on the build rule.
labels = ["link:" + package_name() ]
Then I use an additional rule in tool-A and tool-B that uses that output path as a source.
And tool-C can use those rules as its source on the other machine.
But one thing that I was not able to do is to use the data that is already in cache. I need to copy it over in the workspace either way.
from please.
Related Issues (20)
- visibility changes the cache hash HOT 1
- Get parser to provide line number and source file etc. with errors like "Non-iterable type %s; must be a list" HOT 2
- github_repo will fail confusingly if the given revision downloads a file with a different prefix. HOT 3
- Dependency paths on targets that generate subrepos aren't surfaced
- Subrepositories and plugin settings inherited from root HOT 3
- sh_cmd does not inject provenance into generated shell script HOT 4
- `isinstance` doesn't know about the `range` type
- UX optimization: reversed patch == hung fetch... HOT 5
- lsp_test fails ocassionally on AlpineLinux CI HOT 1
- How do I update the ./pleasew? HOT 1
- Re-enable //test/proto_plugin:proto_rules_test
- Bug in codelab - wrong port
- Crash on tab completion
- Target not found from subrepo
- Support instantiation_stack when querying HOT 1
- Panic / segfault when using query command with --arch option that doesn't match the platform
- Tools not found with --shell & remote execution
- .plzconfig key with empty value HOT 4
- review Go analysis.Pass.Module proposal HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from please.