diff --git a/.github/scripts/tests_group.sh b/.github/scripts/tests_group.sh index 322376a44..d6348d003 100644 --- a/.github/scripts/tests_group.sh +++ b/.github/scripts/tests_group.sh @@ -5,19 +5,7 @@ search_dir=$1 work_dir=$2 # Find files matching timing name pattern -# This executes a bash script on the found files, wherein they are only included if the timing test file matches the parent directory name (i.e., module name) -# This includes files like seq.timing.ini but excludes seq_double_table.timing.ini -# This is important to allow for module names to be passed to make hdl_test argument -# When splitting off functionality and documentation timing.ini tests, this needs to be checked again -found_files=$(find "$search_dir" -type f -name "*.timing.ini" -exec bash -c ' - for file; do - module_name=$(basename "$(dirname "$file")") - module_timing_name=$(basename "$file") - if [[ "$module_timing_name" =~ ^"$module_name".timing.ini$ ]]; then - echo "$file" - fi - done -' bash {} +) +found_files=$(find "$search_dir" -type f -name "*.timing.ini") # Array of modules and their test count module_grps=() @@ -31,7 +19,7 @@ else # Count occurrences of [*] in the file # Min 5 char to filter descriptions and index count=$(grep -o '\[[^][]\{5,\}\]' "$file" | wc -l) - module_name=$(basename "$file" .timing.ini) + module_name=$(basename "$(dirname "$file")") module_grps+=("$module_name" "$count") done # Run python script to define job matrix based on found tests diff --git a/.github/workflows/_test.yml b/.github/workflows/_test.yml index ba4302fc0..42dc1a09b 100644 --- a/.github/workflows/_test.yml +++ b/.github/workflows/_test.yml @@ -10,12 +10,7 @@ jobs: strategy: fail-fast: false # Using generated matrix from previous job - #matrix: ${{fromJSON(inputs.matrix)}} - matrix: - modules: [fail] - outputs: - run_id: ${{steps.run_id_step.outputs.run_id}} - token: ${{steps.run_id_step.outputs.token}} + matrix: ${{fromJSON(inputs.matrix)}} runs-on: group: iris_runners container: @@ -36,11 +31,4 @@ jobs: # Run tests - name: Make python and hdl tests id: python_hdl_tests - run: cd repos/PandABlocks-fpga && ln -s CONFIG.example CONFIG && make WORK_DIR=/__w/PandABlocks-FPGA/PandABlocks-FPGA hdl_test MODULES="${{matrix.modules}}" - - - name: Print Logs - if: ${{ always() }} - env: - GH_TOKEN: ${{ github.token }} - run: curl -sS https://webi.sh/gh | sh && source ~/.config/envman/PATH.env && gh auth login && gh run view ${{ github.run_id }} --log-failed - + run: cd repos/PandABlocks-fpga && ln -s CONFIG.example CONFIG && make WORK_DIR=/__w/PandABlocks-FPGA/PandABlocks-FPGA hdl_test MODULES="${{matrix.modules}}" \ No newline at end of file diff --git a/.github/workflows/code.yml b/.github/workflows/code.yml index dd84df6ea..7bb5516ee 100644 --- a/.github/workflows/code.yml +++ b/.github/workflows/code.yml @@ -27,11 +27,11 @@ jobs: uses: ./.github/workflows/_test_matrix.yml # Python and hdl tests - test: - needs: test_matrix - uses: ./.github/workflows/_test.yml - with: - matrix: ${{needs.test_matrix.outputs.matrix}} +# test: +# needs: test_matrix +# uses: ./.github/workflows/_test.yml +# with: +# matrix: ${{needs.test_matrix.outputs.matrix}} # Optional revert on failed push workflow # undo: