mirror of
https://github.com/linux-msm/rpmsgexport.git
synced 2026-08-13 13:12:22 -07:00
GH: add ci configuration
Add simple CI configuration testing that the tool build. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
This commit is contained in:
@@ -0,0 +1,85 @@
|
||||
# SPDX-License-Identifier: BSD-3-Clause
|
||||
#
|
||||
# Copyright (c) 2023 Linaro Ltd.
|
||||
#
|
||||
name: "Builds"
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
schedule:
|
||||
# Run periodically to check that it still compiles
|
||||
- cron: '13 13 * * 1'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
job:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
container:
|
||||
- debian:testing
|
||||
- debian:trixie
|
||||
- debian:bookworm
|
||||
- ubuntu:resolute
|
||||
- ubuntu:noble
|
||||
- ubuntu:jammy
|
||||
target:
|
||||
- native
|
||||
- aarch64-linux-gnu
|
||||
- arm-linux-gnueabihf
|
||||
|
||||
container:
|
||||
image: ${{ matrix.container }}
|
||||
|
||||
steps:
|
||||
- name: Git checkout
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Install meson
|
||||
run: |
|
||||
apt update
|
||||
apt -y install --no-install-recommends meson build-essential
|
||||
|
||||
- name: Install cross-compilers
|
||||
if: matrix.target != 'native'
|
||||
run: |
|
||||
apt -y install gcc-${{ matrix.target }}
|
||||
FAMILY=$(echo ${{ matrix.target }} | cut -d- -f 1)
|
||||
if [ "${FAMILY}" = "aarch64" ] ; then
|
||||
CPU="arm64"
|
||||
elif [ "${FAMILY}" = "arm" ] ; then
|
||||
CPU="arm"
|
||||
else
|
||||
echo "Unknown CPU family ${FAMILY}"
|
||||
exit 1
|
||||
fi
|
||||
cat > cross.txt << EOF
|
||||
[binaries]
|
||||
c = '${{ matrix.target }}-gcc'
|
||||
strip = '${{ matrix.target }}-strip'
|
||||
pkgconfig = 'pkg-config'
|
||||
[host_machine]
|
||||
system = 'linux'
|
||||
cpu_family = '${FAMILY}'
|
||||
cpu = 'arm64'
|
||||
endian = 'litle'
|
||||
[properties]
|
||||
pkg_config_libdir = '/usr/lib/${{ matrix.target }}/pkgconfig'
|
||||
EOF
|
||||
cat cross.txt
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
if [ ${{ matrix.target }} = "native" ] ; then
|
||||
meson setup . build --werror
|
||||
else
|
||||
meson setup --cross-file cross.txt . build --werror
|
||||
fi
|
||||
ninja -C build
|
||||
ninja -C build install
|
||||
Reference in New Issue
Block a user