summaryrefslogtreecommitdiffstatshomepage
path: root/.github/workflows/bgfxshaders.yml
blob: bff5085e50960c22562306dff9567d87c8a3bc7b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Rebuild BGFX shaders

on:
  push:
    paths:
    - '.github/workflows/**'
    - 'src/osd/modules/render/bgfx/shaders/**'
  pull_request:
    paths:
    - '.github/workflows/**'
    - 'src/osd/modules/render/bgfx/shaders/**'

permissions:
  contents: read

jobs:
  rebuild:
    runs-on: windows-latest
    defaults:
      run:
        shell: msys2 {0}
    steps:
    - uses: msys2/setup-msys2@v2
      with:
        install: git make mingw-w64-x86_64-gcc mingw-w64-x86_64-python mingw-w64-x86_64-libc++
    - uses: actions/checkout@main
      with:
        fetch-depth: 0
    - name: Prevent make from rebuilding GLSL parser source
      run: |
        touch 3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl/glcpp/glcpp-lex.c
        touch 3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl/glcpp/glcpp-parse.c
        touch 3rdparty/bgfx/3rdparty/glsl-optimizer/src/glsl/glcpp/glcpp-parse.h
        touch 3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp
        touch 3rdparty/bgfx/3rdparty/glslang/glslang/MachineIndependent/glslang_tab.cpp.h
    - name: Build
      env:
        MINGW64: "/mingw64"
      run: make shaders
    - uses: actions/upload-artifact@main
      with:
        name: mame-bgfx-${{ github.sha }}
        path: bgfx/shaders
        if-no-files-found: error