]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
build: Add s390x cross build and enable cross tests
authorDaniel Wagner <dwagner@suse.de>
Thu, 16 Feb 2023 16:06:19 +0000 (17:06 +0100)
committerDaniel Wagner <wagi@monom.org>
Thu, 16 Feb 2023 18:16:29 +0000 (19:16 +0100)
Enable s390x cross builds and also run all tests when building cross.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
.github/cross/clang.txt
.github/cross/ubuntu-armhf.txt
.github/cross/ubuntu-ppc64le.txt
.github/cross/ubuntu-s390x.txt [new file with mode: 0644]
.github/workflows/appimage.yml
.github/workflows/build.yml
.github/workflows/release.yml

index db001c5c1d524db8a3f14c1a99c866e71559a1af..1484a3e7e1a0ee2df8d2a86458d9aeea3f0fa467 100644 (file)
@@ -1,2 +1,5 @@
 [binaries]
 c = 'clang'
+cpp = 'clang++'
+strip = 'strip'
+pkgconfig = 'pkg-config'
index 2eee70b584b78a61299289de17200be3b334b9f9..41c8328906282be7e37cfbbea7a98d3c1f28506b 100644 (file)
@@ -4,6 +4,7 @@ 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'
+exe_wrapper = '/usr/bin/qemu-arm-static'
 
 [properties]
 root = '/usr/arm-linux-gnueabihf'
index 4cf6a92a2ef08ee42874aa13fb98bc55a993a300..6baaefbc26dfe79a8867e3e88cb47b2c212e74ca 100644 (file)
@@ -4,6 +4,7 @@ ar = '/usr/powerpc64le-linux-gnu/bin/ar'
 strip = '/usr/powerpc64le-linux-gnu/bin/strip'
 pkgconfig = '/usr/bin/powerpc64le-linux-gnu-pkg-config'
 ld = '/usr/bin/powerpc64le-linux-gnu-ld'
+exe_wrapper = '/usr/bin/qemu-ppc64le-static'
 
 [properties]
 root = '/usr/powerpc64le-linux-gnu'
diff --git a/.github/cross/ubuntu-s390x.txt b/.github/cross/ubuntu-s390x.txt
new file mode 100644 (file)
index 0000000..51a3511
--- /dev/null
@@ -0,0 +1,18 @@
+[binaries]
+c = '/usr/bin/s390x-linux-gnu-gcc'
+ar = '/usr/s390x-linux-gnu/bin/ar'
+strip = '/usr/s390x-linux-gnu/bin/strip'
+pkgconfig = '/usr/bin/s390x-linux-gnu-pkg-config'
+ld = '/usr/bin/s390x-linux-gnu-ld'
+exe_wrapper = '/usr/bin/qemu-s390x-static'
+
+[properties]
+root = '/usr/s390x-linux-gnu'
+has_function_printf = true
+skip_sanity_check = true
+
+[host_machine]
+system = 'linux'
+cpu_family = 's390x'
+cpu = ''
+endian = 'big'
index 54fadc78a1ecc534869c89cea5877d5ad94f65b8..80b0496250c319c80ce2086ae3a8ccf338f5b932 100644 (file)
@@ -1,16 +1,17 @@
 ---
-name: AppImage
+name: appimage
 
 on:
   push:
-    branches: [ master ]
+    branches: [master]
   pull_request:
-    branches: [ master ]
+    branches: [master]
 env:
   DESTDIR: ../AppDir
 
 jobs:
   build-appimage:
+    name: build AppImage
     runs-on: ubuntu-latest
     steps:
       - uses: actions/checkout@v3
index c258aea0652045e85d01a3eb7110ba65bea98609..3f0b2031841fdadf146b749a85196c2b8182e758 100644 (file)
@@ -15,7 +15,7 @@ jobs:
     runs-on: ubuntu-latest
     steps:
       - name: install dependencies
