Skip to content

Build for armv6 (gcc 10.2) #19

Build for armv6 (gcc 10.2)

Build for armv6 (gcc 10.2) #19

Workflow file for this run

name: Build for armv6
on:
workflow_dispatch:
inputs:
connect-type:
required: true
type: choice
description: Board type
options:
- FULLSPEC
- STANDARD
default: FULLSPEC
debug-flag:
required: true
type: boolean
default: false
schedule:
- cron: '20 5 * * *'
jobs:
build:
runs-on: ubuntu-22.04
defaults:
run:
working-directory: cpp
env:
ARTIFACT_REPOSITORY: ${{ secrets.ARTIFACT_REPOSITORY }}
CROSS_TOOLS_ARM: ${{ secrets.CROSS_TOOLS_ARMV6 }}
CROSS_TOOLS_GLIBC: ${{ secrets.CROSS_TOOLS_GLIBC }}
CROSS_PATH: /opt/cross
CROSS_ARCH: arm-linux-gnueabihf
steps:
- uses: actions/checkout@v4
- name: Install additional packages
run: sudo apt install --yes protobuf-compiler
- name: Set up cross compilation environment
run: |
cd /tmp &&
wget -q $ARTIFACT_REPOSITORY/$CROSS_TOOLS_ARM &&
wget -q $ARTIFACT_REPOSITORY/$CROSS_TOOLS_GLIBC &&
mkdir $CROSS_PATH &&
cd $CROSS_PATH &&
tar zxf /tmp/$CROSS_TOOLS_ARM && rm /tmp/$CROSS_TOOLS_ARM &&
tar zxf /tmp/$CROSS_TOOLS_GLIBC &&rm /tmp/$CROSS_TOOLS_GLIBC &&
ln -s /lib/x86_64-linux-gnu/libmpc.so.3 $CROSS_PATH/glibc-2.36/lib &&
ln -s /lib/x86_64-linux-gnu/libmpfr.so.6 $CROSS_PATH/glibc-2.36/lib &&
ln -s /lib/x86_64-linux-gnu/libgmp.so.10 $CROSS_PATH/glibc-2.36/lib
- name: Build debug flag
if: ${{ inputs.debug-flag }}
run: echo "debug=DEBUG\=1" >> $GITHUB_ENV
- name: Compile
run: |
export LDFLAGS="-Wl,-rpath-link,$CROSS_PATH/armv6/$CROSS_ARCH/sys-root/lib" &&
make -j $(nproc) CONNECT_TYPE=${{ inputs.connect-type }} ${{ env.debug }} CROSS_COMPILE=$CROSS_PATH/armv6/bin/$CROSS_ARCH-
- name: Create package
run: |
$CROSS_PATH/armv6/bin/$CROSS_ARCH-strip bin/* &&
mv bin .. && cd .. &&
tar zcf /tmp/armv6-binaries.tar.gz bin doc