try to add armhf and arm64 ci build
authornotaz <notasas@gmail.com>
Sun, 14 Nov 2021 20:23:12 +0000 (22:23 +0200)
committernotaz <notasas@gmail.com>
Sun, 14 Nov 2021 21:07:34 +0000 (23:07 +0200)
.github/extract-foreign-all.sh [new file with mode: 0755]
.github/extract-foreign.sh [new file with mode: 0755]
.github/workflows/ci-linux-arm64.yml [new file with mode: 0644]
.github/workflows/ci-linux-armhf.yml [new file with mode: 0644]
.github/workflows/ci-linux.yml
configure

diff --git a/.github/extract-foreign-all.sh b/.github/extract-foreign-all.sh
new file mode 100755 (executable)
index 0000000..1296ce6
--- /dev/null
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+ARCH_="$1"
+.github/extract-foreign.sh "zlib1g-dev:${ARCH_}"
+.github/extract-foreign.sh "zlib1g:${ARCH_}"
+.github/extract-foreign.sh "libpng-dev:${ARCH_}"
+.github/extract-foreign.sh "libpng[0-9]*:${ARCH_}"
+.github/extract-foreign.sh "libsdl1.2-dev:${ARCH_}"
+.github/extract-foreign.sh "libsdl1.2debian:${ARCH_}"
+# endless libsdl deps
+.github/extract-foreign.sh "libasound[2-9]:${ARCH_}"
+.github/extract-foreign.sh "libpulse[0-9]:${ARCH_}"
+.github/extract-foreign.sh "libx11-[6-9]:${ARCH_}"
+.github/extract-foreign.sh "libx11-dev:${ARCH_}"
+.github/extract-foreign.sh "x11proto-dev"
+.github/extract-foreign.sh "libxext[6-9]:${ARCH_}"
+.github/extract-foreign.sh "libxcb1:${ARCH_}"
+.github/extract-foreign.sh "libxau[6-9]:${ARCH_}"
+.github/extract-foreign.sh "libxdmcp[6-9]:${ARCH_}"
+.github/extract-foreign.sh "libcaca[0-9]:${ARCH_}"
+.github/extract-foreign.sh "libdbus-[0-9]*:${ARCH_}"
+.github/extract-foreign.sh "libslang[2-9]:${ARCH_}"
+.github/extract-foreign.sh "libncursesw[6-9]:${ARCH_}"
+.github/extract-foreign.sh "libtinfo[6-9]:${ARCH_}"
+.github/extract-foreign.sh "libsystemd[0-9]:${ARCH_}"
+.github/extract-foreign.sh "libwrap[0-9]:${ARCH_}"
+.github/extract-foreign.sh "libsndfile[0-9]:${ARCH_}"
+.github/extract-foreign.sh "libasyncns[0-9]:${ARCH_}"
+.github/extract-foreign.sh "libbsd[0-9]:${ARCH_}"
+.github/extract-foreign.sh "liblzma[0-9]:${ARCH_}"
+.github/extract-foreign.sh "liblz[4-9]-*:${ARCH_}"
+.github/extract-foreign.sh "libgcrypt[0-9]*:${ARCH_}"
+.github/extract-foreign.sh "libflac[0-9]:${ARCH_}"
+.github/extract-foreign.sh "libogg[0-9]:${ARCH_}"
+.github/extract-foreign.sh "libvorbis[0-9]*:${ARCH_}"
+.github/extract-foreign.sh "libvorbisenc[2-9]:${ARCH_}"
+.github/extract-foreign.sh "libgpg-error[0-9]:${ARCH_}"
diff --git a/.github/extract-foreign.sh b/.github/extract-foreign.sh
new file mode 100755 (executable)
index 0000000..69aefa4
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/bash
+set -e
+
+url_base="http://ports.ubuntu.com/ubuntu-ports/"
+paths=`apt-cache show "$@" | grep '^Filename:' | awk '{print $2}'`
+for p in $paths; do
+  base=`basename $p`
+  wget -nv "${url_base}${p}"
+  echo "exctacting $base"
+  dpkg-deb -x "$base" .
+done
diff --git a/.github/workflows/ci-linux-arm64.yml b/.github/workflows/ci-linux-arm64.yml
new file mode 100644 (file)
index 0000000..de2f84c
--- /dev/null
@@ -0,0 +1,22 @@
+name: CI (Linux arm64)
+on: [push, pull_request]
+jobs:
+  build-linux:
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/checkout@v2
+      with:
+        submodules: true
+    - name: Install dependencies
+      run: |
+        whoami
+        sudo bash -c 'echo ''deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports focal main restricted universe'' > /etc/apt/sources.list.d/arm64.list'
+        sudo sed -i 's/^deb \([^[]\)/deb [arch=amd64] \1/' /etc/apt/sources.list
+        sudo dpkg --add-architecture arm64
+        sudo apt-get update -qq
+        sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
+        .github/extract-foreign-all.sh arm64
+    - name: configure
+      run: DUMP_CONFIG_LOG=1 CROSS_COMPILE=aarch64-linux-gnu- PATH=$PATH:usr/bin CFLAGS='-Iusr/include/ -Iusr/include/SDL' LDFLAGS='-Lusr/lib/aarch64-linux-gnu/ -Llib/aarch64-linux-gnu/ -Wl,-rpath-link=lib/aarch64-linux-gnu/,-rpath-link=usr/lib/aarch64-linux-gnu/,-rpath-link=usr/lib/aarch64-linux-gnu/pulseaudio/' ./configure
+    - name: make
+      run: make
diff --git a/.github/workflows/ci-linux-armhf.yml b/.github/workflows/ci-linux-armhf.yml
new file mode 100644 (file)
index 0000000..0842bf3
--- /dev/null
@@ -0,0 +1,22 @@
+name: CI (Linux armhf)
+on: [push, pull_request]
+jobs:
+  build-linux:
+    runs-on: ubuntu-latest
+    steps:
+    - uses: actions/checkout@v2
+      with:
+        submodules: true
+    - name: Install dependencies
+      run: |
+        whoami
+        sudo bash -c 'echo ''deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports focal main restricted universe'' > /etc/apt/sources.list.d/armhf.list'
+        sudo sed -i 's/^deb \([^[]\)/deb [arch=amd64] \1/' /etc/apt/sources.list
+        sudo dpkg --add-architecture armhf
+        sudo apt-get update -qq
+        sudo apt-get install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
+        .github/extract-foreign-all.sh armhf
+    - name: configure
+      run: DUMP_CONFIG_LOG=1 CROSS_COMPILE=arm-linux-gnueabihf- PATH=$PATH:usr/bin CFLAGS='-Iusr/include/ -Iusr/include/SDL' LDFLAGS='-Lusr/lib/arm-linux-gnueabihf/ -Llib/arm-linux-gnueabihf/ -Wl,-rpath-link=lib/arm-linux-gnueabihf/,-rpath-link=usr/lib/arm-linux-gnueabihf/,-rpath-link=usr/lib/arm-linux-gnueabihf/pulseaudio/' ./configure
+    - name: make
+      run: make
index 438b055..7ab7d36 100644 (file)
@@ -12,6 +12,6 @@ jobs:
         sudo apt-get update -qq
         sudo apt-get install -y libsdl1.2-dev libasound2-dev libpng-dev libz-dev
     - name: configure
-      run: ./configure
+      run: DUMP_CONFIG_LOG=1 ./configure
     - name: make
       run: make
index 37a5294..16f510c 100755 (executable)
--- a/configure
+++ b/configure
@@ -77,6 +77,7 @@ config_mak="config.mak"
 fail()
 {
   echo "$@"
+  if test -n "$DUMP_CONFIG_LOG"; then cat config.log; fi
   exit 1
 }