-        run: sudo apt-get install libjson-c-dev libhugetlbfs-dev
+        run: sudo apt-get install gcc pkg-config libjson-c-dev libhugetlbfs-dev
       - uses: actions/checkout@v3
       - uses: actions/setup-python@v4
         with:
@@ -23,7 +23,6 @@ jobs:
       - uses: bsfishy/meson-build@v1.0.3
         with:
           action: test
-          options: --verbose
           setup-options: >
             --werror
             --buildtype=debug
@@ -32,15 +31,15 @@ jobs:
       - uses: actions/upload-artifact@v3
         if: failure()
         with:
-          name: gcc debug testlog
-          path: build/meson-logs/testlog.txt
+          name: gcc debug build log
+          path: build/meson-logs/meson-log.txt
 
   gcc-release:
     name: gcc release
     runs-on: ubuntu-latest
     steps:
       - name: install dependencies
-        run: sudo apt-get install libjson-c-dev libhugetlbfs-dev
+        run: sudo apt-get install gcc pkg-config libjson-c-dev libhugetlbfs-dev
       - uses: actions/checkout@v3
       - uses: actions/setup-python@v4
         with:
@@ -48,7 +47,6 @@ jobs:
       - uses: bsfishy/meson-build@v1.0.3
         with:
           action: test
-          options: --verbose
           setup-options: >
             --werror
             --buildtype=release
@@ -57,15 +55,15 @@ jobs:
       - uses: actions/upload-artifact@v3
         if: failure()
         with:
-          name: gcc release testlog
-          path: build/meson-logs/testlog.txt
+          name: gcc release build log
+          path: build/meson-logs/meson-log.txt
 
   clang-release:
     name: clang release
     runs-on: ubuntu-latest
     steps:
       - name: install dependencies
-        run: sudo apt-get install clang libjson-c-dev libhugetlbfs-dev
+        run: sudo apt-get install clang pkg-config libjson-c-dev libhugetlbfs-dev
       - uses: actions/checkout@v3
       - uses: actions/setup-python@v4
         with:
@@ -73,7 +71,6 @@ jobs:
       - uses: bsfishy/meson-build@v1.0.3
         with:
           action: test
-          options: --verbose
           setup-options: >
             --werror
             --buildtype=release
@@ -84,8 +81,8 @@ jobs:
       - uses: actions/upload-artifact@v3
         if: failure()
         with:
-          name: clang release testlog
-          path: build/meson-logs/testlog.txt
+          name: clang release build log
+          path: build/meson-logs/meson-log.txt
 
   fallback-shared-libraries:
     name: fallback shared libraries
@@ -100,7 +97,6 @@ jobs:
       - uses: BSFishy/meson-build@v1.0.3
         with:
           action: test
-          options: --verbose
           setup-options: >
             --werror
             --buildtype=release
@@ -112,8 +108,8 @@ jobs:
       - uses: actions/upload-artifact@v3
         if: failure()
         with:
-          name: fallback shared libaries testlog
-          path: build/meson-logs/testlog.txt
+          name: fallback shared libaries build log
+          path: build/meson-logs/meson-log.txt
 
   fallback-static-libraries:
     name: fallback static libraries
@@ -128,7 +124,6 @@ jobs:
       - uses: BSFishy/meson-build@v1.0.3
         with:
           action: test
-          options: --verbose
           setup-options: >
             --werror
             --buildtype=release
@@ -140,8 +135,8 @@ jobs:
       - uses: actions/upload-artifact@v3
         if: failure()
         with:
-          name: fallback static libaries testlog
-          path: build/meson-logs/testlog.txt
+          name: fallback static libaries build log
+          path: build/meson-logs/meson-log.txt
 
   cross-armhf:
     name: cross armhf
@@ -158,27 +153,25 @@ jobs:
           EOF
           sudo apt update
       - name: install armhf compiler
-        run: sudo apt install gcc-arm-linux-gnueabihf pkg-config
+        run: sudo apt install gcc-arm-linux-gnueabihf pkg-config qemu-user-static
       - name: install libraries
         run: sudo apt install libjson-c-dev:armhf
       - uses: actions/checkout@v3
       - uses: BSFishy/meson-build@v1.0.3
         with:
