-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add MacOS dedicated build of Sentry kernel. No matrix build by now, yet validate that the Sentry kernel can be built on MacOS X operating system. The workflow requires some python fixes associated to homebrew usage (see actions/setup-python#58) due to Github actions constraints, in the same way mesonbuild does in its macos workflow. This part is left to the MacOS X user on a standard development host. The parseelf.py script is also fixed to user normalized `/usr/bin/env python3` as shebang
- Loading branch information
Showing
5 changed files
with
113 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
name: Sentry kernel build on MacOS X | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
# using /home/build as home, as buildbot is using user build. Cache is still in /cache | ||
# This allows the usage of automated ssh key installation step | ||
|
||
jobs: | ||
build_u5_macosX: | ||
defaults: | ||
run: | ||
shell: bash | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
fetch-tags: true | ||
set-safe-directory: true | ||
- name: unbreak python in github actions | ||
run: | | ||
find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete | ||
sudo rm -rf /Library/Frameworks/Python.framework/ | ||
brew install --force python3 && brew unlink python3 && brew unlink python3 && brew link --overwrite python3 | ||
# Delete nonsensical PEP 668 breakage. It is the wrong solution to the problem and isn't designed to be | ||
# productive -- only victim blaming -- however it bites particularly badly because this is a container/VM | ||
# See commit 5c479d7a13a518c18ccb4dc3b6bdd7bfc2a9bdb5 for a more thorough analysis. | ||
find /opt/homebrew/Cellar/python* -name EXTERNALLY-MANAGED -print0 | xargs -0 rm -vf | ||
# use python3 from homebrew because it is a valid framework, unlike the actions one: | ||
# https://github.com/actions/setup-python/issues/58 | ||
- run: brew install dtc libssh2 curl srecord rustup | ||
- name: Clone cross-files | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: 'using-local-dirs' | ||
repository: 'outpost-os/meson-cross-files' | ||
path: crossfiles | ||
- name: Deploy cross-files | ||
run: | | ||
mkdir -p $HOME/.local/share/meson/cross | ||
cp -a $GITHUB_WORKSPACE/crossfiles/*.ini $HOME/.local/share/meson/cross | ||
echo "MESON_CROSS_FILES=$HOME/.local/share/meson/cross" >> $GITHUB_ENV | ||
shell: bash | ||
- name: Setup Rust toolchain | ||
uses: dtolnay/rust-toolchain@v1 | ||
with: | ||
toolchain: nightly | ||
targets: thumbv7m-none-eabi,thumbv7em-none-eabi,thumbv7em-none-eabihf | ||
components: clippy,rustfmt | ||
- name: Setup C toolchain | ||
uses: outpost-os/action-setup-compiler@v1 | ||
with: | ||
compiler: gcc | ||
triple: arm-none-eabi | ||
ref: 13.2.Rel1 | ||
workspace: ${{ github.workspace }} | ||
- name: set safe dir for dunami (to be removed) | ||
run: | | ||
git config --global --add safe.directory '*' | ||
shell: bash | ||
- name: deploy local deps | ||
run: | | ||
python3 -m pip install --upgrade pip | ||
python3 -m pip install -r requirements.txt | ||
echo '$HOME/Library/Python/3.12/bin' >> $GITHUB_PATH | ||
- name: defconfig | ||
run: | | ||
defconfig configs/nucleo_u5a5_autotest_defconfig | ||
- name: Meson Build | ||
uses: outpost-os/action-meson@v1 | ||
with: | ||
cross_files: ${{ format('{0}/{1}', env.MESON_CROSS_FILES, 'arm-none-eabi-gcc.ini') }} | ||
actions: '["prefetch", "setup", "compile"]' | ||
options: '-Dconfig=.config -Ddts=dts/examples/nucleo_u5a5_autotest.dts -Ddts-include-dirs=dts' | ||
- name: Meson postcheck | ||
if: failure() | ||
run: | | ||
cat builddir/meson-logs/meson-log.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/python3 | ||
#!/usr/bin/env python3 | ||
|
||
import os | ||
import sys | ||
|