warnings, fixes, cleanups #19
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-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:bookworm | |
#- debian:bullseye | |
#- debian:buster | |
- ubuntu:lunar | |
- ubuntu:jammy | |
#- ubuntu:focal | |
#- ubuntu:bionic | |
#- ubuntu:xenial | |
target: | |
- native | |
- aarch64-linux-gnu | |
- arm-linux-gnueabihf | |
container: | |
image: ${{ matrix.container }} | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v3 | |
- 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 |