From 707866544419401cdddd7731ae6195649679ad8d Mon Sep 17 00:00:00 2001 From: Jake Carter Date: Sat, 15 Jul 2023 17:37:43 -0500 Subject: [PATCH] Add regression test for make 3.81 --- .github/workflows/Build_Examples.yml | 112 +++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) diff --git a/.github/workflows/Build_Examples.yml b/.github/workflows/Build_Examples.yml index 16143662c5e..46028f416db 100644 --- a/.github/workflows/Build_Examples.yml +++ b/.github/workflows/Build_Examples.yml @@ -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 +