diff --git a/.github/actions/shader/action.yml b/.github/actions/shader/action.yml index e656395..af03b5a 100644 --- a/.github/actions/shader/action.yml +++ b/.github/actions/shader/action.yml @@ -16,7 +16,15 @@ runs: - name: install DXC uses: napokue/setup-dxc@v1.0.0 - - name: run shader compilers - run: ninja + - name: 'run shader compilers: piet-gpu' + run: mkdir gen && ninja shell: pwsh working-directory: piet-gpu/shader + - name: 'run shader compilers: tests' + run: mkdir gen && ninja + shell: pwsh + working-directory: tests/shader + - name: 'run shader compilers: piet-gpu-hal/examples' + run: mkdir gen && ninja + shell: pwsh + working-directory: piet-gpu-hal/examples/shader diff --git a/.github/workflows/push-shader.yml b/.github/workflows/push-shader.yml index bf16952..6cdfe38 100644 --- a/.github/workflows/push-shader.yml +++ b/.github/workflows/push-shader.yml @@ -18,20 +18,21 @@ jobs: run: | git fetch origin main git switch main + git config user.name "Commit by GitHub Action" + git config user.email "nobody@example.com" git merge dev -m "merge from dev branch" + sed -i '' '/shader\/gen/d' .gitignore + git add .gitignore git rm -r --ignore-unmatch piet-gpu/shader/gen - mkdir piet-gpu/shader/gen + git rm -r --ignore-unmatch tests/shader/gen + git rm -r --ignore-unmatch piet-gpu-hal/examples/shader/gen - uses: ./.github/actions/shader - - name: commit - id: commit + - name: commit compiled shaders continue-on-error: true run: | git add piet-gpu/shader/gen - git config user.name "Commit by GitHub Action" - git config user.email "nobody@example.com" + git add tests/shader/gen + git add piet-gpu-hal/examples/shader/gen git commit -m "commit compiled shaders" - name: push - if: steps.commit.outcome == 'success' - run: | - git show-ref - git push origin main + run: git push origin main diff --git a/.github/workflows/shader.yml b/.github/workflows/shader.yml index 205cd47..a5972bc 100644 --- a/.github/workflows/shader.yml +++ b/.github/workflows/shader.yml @@ -9,5 +9,4 @@ jobs: name: compile shaders steps: - uses: actions/checkout@v3 - - run: mkdir piet-gpu/shader/gen - uses: ./.github/actions/shader