47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
name: Building autotools project
|
|
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
|
|
;;
|
|
esac
|
|
mkdir build
|
|
libtoolize
|
|
aclocal
|
|
autoconf
|
|
automake --add-missing
|
|
./configure $HOST --prefix=/usr
|
|
DESTDIR=$(realpath 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 }}."
|