Skip to content

Build for armv8 (gcc 12.2) #34

Build for armv8 (gcc 12.2)

Build for armv8 (gcc 12.2) #34

Workflow file for this run

name: Build for armv8
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: '50 5 * * *'
jobs:
build:
runs-on: ubuntu-22.04
defaults:
run:
working-directory: cpp
env:
ARTIFACT_REPOSITORY: ${{ secrets.ARTIFACT_REPOSITORY }}
DEPLOY_PATH: ${{ secrets.DEPLOY_PATH }}
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
CROSS_TOOLS_ARM: ${{ secrets.CROSS_TOOLS_ARMV8 }}
CROSS_TOOLS_GLIBC: ${{ secrets.CROSS_TOOLS_GLIBC }}
steps:
- uses: actions/checkout@v4
- name: Set up cross compilation environment
run: |
cd /tmp &&
wget -q $ARTIFACT_REPOSITORY/$CROSS_TOOLS_ARM &&
wget -q $ARTIFACT_REPOSITORY/$CROSS_TOOLS_GLIBC &&
wget -q $ARTIFACT_REPOSITORY/generated-bookworm.tar.gz &&
tar zxf generated-bookworm.tar.gz &&
mkdir $HOME/work/scsi2pi/scsi2pi/cpp/generated &&
cp generated-bookworm/* $HOME/work/scsi2pi/scsi2pi/cpp/generated &&
mkdir /opt/cross &&
cd /opt/cross &&
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 /opt/cross/glibc-2.36/lib &&
ln -s /lib/x86_64-linux-gnu/libmpfr.so.6 /opt/cross/glibc-2.36/lib &&
ln -s /lib/x86_64-linux-gnu/libgmp.so.10 /opt/cross/glibc-2.36/lib
- name: Build debug strings
if: ${{ inputs.debug-flag }}
run: echo "debug_flag_compile=DEBUG\=1" >> $GITHUB_ENV
- name: Compile
run: |
export LDFLAGS="-Wl,-rpath-link,/opt/cross/armv8/aarch64-linux-gnu/sys-root/lib" &&
make -j $(nproc) CONNECT_TYPE=${{ inputs.connect-type }} $DEBUG CROSS_COMPILE=/opt/cross/armv8/bin/aarch64-linux-gnu-
- name: Deploy binary package
run: |
/opt/cross/armv8/bin/aarch64-linux-gnu-strip bin/* &&
mv bin .. && cd .. &&
tar zcf /tmp/armv8-binaries.tar.gz bin doc &&
echo $DEPLOY_TOKEN >> key
# scp -B -q -i key -p /tmp/armv8-binaries.tar.gz $DEPLOY_PATH