fix: arch version and reduce docker image size and caching #408
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: OpenGL | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "src/**" | |
| - "assets/shaders/**" | |
| - "config/**" | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: opengl-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| changes: | |
| name: Detect OpenGL-related changes | |
| runs-on: ubuntu-latest | |
| outputs: | |
| relevant: ${{ steps.filter.outputs.relevant }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Detect relevant file changes | |
| id: filter | |
| shell: bash | |
| run: | | |
| if [ "${{ github.event_name }}" != "pull_request" ]; then | |
| echo "relevant=true" >> "$GITHUB_OUTPUT" | |
| exit 0 | |
| fi | |
| if git diff --name-only "${{ github.event.pull_request.base.sha }}" "${{ github.event.pull_request.head.sha }}" | grep -Eq '^(src/|assets/shaders/|config/)'; then | |
| echo "relevant=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "relevant=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| shader-validation: | |
| name: Shader Validation | |
| needs: changes | |
| if: needs.changes.outputs.relevant == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 1 | |
| - name: Install glslang | |
| run: sudo apt-get update && sudo apt-get install -y glslang-tools | |
| - name: Validate GLSL shaders | |
| run: | | |
| SHADERS=$(find assets/shaders -type f \( -name "*.vert" -o -name "*.frag" -o -name "*.geom" -o -name "*.comp" \)) | |
| echo "Found $(echo "$SHADERS" | wc -l) shaders" | |
| echo "$SHADERS" | xargs glslangValidator |