-
Notifications
You must be signed in to change notification settings - Fork 64
Add GitHub action to build the examples #61
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
Conversation
This is intended to provide a starting point to continuously build the examples using the latest development snapshot toolchain. As a proof-of-concept, the `pico-blink` example is build.
That's pretty cool! Though I think Apple usually uses their own CI (at least in a few swift repos). But if a CI will be adopted I think we could also add automatic releases of UF2 binaries (though the point of these examples is to build them yourself, so I don't know if that's any helpful). For example, I did this in this repo, though it could be improved with version tags. |
So there are some caveats, 1) I need to get them enabled on this repo (should be easy, I hope). 2) we can't use macOS runners yet |
|
We will squash on merge so feel free to take whichever approach you prefer in the PR. |
Using Linux runners is more complicated than anticipated. I managed to use Linux to build the
My impression is, building for Linux has hardly been tested, if at all. Going further, I see two options:
|
Why not also fix the Linux build? Especially if we won't be able to use macOS runners. Looking at
if [ $(uname) = "Darwin" ]
SWIFT_EXEC=${SWIFT_EXEC:-`xcrun -f swift`}
CLANG=${CLANG:-`xcrun -f clang`}
PYTHON_EXEC=${PYTHON_EXEC:-`xcrun -f python3`}
elif [ $(uname) = "Linux" ]
SWIFT_EXEC=${SWIFT_EXEC:-`which swift`}
CLANG=${SWIFT_EXEC:-`which clang`}
PYTHON_EXEC=${PYTHON_EXEC:-`which python3`}
fi
|
I'm not willing to do it. If somebody else wants to, please go ahead. |
I'm willing to do it but I guess I'll need to document myself about this and find the time for it. I'm not sure how busy I'll be in the near future, but we'll see :) Maybe some help / tips from others would be helpful / if someone else wants to take on this I'd be happy to help as much as I can. |
1e8a9c1
to
d8d66ad
Compare
d8d66ad
to
3f4bd08
Compare
See https://github.com/sw-dev-1/swift-embedded-examples/actions for the build status. |
This shows a proof-of-concept for a simple continuous integration system, using GitHub actions.
A single file is added, defining the steps to build the code.
The steps are:
pico-blink
example, as a starting point.Example runs:
blinky.uf2
binary for pico-blink is produced, I applied the fix from pull request 60. The corresponding, successfull run can be found here.The action is run daily at 9 AM UTC, this can be set to any other time.
Steps for the other examples can be added later, in case this approach is liked.