Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,23 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request_target' }}
outputs:
should-build: ${{ steps.changed-files.outputs.build_any_changed == 'true' || steps.changed-files.outputs.cpp_any_changed == 'true' }}
hlsl-should-build: ${{ steps.changed-files.outputs.hlsl_any_changed == 'true' }}
should-build: ${{ steps.changed-files.outputs.build_any_changed == 'true' || steps.changed-files.outputs.cpp_any_changed == 'true' || steps.changed-files.conclusion == 'failure' }}
hlsl-should-build: ${{ steps.changed-files.outputs.hlsl_any_changed == 'true' || steps.changed-files.conclusion == 'failure' }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}

- name: Fetch PR head and base
run: |
git fetch origin ${{ github.event.pull_request.head.sha }}
git fetch origin ${{ github.event.pull_request.base.sha }}

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v46
continue-on-error: true
with:
files_yaml: |
cpp:
Expand All @@ -71,6 +78,13 @@ jobs:
- 'features/**/Shaders/**'
base_sha: ${{ github.event.pull_request.base.sha }}
sha: ${{ github.event.pull_request.head.sha }}

- name: Fallback - Set outputs if changed-files failed
if: failure()
run: |
echo "should-build=true" >> $GITHUB_OUTPUT
echo "hlsl-should-build=true" >> $GITHUB_OUTPUT

build:
needs: [check-changes]
if: ${{ !github.event.pull_request.draft && (github.event_name != 'pull_request_target' || needs.check-changes.outputs.should-build == 'true') }}
Expand Down