From: Jeremy Kerr Date: Sat, 24 Sep 2022 02:49:16 +0000 (+0800) Subject: github workflows: Add an armhf cross build X-Git-Tag: v1.2~26^2~1 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=efaebc7deedd80b9c843435be3e24e67ed322407;p=users%2Fsagi%2Flibnvme.git github workflows: Add an armhf cross build This RFC change adds a github workflow for a cross-compile of libnvme on armhf. We use a similar setup to the build-distro job, but install a suitable cross compiler and provide a cross config to meson. We currently setup with -Dpython=false, as the setup-python@v4 seems to assume a native python build. We may be able to remove this later. The suitability of this will depend on the resources available for actions; doing some test runs on a private repo shows an execution time of about 1 min 15 sec - a little less than the build-static job. Signed-off-by: Jeremy Kerr --- diff --git a/.github/cross/ubuntu-armhf.txt b/.github/cross/ubuntu-armhf.txt new file mode 100644 index 00000000..2eee70b5 --- /dev/null +++ b/.github/cross/ubuntu-armhf.txt @@ -0,0 +1,17 @@ +[binaries] +c = '/usr/bin/arm-linux-gnueabihf-gcc' +ar = '/usr/arm-linux-gnueabihf/bin/ar' +strip = '/usr/arm-linux-gnueabihf/bin/strip' +pkgconfig = '/usr/bin/arm-linux-gnueabihf-pkg-config' +ld = '/usr/bin/arm-linux/gnueabihf-ld' + +[properties] +root = '/usr/arm-linux-gnueabihf' +has_function_printf = true +skip_sanity_check = true + +[host_machine] +system = 'linux' +cpu_family = 'arm' +cpu = 'armv7' +endian = 'little' diff --git a/.github/workflows/meson.yml b/.github/workflows/meson.yml index 9006eaec..e0d0cef5 100644 --- a/.github/workflows/meson.yml +++ b/.github/workflows/meson.yml @@ -30,6 +30,36 @@ jobs: name: Linux_Meson_Testlog path: build/meson-logs/testlog.txt + build-cross-armhf: + runs-on: ubuntu-latest + steps: + - name: set up arm architecture + run: | + export release=$(lsb_release -c -s) + sudo dpkg --add-architecture armhf + sudo sed -i -e 's/deb http/deb [arch=amd64] http/g' /etc/apt/sources.list + sudo dd of=/etc/apt/sources.list.d/armhf.list <