flash: w25q: retry ID read on fail #1612
Workflow file for this run
This file contains hidden or 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: Unit Tests | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| permissions: | |
| pull-requests: write | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Checkout Submodules Without ChibiOS | |
| run: | | |
| misc/git_scripts/common_submodule_init_without_chibios.sh | |
| - name: Discover cores | |
| if: ${{ matrix.os != 'macos-latest' }} | |
| run: lscpu | egrep 'Model name|Socket|Thread|NUMA|CPU\(s\)' | |
| - name: Install required software (ubuntu) | |
| if: ${{ matrix.os != 'macos-latest' }} | |
| run: | | |
| sudo bash misc/actions/add-ubuntu-latest-apt-mirrors.sh | |
| sudo bash misc/actions/ubuntu-install-tools.sh | |
| bash misc/actions/install-gcovr.sh | |
| bash misc/actions/install-valgrind.sh | |
| - name: Install required software (macos) | |
| if: ${{ matrix.os == 'macos-latest' }} | |
| run: | | |
| brew install mtools zip dosfstools flock coreutils | |
| - name: Print bash version | |
| run: bash --version | |
| - name: Test Java Compiler | |
| run: javac -version | |
| - name: Print Compiler version | |
| # NOTE: on mac, this is actually symlink'd to clang, not gcc, but that's ok - we want to build on both | |
| run: gcc -v | |
| - name: Handle docs-enums separately just to make github logs more readable | |
| working-directory: ./unit_tests/ | |
| run: make -j4 docs-enums | |
| - name: Handle configs separately just to make github logs more readable | |
| working-directory: ./unit_tests/ | |
| run: make -j4 config | |
| - name: Build Tests | |
| working-directory: ./unit_tests/ | |
| run: | | |
| TIMEFORMAT=%R | |
| time make -j4 COVERAGE=yes | |
| # This is expected to fail if run after UTC midnight and the last step was run before UTC midnight | |
| - name: Build Tests again to assert incremental | |
| working-directory: ./unit_tests/ | |
| run: | | |
| TIMEFORMAT=%R | |
| timeout 30s make -j4 COVERAGE=yes | |
| - name: Run Tests | |
| working-directory: ./unit_tests/ | |
| run: ASAN_OPTIONS=detect_stack_use_after_return=1 build/rusefi_test | |
| - name: Set FTP variables | |
| env: | |
| ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' | |
| run: | | |
| if [ "${{github.ref}}" = "refs/heads/master" ]; then | |
| echo "RUSEFI_SSH_SERVER=${{secrets.RUSEFI_SSH_SERVER}}" >> $GITHUB_ENV | |
| echo "RUSEFI_SSH_USER=${{secrets.RUSEFI_SSH_USER}}" >> $GITHUB_ENV | |
| echo "RUSEFI_SSH_PASS=${{secrets.RUSEFI_SSH_PASS}}" >> $GITHUB_ENV | |
| fi | |
| - name: Generate Code Coverage | |
| if: ${{ matrix.os != 'macos-latest' }} | |
| working-directory: ./unit_tests/ | |
| run: ./ci_gcov.sh | |
| - name: Report code coverage | |
| if: ${{ matrix.os != 'macos-latest' }} | |
| uses: ./.github/actions/unit-test-coverage-report | |
| with: | |
| coverage_xml_path: unit_tests/gcov_working_area/gcov/coverage.xml | |
| artifact_upload_path: ./unit_tests/gcov_working_area/gcov | |
| baseline_workflow_file: build-unit-tests.yaml | |
| artifact_name: rusefi_code_coverage.txt | |
| is_pull_request: ${{ github.event_name == 'pull_request' }} | |
| post_pr_comment: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false }} | |
| - name: upload test coverage to remote server | |
| if: ${{ matrix.os != 'macos-latest' && github.event_name == 'push' && github.ref == 'refs/heads/master' }} | |
| working-directory: ./unit_tests | |
| run: ./upload_coverage.sh | |
| # - name: Run Tests (sharded) | |
| # working-directory: ./unit_tests/ | |
| # run: bash ./run_sharded_tests.sh | |
| - name: Rebuild Tests For Valgrind | |
| # Valgrind isn't compatible with address sanitizer, so we have to rebuild the code | |
| if: ${{ matrix.os != 'macos-latest' }} | |
| working-directory: ./unit_tests/ | |
| run: | | |
| make clean | |
| ./make_for_valgrind.sh | |
| - name: Run Tests (Valgrind) | |
| if: ${{ matrix.os != 'macos-latest' }} | |
| working-directory: ./unit_tests/ | |
| run: ./run_with_valgrind.sh |