2021-05-26 16:52:28 +07:00
|
|
|
name: Build MSP430
|
|
|
|
|
|
|
|
on:
|
2023-05-25 16:53:32 +07:00
|
|
|
workflow_dispatch:
|
2021-05-26 16:52:28 +07:00
|
|
|
push:
|
2022-12-08 09:44:26 +07:00
|
|
|
paths:
|
2022-12-08 11:47:01 +07:00
|
|
|
- 'src/**'
|
|
|
|
- 'examples/**'
|
|
|
|
- 'lib/**'
|
|
|
|
- 'hw/**'
|
2023-02-01 16:36:39 +07:00
|
|
|
- '.github/workflows/build_msp430.yml'
|
2022-12-08 09:44:26 +07:00
|
|
|
pull_request:
|
|
|
|
branches: [ master ]
|
|
|
|
paths:
|
2022-12-08 11:47:01 +07:00
|
|
|
- 'src/**'
|
|
|
|
- 'examples/**'
|
|
|
|
- 'lib/**'
|
|
|
|
- 'hw/**'
|
2023-02-01 16:36:39 +07:00
|
|
|
- '.github/workflows/build_msp430.yml'
|
2021-05-26 16:52:28 +07:00
|
|
|
|
2022-12-04 21:08:47 +07:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2023-03-17 15:54:25 +07:00
|
|
|
jobs:
|
2021-05-26 16:52:28 +07:00
|
|
|
build-msp430:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
family:
|
|
|
|
# Alphabetical order
|
|
|
|
- 'msp430'
|
2022-11-16 11:16:40 +07:00
|
|
|
|
2021-05-26 16:52:28 +07:00
|
|
|
steps:
|
|
|
|
- name: Setup Python
|
2022-11-06 15:17:00 +07:00
|
|
|
uses: actions/setup-python@v4
|
2022-11-16 11:16:40 +07:00
|
|
|
with:
|
|
|
|
python-version: '3.x'
|
2021-05-26 16:52:28 +07:00
|
|
|
|
|
|
|
- name: Checkout TinyUSB
|
2022-04-24 16:49:29 +01:00
|
|
|
uses: actions/checkout@v3
|
2021-05-26 16:52:28 +07:00
|
|
|
|
2021-10-13 00:57:45 +07:00
|
|
|
- name: Checkout hathach/linkermap
|
2022-04-24 16:49:29 +01:00
|
|
|
uses: actions/checkout@v3
|
2021-10-13 00:57:45 +07:00
|
|
|
with:
|
|
|
|
repository: hathach/linkermap
|
|
|
|
path: linkermap
|
|
|
|
|
2021-05-26 16:52:28 +07:00
|
|
|
- name: Set Toolchain URL
|
|
|
|
run: echo >> $GITHUB_ENV TOOLCHAIN_URL=http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/9_2_0_0/export/msp430-gcc-9.2.0.50_linux64.tar.bz2
|
|
|
|
|
|
|
|
- name: Cache Toolchain
|
2022-11-16 11:11:26 +07:00
|
|
|
uses: actions/cache@v3
|
2021-05-26 16:52:28 +07:00
|
|
|
id: cache-toolchain
|
|
|
|
with:
|
|
|
|
path: ~/cache/
|
|
|
|
key: ${{ runner.os }}-21-03-04-${{ 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.bz2
|
|
|
|
tar -C ~/cache/toolchain -xaf toolchain.tar.bz2
|
|
|
|
|
|
|
|
- name: Set Toolchain Path
|
|
|
|
run: echo >> $GITHUB_PATH `echo ~/cache/toolchain/*/bin`
|
|
|
|
|
2022-07-01 17:23:14 +07:00
|
|
|
- name: Get Dependencies
|
2023-05-26 15:25:55 +07:00
|
|
|
run: python3 tools/get_deps.py ${{ matrix.family }}
|
2022-07-01 17:23:14 +07:00
|
|
|
|
2021-05-26 16:52:28 +07:00
|
|
|
- name: Build
|
|
|
|
run: python3 tools/build_family.py ${{ matrix.family }}
|
2021-10-13 00:57:45 +07:00
|
|
|
|
|
|
|
- name: Linker Map
|
|
|
|
run: |
|
|
|
|
pip install linkermap/
|
2022-11-06 14:56:05 +07:00
|
|
|
# find -quit to only print linkermap of 1 board per example
|
|
|
|
for ex in `ls -d examples/device/*/`
|
|
|
|
do
|
|
|
|
find ${ex} -name *.map -print -quit | xargs -I % sh -c 'echo "::group::%"; linkermap -v %; echo "::endgroup::"'
|
2021-10-13 00:57:45 +07:00
|
|
|
done
|