|
| 1 | +# SPDX-FileCopyrightText: 2025 Ledger SAS |
| 2 | +# SPDX-License-Identifier: Apache-2.0 |
| 3 | + |
| 4 | +name: Sentry kernel build on Windows |
| 5 | + |
| 6 | +on: |
| 7 | + workflow_dispatch: |
| 8 | + push: |
| 9 | + pull_request: |
| 10 | + branches: |
| 11 | + - main |
| 12 | + |
| 13 | +concurrency: |
| 14 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 15 | + cancel-in-progress: true |
| 16 | + |
| 17 | +# using /home/build as home, as buildbot is using user build. Cache is still in /cache |
| 18 | +# This allows the usage of automated ssh key installation step |
| 19 | + |
| 20 | +jobs: |
| 21 | + build: |
| 22 | + name: build |
| 23 | + defaults: |
| 24 | + run: |
| 25 | + shell: bash |
| 26 | + runs-on: windows-latest |
| 27 | + steps: |
| 28 | + - name: install prerequisites pkg |
| 29 | + uses: msys2/setup-msys2@v2 |
| 30 | + with: |
| 31 | + msystem: MINGW64 |
| 32 | + update: true |
| 33 | + install: >- |
| 34 | + base-devel |
| 35 | + git |
| 36 | + wget |
| 37 | + curl |
| 38 | + dtc |
| 39 | + libssh2 |
| 40 | + cmake |
| 41 | + gcc |
| 42 | + ninja |
| 43 | + brotli |
| 44 | + libffi |
| 45 | + libffi-devel |
| 46 | + mingw-w64-x86_64-python |
| 47 | + mingw-w64-x86_64-python-pip |
| 48 | + mingw-w64-x86_64-python-pip |
| 49 | + mingw-w64-x86_64-python-swig |
| 50 | + mingw-w64-x86_64-python-lief |
| 51 | + mingw-w64-x86_64-python-wheel |
| 52 | + mingw-w64-x86_64-python-pillow |
| 53 | + mingw-w64-x86_64-python-lief |
| 54 | + mingw-w64-x86_64-python-cffi |
| 55 | + - name: XXX git permission quirk XXX |
| 56 | + run: | |
| 57 | + git config --global --add safe.directory $GITHUB_WORKSPACE |
| 58 | + - uses: actions/checkout@v4 |
| 59 | + with: |
| 60 | + fetch-depth: 0 |
| 61 | + fetch-tags: true |
| 62 | + set-safe-directory: true |
| 63 | + - uses: actions/setup-python@v5 |
| 64 | + with: |
| 65 | + python-version: '3.12' |
| 66 | + - name: Clone cross-files |
| 67 | + uses: actions/checkout@v4 |
| 68 | + with: |
| 69 | + ref: 'main' |
| 70 | + repository: 'outpost-os/meson-cross-files' |
| 71 | + path: crossfiles |
| 72 | + - name: Setup Rust toolchain |
| 73 | + uses: dtolnay/rust-toolchain@v1 |
| 74 | + with: |
| 75 | + toolchain: nightly |
| 76 | + targets: thumbv7m-none-eabi,thumbv7em-none-eabi,thumbv7em-none-eabihf |
| 77 | + components: clippy,rustfmt |
| 78 | + - name: Setup C toolchain |
| 79 | + uses: outpost-os/action-setup-compiler@v1 |
| 80 | + with: |
| 81 | + compiler: gcc |
| 82 | + triple: arm-none-eabi |
| 83 | + ref: 13.2.Rel1 |
| 84 | + workspace: $GITHUB_WORKSPACE |
| 85 | + - name: deploy local deps |
| 86 | + run: | |
| 87 | + pip config set global.break-system-packages true |
| 88 | + pip install meson~=1.4.0 kconfiglib~=14.1.0 svd2json>=0.1.6 dts-utils>=0.3.0 jinja-cli GitPython>=3.1.0 |
| 89 | + shell: msys2 {0} |
| 90 | + - name: defconfig |
| 91 | + run: | |
| 92 | + defconfig configs/nucleo_u5a5_autotest_defconfig |
| 93 | + shell: msys2 {0} |
| 94 | + - name: Meson Build |
| 95 | + uses: outpost-os/action-meson@main |
| 96 | + with: |
| 97 | + cross_files: 'support/meson/msys2.ini' |
| 98 | + actions: '["prefetch", "setup", "compile"]' |
| 99 | + options: '-Dconfig=.config -Ddts=dts/examples/$nucleo_u5a5_autotest.dts -Ddts-include-dirs=dts' |
| 100 | + shell: msys2 {0} |
| 101 | + - name: Meson postcheck |
| 102 | + if: failure() |
| 103 | + run: | |
| 104 | + cat builddir/meson-logs/meson-log.txt |
0 commit comments