ordo-one / package-benchmark

Swift benchmark runner with many performance metrics and great CI support
Apache License 2.0
326 stars 25 forks source link

sandboxing #152

Closed JaapWijnen closed 1 year ago

JaapWijnen commented 1 year ago

Is there some kind of sandboxing going on within the plugin? I'm running into the following error at the moment in one of my benchmarks.

stdout:
stderr:
<unknown>:0: error: unable to open output file '/var/folders/_w/tgplyjrn1pd5zg417w8_jrgr0000gn/C/clang/ModuleCache/2LO8DN2T79G1C/CoolProp-1S840FRS8BXI3.pcm': 'Operation not permitted'

If I run the exact same test without the benchmark api around it it all runs fine

hassila commented 1 year ago

Yeah, we’re sandboxed by swiftpm - for network/disk access you need to either allow writing to certain directories or disable the sandbox, some hints: https://swiftpackageindex.com/ordo-one/package-benchmark/1.4.8/documentation/benchmark/runningbenchmarks

hassila commented 1 year ago

So either specify --allow-writing-to-package-directory or —disable-sandbox

JaapWijnen commented 1 year ago

Yeah using --disable-sandbox worked thanks a lot! Life saver