Skip to content

ci: Added macOS runner#152

Open
Dooleweerdt wants to merge 1 commit into
zephyrproject-rtos:mainfrom
Dooleweerdt:build_on_macos
Open

ci: Added macOS runner#152
Dooleweerdt wants to merge 1 commit into
zephyrproject-rtos:mainfrom
Dooleweerdt:build_on_macos

Conversation

@Dooleweerdt

Copy link
Copy Markdown

Added build workflow running on a macOS runner.
Added env variables to use llvm/clang from homebrew paths. Disable Renode install on the macOS runner (unused?) Moved linux specific commands to a linux specific step.

@Dooleweerdt

Copy link
Copy Markdown
Author

Hi @d3zd3z
I was playing around with adding the macOS runner on my own project, so why not add it to the zephyr-lang-rust repo builds too? ;-)
What do you think?

Comment thread .github/workflows/build.yml Outdated

# Note that Renode is only provided for x86_64 targets. This matches the github runners.
- name: Install Renode
if: runner.os == 'ubuntu'

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is never true. I believe on ubuntu, the runner.os will be 'Linux'.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it is Linux. Sorry I didn't catch it myself.
@d3zd3z:Do you know why Renode is added to the workflow? As far as I can see it is not used? We could clean it up?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect I just copied that from an existing workflow. I think there might have been some goal of renode, but it isn't part of the SDK, just installed in the docker image that Zephyr main uses, which is too large for the free runner github provides.

@Dooleweerdt Dooleweerdt May 12, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@d3zd3z: I can clean it up, if it's ok with you?
I can also leave it in...

Comment thread .github/workflows/build.yml Outdated
if: runner.os == 'macOS'
run: |
# Set hardcoded paths for LLVM 18 installed via Homebrew on macOS 15 - fits with GitHub's macOS 15 image
echo "LIBCLANG_PATH=/opt/homebrew/Cellar/llvm@18/18.1.8/lib/libclang.dylib" >> $GITHUB_ENV

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps something like:

LLVM_PREFIX=/opt/homebrew/opt/llvm/lib
RESOURCE_DIR="$("$LLVM_PREFIX/bin/clang" -print-resource-dir)"
export BINDGEN_EXTRA_CLANG_ARGS="-resource-dir=$RESOURCE_DIR"

this should keep it a little less fragile as to specific version.
Any reason to not use macos-26? I build this regularly on Tahoe. And, I haven't needed the int64 override definition below.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have now changed it to use macos-26. I cleaned out the int64 override definitions - I apparently need them in my own projects workflow, but they are not needed here.

@Dooleweerdt
Dooleweerdt force-pushed the build_on_macos branch 2 times, most recently from 8897352 to 5dcc6c3 Compare May 3, 2026 19:43
Added build workflow running on a macOS runner, macos-26.
Added env variables to use llvm/clang from homebrew paths.
Disable Renode install on the macOS runner (unused?)
Moved linux specific commands to a linux specific step.

Signed-off-by: Brian Dooleweerdt Rasmussn <brian.rasmussen80@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants