Skip to content

Commit 76b8296

Browse files
ci: adding msys2 workflow
1 parent cecdba0 commit 76b8296

File tree

2 files changed

+133
-0
lines changed

2 files changed

+133
-0
lines changed

.github/workflows/msys2.yml

+104
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
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

support/meson/msys2.ini

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
[constants]
2+
# Gcc triple, no diff between various arm-none-eabi targets, using
3+
# supplementary arguments to precise
4+
cross_triple = 'arm-none-eabi'
5+
# llvm triple, target-explicit, needed by Rust
6+
cross_toolchain = 'C:\Users\runneradmin\gcc-arm-none-eabi-13.2.1-win32-x64\arm-gnu-toolchain-13.2.Rel1-mingw-w64-i686-arm-none-eabi\'
7+
cross_compile = cross_toolchain + 'bin\' + cross_triple + '-'
8+
9+
[host_machine]
10+
system = 'baremetal'
11+
cpu_family = 'arm'
12+
cpu = 'cortex-m4'
13+
endian = 'little'
14+
exe_wrapper = 'qemu-arm-static'
15+
16+
[binaries]
17+
c = cross_compile + 'gcc'
18+
cpp = cross_compile + 'g++'
19+
ar = cross_compile + 'gcc-ar'
20+
ranlib = cross_compile + 'gcc-ranlib'
21+
strip = cross_compile + 'strip'
22+
objcopy = cross_compile + 'objcopy'
23+
clang = 'clang'
24+
rust_ld = 'gcc'
25+
rust = 'rustc'
26+
pkg-config = 'pkg-config'
27+
28+
[properties]
29+
sysroot = cross_toolchain + cross_triple

0 commit comments

Comments
 (0)