From d2c2a1d6f6991d975efa90c87510e4ad7b692f58 Mon Sep 17 00:00:00 2001 From: dany Date: Sat, 27 Jul 2024 00:09:34 +0200 Subject: [PATCH] add autotools-cross.yml --- autotools-cross.yml | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 autotools-cross.yml diff --git a/autotools-cross.yml b/autotools-cross.yml new file mode 100644 index 0000000..38cf268 --- /dev/null +++ b/autotools-cross.yml @@ -0,0 +1,45 @@ +name: Building AntOS binaries +on: + workflow_call: + inputs: + platform: + required: true + type: string + +jobs: + build: + runs-on: ci-tools + steps: + - name: Check out repository code + uses: actions/checkout@v4 + - name: Building binaries for platform - ${{ inputs.platform }} + run: | + arch="${{ inputs.platform }}" + case $arch in + amd64|x86_64) + HOST= + ;; + aarch64|arm64) + HOST=--host=aarch64-linux-gnu + ;; + armv7l|arm) + HOST=--host=arm-linux-gnueabihf + ;; + *) + echo "Unkown architecture" + exit 1 + ;; + mkdir build + libtoolize + aclocal + autoconf + automake --add-missing + ./configure $HOST --prefix=/usr + DESTDIR=build make install + - name: Save artifact + uses: actions/upload-artifact@v3 + with: + name: build-${{ inputs.platform }} + path: build/ + retention-days: 1 + - run: echo "Build is ${{ job.status }}."