Skip to content

Commit

Permalink
Add regression test for make 3.81
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake-Carter committed Jul 15, 2023
1 parent f1848be commit 7078665
Showing 1 changed file with 112 additions and 0 deletions.
112 changes: 112 additions & 0 deletions .github/workflows/Build_Examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,3 +184,115 @@ jobs:
export MAXIM_PATH=$(pwd)
python .github/workflows/scripts/build.py
(Regression Test) Make 3.80:
runs-on:
- ubuntu-latest
steps:
- 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 Make 3.81
if: ${{ steps.check_watch.outputs.RUN_TEST == '1' }}
run: |
# Install RISCV tools (updated)
cd /home/runner
wget https://ftp.gnu.org/gnu/make/make-3.81.tar.gz
tar -xvf make-3.81.tar.gz
./configure
make
make install --prefix=/home/runner/make-3.81
# Add 3.81 to path
echo "/home/runner/make-3.81/bin" >> $GITHUB_PATH

0 comments on commit 7078665

Please sign in to comment.