jpeg icon indicating copy to clipboard operation
jpeg copied to clipboard

Remove executable products and rename executable targets to kebab-case (fixes #21)

Open stackotter opened this issue 1 year ago • 5 comments

This is my solution to #21 as described in the issue.

stackotter avatar Sep 02 '24 05:09 stackotter

Ok hopefully that should be working now, I've updated all of the scripts to operate on targets instead of products now.

Btw these integration-tests are sick! I was prepared for mundane test case output, but no! I need to get onto this for my image formats library 😅.

stackotter avatar Sep 03 '24 00:09 stackotter

haha thanks! unfortunately it looks like utils-test is broken

tayloraswift avatar Sep 03 '24 19:09 tayloraswift

Doesn't look like the macOS issue is due to anything that I've changed (I've had similar things in my workflows in the past), but that Linux issue is definitely due to my changes. Seems like SwiftPM doesn't build executable targets all the way to an executable on linux (it stops once it produces a .o file).

On Linux swift build -c debug --product unit-test does what swift build -c debug --target unit-test does on macOS, even without any explicit unit-test product (probably due to a generated product). So swift build -c debug --target unit-test is the way to go on macOS and swift build -c debug --product unit-test is the way to go on Linux...

I think the best solution would be to update the shell scripts to use swift run instead of splitting each set of tests into a building phase and a running phase. swift run unit-test works as you'd expect on both macOS and Linux (I haven't tested it on Windows). Would you be ok with that as a solution?

stackotter avatar Sep 08 '24 13:09 stackotter

sounds good to me!

tayloraswift avatar Sep 09 '24 05:09 tayloraswift

Hopefully that should work now 🤞

stackotter avatar Sep 09 '24 08:09 stackotter