commit d2c2a1d6f6991d975efa90c87510e4ad7b692f58 Author: dany Date: Sat Jul 27 00:09:34 2024 +0200 add 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 }}."