Skip to content

Commit

Permalink
CI: Update Arm GNU Toolchain and use Ubuntu 24.04
Browse files Browse the repository at this point in the history
The pre-built GNU compiler toolchain for various Arm targets.
Version 14.2.Rel1.
  • Loading branch information
jserv committed Dec 27, 2024
1 parent 3b9d203 commit 7097d93
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 26 deletions.
18 changes: 18 additions & 0 deletions .ci/common.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
GCC_REL=14.2.rel1
ARM_MIRROR=https://github.com/DLTcollab/toolchain-arm/raw/main

SOURCES=$(find $(git rev-parse --show-toplevel) | egrep "\.(cpp|h)\$" | egrep -v "arm-gnu-toolchain-${GCC_REL}-x86_64-aarch64-none-linux-gnu|arm-gnu-toolchain-${GCC_REL}-x86_64-arm-none-linux-gnueabihf")

# Expect host is Linux/x86_64
check_platform()
{
MACHINE_TYPE=`uname -m`
if [ ${MACHINE_TYPE} != 'x86_64' ]; then
exit
fi

OS_TYPE=`uname -s`
if [ ${OS_TYPE} != 'Linux' ]; then
exit
fi
}
14 changes: 3 additions & 11 deletions .ci/cross-check.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
#!/usr/bin/env bash

MACHINE_TYPE=`uname -m`
if [ ${MACHINE_TYPE} != 'x86_64' ]; then
exit
fi
. .ci/common.sh

OS_TYPE=`uname -s`
if [ ${OS_TYPE} != 'Linux' ]; then
exit
fi
check_platform

# Clang/LLVM is natively a cross-compiler.
# TODO: Do cross-compilation using Clang
Expand All @@ -17,9 +11,7 @@ if [ $(printenv CXX | grep clang) ]; then
exit
fi

GCC_REL=11.2-2022.02

set -x

export PATH=gcc-arm-${GCC_REL}-x86_64-arm-none-linux-gnueabihf/bin:$PATH
export PATH=arm-gnu-toolchain-${GCC_REL}-x86_64-arm-none-linux-gnueabihf/bin:$PATH
make CROSS_COMPILE=arm-none-linux-gnueabihf- check || exit 1
15 changes: 3 additions & 12 deletions .ci/cross-tool.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
#!/usr/bin/env bash

ARM_MIRROR=https://github.com/DLTcollab/toolchain-arm/raw/main
GCC_REL=11.2-2022.02
. .ci/common.sh

MACHINE_TYPE=`uname -m`
if [ ${MACHINE_TYPE} != 'x86_64' ]; then
exit
fi

OS_TYPE=`uname -s`
if [ ${OS_TYPE} != 'Linux' ]; then
exit
fi
check_platform

set -x

Expand All @@ -21,5 +12,5 @@ sudo apt-get install -q -y qemu-user
sudo apt-get install -y curl xz-utils

curl -L \
${ARM_MIRROR}/gcc-arm-${GCC_REL}-x86_64-arm-none-linux-gnueabihf.tar.xz \
${ARM_MIRROR}/arm-gnu-toolchain-${GCC_REL}-x86_64-arm-none-linux-gnueabihf.tar.xz \
| tar -Jx || exit 1
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ on: [push, pull_request]

jobs:
host_x86:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
strategy:
matrix:
compiler: [gcc-10]
compiler: [gcc]
steps:
- name: checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: build artifact
env:
CC: ${{ matrix.compiler }}
Expand Down

0 comments on commit 7097d93

Please sign in to comment.