|
45 | 45 | name: event_file
|
46 | 46 | path: ${{ github.event_path }}
|
47 | 47 |
|
48 | | - check-last-run: |
49 | | - name: Check last run |
50 | | - runs-on: ubuntu-latest |
51 | | - outputs: |
52 | | - run_tests: ${{ steps.last-run.outputs.run_tests }} |
53 | | - steps: |
54 | | - - name: Checkout |
55 | | - if: github.event_name != 'pull_request' |
56 | | - # if: github.event_name == 'schedule' |
57 | | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 |
58 | | - with: |
59 | | - ref: gh-pages |
60 | | - |
61 | | - - name: Get last run commit and compare with current commit |
62 | | - id: last-run |
63 | | - run: | |
64 | | - if [ ${{ github.event_name }} != 'pull_request' ]; then |
65 | | - # if [ ${{ github.event_name }} == 'schedule' ]; then |
66 | | - if [ -f ./runtime-test-results/test_results.json ]; then |
67 | | - last_run_commit=$(jq -r '.commit_sha' ./runtime-test-results/test_results.json) |
68 | | - last_run_failed=$(jq -r '.tests_failed' ./runtime-test-results/test_results.json) |
69 | | - else |
70 | | - last_run_commit="none" |
71 | | - last_run_failed="true" |
72 | | - fi |
73 | | - current_commit=${{ github.sha }} |
74 | | - if [ "$last_run_commit" == "$current_commit" ] && [ "$last_run_failed" == "false" ]; then |
75 | | - echo "Last run commit and current commit are the same. Skipping tests..." |
76 | | - echo "run_tests=false" >> $GITHUB_OUTPUT |
77 | | - else |
78 | | - echo "Last run commit and current commit are different or last run failed. Running tests..." |
79 | | - echo "run_tests=true" >> $GITHUB_OUTPUT |
80 | | - fi |
81 | | - else |
82 | | - echo "Not a schedule event. Continuing..." |
83 | | - echo "run_tests=true" >> $GITHUB_OUTPUT |
84 | | - fi |
85 | | - |
86 | 48 | gen-matrix:
|
87 | 49 | name: Generate matrix
|
88 | 50 | runs-on: ubuntu-latest
|
89 | | - if: ${{ needs.check-last-run.outputs.run_tests }} |
90 | | - needs: check-last-run |
91 | 51 | outputs:
|
92 | 52 | build-types: ${{ steps.set-matrix.outputs.build-types }}
|
93 | 53 | hw-types: ${{ steps.set-matrix.outputs.hw-types }}
|
|
0 commit comments