2021-11-02 15:46:23 +01:00
|
|
|
name: Build AArch64
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2022-12-08 03:44:26 +01:00
|
|
|
paths:
|
2022-12-08 05:47:01 +01:00
|
|
|
- 'src/**'
|
|
|
|
- 'examples/**'
|
|
|
|
- 'lib/**'
|
|
|
|
- 'hw/**'
|
2022-12-08 03:44:26 +01:00
|
|
|
pull_request:
|
|
|
|
branches: [ master ]
|
|
|
|
paths:
|
2022-12-08 05:47:01 +01:00
|
|
|
- 'src/**'
|
|
|
|
- 'examples/**'
|
|
|
|
- 'lib/**'
|
|
|
|
- 'hw/**'
|
2021-11-02 15:46:23 +01:00
|
|
|
|
2022-12-04 15:08:47 +01:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2021-11-02 15:46:23 +01:00
|
|
|
jobs:
|
|
|
|
# ---------------------------------------
|
|
|
|
# Build AARCH64 family
|
|
|
|
# ---------------------------------------
|
|
|
|
build-arm:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
family:
|
|
|
|
# Alphabetical order
|
2022-01-05 23:11:39 +01:00
|
|
|
- 'broadcom_64bit'
|
2021-11-02 15:46:23 +01:00
|
|
|
steps:
|
|
|
|
- name: Setup Python
|
2022-11-06 09:17:00 +01:00
|
|
|
uses: actions/setup-python@v4
|
2022-11-06 16:06:22 +01:00
|
|
|
with:
|
|
|
|
python-version: '3.x'
|
2021-11-02 15:46:23 +01:00
|
|
|
|
|
|
|
- name: Checkout TinyUSB
|
2022-04-24 17:49:29 +02:00
|
|
|
uses: actions/checkout@v3
|
2021-11-02 15:46:23 +01:00
|
|
|
|
|
|
|
- name: Checkout common submodules in lib
|
|
|
|
run: git submodule update --init lib/FreeRTOS-Kernel lib/lwip lib/sct_neopixel
|
|
|
|
|
|
|
|
- name: Checkout hathach/linkermap
|
2022-04-24 17:49:29 +02:00
|
|
|
uses: actions/checkout@v3
|
2021-11-02 15:46:23 +01:00
|
|
|
with:
|
|
|
|
repository: hathach/linkermap
|
|
|
|
path: linkermap
|
|
|
|
|
|
|
|
- name: Set Toolchain URL
|
|
|
|
run: echo >> $GITHUB_ENV TOOLCHAIN_URL=https://developer.arm.com/-/media/Files/downloads/gnu-a/10.3-2021.07/binrel/gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz
|
|
|
|
|
|
|
|
- name: Cache Toolchain
|
2022-11-16 05:11:26 +01:00
|
|
|
uses: actions/cache@v3
|
2021-11-02 15:46:23 +01:00
|
|
|
id: cache-toolchain
|
|
|
|
with:
|
|
|
|
path: ~/cache/
|
|
|
|
key: ${{ runner.os }}-21-11-02-${{ env.TOOLCHAIN_URL }}
|
|
|
|
|
|
|
|
- name: Install Toolchain
|
|
|
|
if: steps.cache-toolchain.outputs.cache-hit != 'true'
|
|
|
|
run: |
|
|
|
|
mkdir -p ~/cache/toolchain
|
|
|
|
wget --progress=dot:mega $TOOLCHAIN_URL -O toolchain.tar.gz
|
|
|
|
tar -C ~/cache/toolchain -xaf toolchain.tar.gz
|
|
|
|
|
|
|
|
- name: Set Toolchain Path
|
|
|
|
run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin`
|
|
|
|
|
2022-07-01 12:23:14 +02:00
|
|
|
- name: Get Dependencies
|
|
|
|
run: python3 tools/get_dependencies.py ${{ matrix.family }}
|
|
|
|
|
2021-11-02 15:46:23 +01:00
|
|
|
- name: Build
|
|
|
|
run: python3 tools/build_family.py ${{ matrix.family }}
|
|
|
|
|
|
|
|
- name: Linker Map
|
|
|
|
run: |
|
|
|
|
pip install linkermap/
|
|
|
|
for ex in `ls -d examples/device/*/`; do \
|
|
|
|
find ${ex} -name *.map -print -quit | \
|
|
|
|
xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'; \
|
|
|
|
done
|