feat(Examples,PeriphDrivers)!: Add SPI v2 Target Transaction functions #3509
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build_Examples | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push or pull request events but only for the "main" branch | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
Build_Examples: | |
# The type of runner that the job will run on | |
runs-on: | |
- ubuntu-latest | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v3 | |
with: | |
# Update the submodules below, doing so here will convert ssh to https | |
submodules: false | |
fetch-depth: 0 | |
ref: '${{ github.event.pull_request.head.ref }}' | |
repository: '${{ github.event.pull_request.head.repo.full_name }}' | |
- name: Check watch files | |
id: check_watch | |
run: | | |
# Determine if we need to run the test | |
RUN_TEST=0 | |
# Always run test if a workflow_dispatch | |
if [[ $GITHUB_EVENT_NAME == "workflow_dispatch" ]]; then | |
RUN_TEST=1 | |
fi | |
# Check for changes made to these files | |
WATCH_FILES="\ | |
Build_Examples.yml \ | |
.c \ | |
.cpp \ | |
.S \ | |
.s \ | |
.h \ | |
.a \ | |
.mk \ | |
makefile \ | |
Makefile" | |
# Get the diff from main | |
CHANGE_FILES=$(git diff --ignore-submodules --name-only remotes/origin/main) | |
echo "Watching these locations and files" | |
echo $WATCH_FILES | |
echo "Checking the following changes" | |
echo $CHANGE_FILES | |
for watch_file in $WATCH_FILES; do | |
for change_file in $CHANGE_FILES; do | |
if [[ "${change_file,,}" == *"${watch_file,,}" ]]; then | |
echo "Match found. Watch type: $watch_file, File: $change_file" | |
RUN_TEST=1 | |
fi | |
done | |
done | |
# End the test early if there wasn't a significant change | |
if [[ $RUN_TEST -eq 0 ]]; then | |
echo "Skipping Build" | |
else | |
echo "Running Build" | |
fi | |
echo "RUN_TEST=$RUN_TEST" >> $GITHUB_OUTPUT | |
- name: Install ARM GCC Toolchain (arm-none-eabi-gcc) | |
uses: carlosperate/arm-none-eabi-gcc-action@v1 | |
id: arm-none-eabi-gcc-action | |
if: ${{ steps.check_watch.outputs.RUN_TEST == '1' }} | |
with: | |
release: '10.3-2021.10' # <-- The compiler release to use | |
- name: Install RISCV GCC Toolchain (riscv-none-embed-gcc) | |
if: ${{ steps.check_watch.outputs.RUN_TEST == '1' }} | |
run: | | |
# Install RISCV tools | |
npm install --global xpm@latest | |
TOOL_VER=10.2.0-1.2.1 | |
xpm install --global @xpack-dev-tools/riscv-none-embed-gcc@$TOOL_VER | |
cp -r /home/runner/.local/xPacks/@xpack-dev-tools/riscv-none-embed-gcc /home/runner/riscv-none-embed-gcc | |
# Add riscv tools to path | |
echo "/home/runner/riscv-none-embed-gcc/$TOOL_VER/.content/bin" >> $GITHUB_PATH | |
- name: Install RISCV GCC Toolchain (riscv-none-elf-gcc) | |
if: ${{ steps.check_watch.outputs.RUN_TEST == '1' }} | |
run: | | |
# Install RISCV tools (updated) | |
npm install --global xpm@latest | |
# https://www.npmjs.com/package/@xpack-dev-tools/riscv-none-elf-gcc | |
TOOL_VER=12.2.0-3.1 | |
xpm install --global @xpack-dev-tools/riscv-none-elf-gcc@$TOOL_VER | |
cp -r /home/runner/.local/xPacks/@xpack-dev-tools/riscv-none-elf-gcc /home/runner/riscv-none-elf-gcc | |
# Add riscv tools to path | |
echo "/home/runner/riscv-none-elf-gcc/$TOOL_VER/.content/bin" >> $GITHUB_PATH | |
- name: Install ccache | |
if: ${{ steps.check_watch.outputs.RUN_TEST == '1' }} | |
run: | | |
# Install ccache | |
sudo apt install -y ccache | |
# Prepend ccache into the PATH | |
echo "/usr/bin" >> $GITHUB_PATH | |
echo "/usr/lib/ccache" >> $GITHUB_PATH | |
# Setup ccache links | |
sudo ln -s ../../bin/ccache /usr/bin/arm-none-eabi-addr2line | |
sudo ln -s ../../bin/ccache /usr/bin/arm-none-eabi-ar | |
sudo ln -s ../../bin/ccache /usr/bin/arm-none-eabi-as | |
sudo ln -s ../../bin/ccache /usr/bin/arm-none-eabi-c | |
sudo ln -s ../../bin/ccache /usr/bin/arm-none-eabi-c++filt | |
sudo ln -s ../../bin/ccache /usr/bin/arm-none-eabi-cpp | |
sudo ln -s ../../bin/ccache /usr/bin/arm-none-eabi-elfedit | |
sudo ln -s ../../bin/ccache /usr/bin/arm-none-eabi-g | |
sudo ln -s ../../bin/ccache /usr/bin/arm-none-eabi-gcc | |
sudo ln -s ../../bin/ccache /usr/bin/arm-none-eabi-gcc-10.2.1 | |
sudo ln -s ../../bin/ccache /usr/bin/arm-none-eabi-gcc-ar | |
sudo ln -s ../../bin/ccache /usr/bin/arm-none-eabi-gcc-nm | |
sudo ln -s ../../bin/ccache /usr/bin/arm-none-eabi-gcc-ranlib | |
sudo ln -s ../../bin/ccache /usr/bin/arm-none-eabi-gcov | |
sudo ln -s ../../bin/ccache /usr/bin/arm-none-eabi-gcov-dump | |
sudo ln -s ../../bin/ccache /usr/bin/arm-none-eabi-gcov-tool | |
sudo ln -s ../../bin/ccache /usr/bin/arm-none-eabi-gdb-add-index | |
sudo ln -s ../../bin/ccache /usr/bin/arm-none-eabi-gdb-add-index-py | |
sudo ln -s ../../bin/ccache /usr/bin/arm-none-eabi-gdb-py | |
sudo ln -s ../../bin/ccache /usr/bin/arm-none-eabi-gprof | |
sudo ln -s ../../bin/ccache /usr/bin/arm-none-eabi-ld | |
sudo ln -s ../../bin/ccache /usr/bin/arm-none-eabi-ld.bfd | |
sudo ln -s ../../bin/ccache /usr/bin/arm-none-eabi-lto-dump | |
sudo ln -s ../../bin/ccache /usr/bin/arm-none-eabi-nm | |
sudo ln -s ../../bin/ccache /usr/bin/arm-none-eabi-objcopy | |
sudo ln -s ../../bin/ccache /usr/bin/arm-none-eabi-objdump | |
sudo ln -s ../../bin/ccache /usr/bin/arm-none-eabi-ranlib | |
sudo ln -s ../../bin/ccache /usr/bin/arm-none-eabi-readelf | |
sudo ln -s ../../bin/ccache /usr/bin/arm-none-eabi-size | |
sudo ln -s ../../bin/ccache /usr/bin/arm-none-eabi-strings | |
sudo ln -s ../../bin/ccache /usr/bin/arm-none-eabi-strip | |
sudo ln -s ../../bin/ccache /usr/bin/riscv-none-embed-gcc | |
- name: Setup Python | |
if: ${{ steps.check_watch.outputs.RUN_TEST == '1' }} | |
uses: actions/[email protected] | |
with: | |
python-version: '3.10' | |
- name: Install packages | |
if: ${{ steps.check_watch.outputs.RUN_TEST == '1' }} | |
run: pip install -r .github/workflows/scripts/requirements.txt | |
# Runs a set of commands using the runners shell | |
- name: Build_Examples | |
if: ${{ steps.check_watch.outputs.RUN_TEST == '1' }} | |
run: | | |
# This environment variable is required for the SBTs. | |
# It must be set to the absolute path inside the Github repo. | |
export MAXIM_SBT_DIR=$(pwd)/Tools/SBT | |
# Set MAXIM_PATH to limit warnings | |
export MAXIM_PATH=$(pwd) | |
python .github/workflows/scripts/build.py |