Adding msys2-based windows workflow #439
Workflow file for this run
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
# SPDX-FileCopyrightText: 2023-2024 Ledger SAS | |
# SPDX-License-Identifier: Apache-2.0 | |
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: | |
- name: XXX git permission quirk XXX | |
run: | | |
git config --global --add safe.directory $GITHUB_WORKSPACE | |
- 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: 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 |