-          action: build
-          options: --verbose
+          action: test
           setup-options: >
             --werror
             --buildtype=release
             --cross-file=.github/cross/ubuntu-armhf.txt
-            -Dlibnvme:werror=false
             -Dlibnvme:python=false
             -Dopenssl:werror=false
           meson-version: 0.61.2
       - uses: actions/upload-artifact@v3
         if: failure()
         with:
-          name: cross armhf testlog
-          path: build/meson-logs/testlog.txt
+          name: cross armhf build log
+          path: build/meson-logs/meson-log.txt
 
   cross-ppc64le:
     name: cross ppc64le
@@ -195,14 +188,13 @@ jobs:
           EOF
           sudo apt update
       - name: install powerpc64le compiler
-        run: sudo apt install gcc-powerpc64le-linux-gnu pkg-config
+        run: sudo apt install gcc-powerpc64le-linux-gnu pkg-config qemu-user-static
       - name: install libraries
         run: sudo apt install libjson-c-dev:ppc64el
       - uses: actions/checkout@v3
       - uses: BSFishy/meson-build@v1.0.3
         with:
-          action: build
-          options: --verbose
+          action: test
           setup-options: >
             --werror
             --buildtype=release
@@ -214,5 +206,41 @@ jobs:
       - uses: actions/upload-artifact@v3
         if: failure()
         with:
-          name: cross ppc64le testlog
-          path: build/meson-logs/testlog.txt
+          name: cross ppc64le build log
+          path: build/meson-logs/meson-log.txt
+
+  cross-s390x:
+    name: cross s390x
+    runs-on: ubuntu-latest
+    steps:
+      - name: set up s390x architecture
+        run: |
+          export release=$(lsb_release -c -s)
+          sudo dpkg --add-architecture s390x
+          sudo sed -i -e 's/deb http/deb [arch=amd64] http/g' /etc/apt/sources.list
+          sudo dd of=/etc/apt/sources.list.d/s390x.list <<EOF
+          deb [arch=s390x] http://ports.ubuntu.com/ $release main universe restricted"
+          deb [arch=s390x] http://ports.ubuntu.com/ $release-updates main universe restricted"
+          EOF
+          sudo apt update
+      - name: install s390x compiler
+        run: sudo apt install gcc-s390x-linux-gnu pkg-config qemu-user-static
+      - name: install libraries
+        run: sudo apt install libjson-c-dev:s390x
+      - uses: actions/checkout@v3
+      - uses: BSFishy/meson-build@v1.0.3
+        with:
+          action: test
+          setup-options: >
+            --werror
+            --buildtype=release
+            --cross-file=.github/cross/ubuntu-s390x.txt
+            -Dlibnvme:werror=false
+            -Dlibnvme:python=false
+            -Dopenssl:werror=false
+          meson-version: 0.61.2
+      - uses: actions/upload-artifact@v3
+        if: failure()
+        with:
+          name: cross s390x build log
+          path: build/meson-logs/meson-log.txt
index e4ccb7092ec23b22b633f194c7354138018fc186..c88be9e9a8a63df79a5694f352dec34680f1dfcc 100644 (file)
@@ -1,11 +1,12 @@
 ---
-name: releases
+name: release
 
 on:
   push:
     branches: [ master ]
     tags:
       - '**'
+
 jobs:
   build:
     runs-on: ubuntu-latest
@@ -13,7 +14,7 @@ jobs:
     permissions:
       contents: write
     steps:
-    - uses: actions/checkout@v3
-    - uses: ncipollo/release-action@v1
-      with:
-        token: ${{ secrets.GITHUB_TOKEN }}
+      - uses: actions/checkout@v3
+      - uses: ncipollo/release-action@v1
+        with:
+          token: ${{ secrets.GITHUB_TOKEN }}