mirror of
https://github.com/KhronosGroup/SPIRV-Cross.git
synced 2024-11-09 22:00:05 +00:00
Add GitHub Actions script.
This commit is contained in:
parent
60aa24566e
commit
2e000a0be4
54
.github/workflows/main.yml
vendored
Normal file
54
.github/workflows/main.yml
vendored
Normal file
@ -0,0 +1,54 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ opened, synchronize, reopened ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: "Build ${{ matrix.platform }}"
|
||||
strategy:
|
||||
matrix:
|
||||
platform: [windows-latest, ubuntu-16.04, ubuntu-18.04, ubuntu-20.04, macos-latest]
|
||||
env:
|
||||
PARALLEL: -j 2
|
||||
|
||||
runs-on: "${{ matrix.platform }}"
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Pull glslang / SPIRV-Tools
|
||||
shell: bash
|
||||
working-directory: ${{github.workspace}}
|
||||
run: ./checkout_glslang_spirv_tools.sh
|
||||
|
||||
- name: Build glslang / SPIRV-Tools
|
||||
shell: bash
|
||||
working-directory: ${{github.workspace}}
|
||||
run: ./build_glslang_spirv_tools.sh Release
|
||||
|
||||
- name: Configure SPIRV-Cross
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DSPIRV_CROSS_WERROR=ON -DSPIRV_CROSS_MISC_WARNINGS=ON -DSPIRV_CROSS_SHARED=ON -DCMAKE_INSTALL_PREFIX=output -DCMAKE_BUILD_TYPE=Release -DSPIRV_CROSS_ENABLE_TESTS=ON
|
||||
|
||||
- name: Build SPIRV-Cross
|
||||
shell: bash
|
||||
working-directory: ${{github.workspace}}/build
|
||||
run: |
|
||||
cmake --build . --config Release
|
||||
cmake --build . --config Release --target install
|
||||
|
||||
- name: Test SPIRV-Cross
|
||||
shell: bash
|
||||
working-directory: ${{github.workspace}}/build
|
||||
run: ctest --verbose -C Release
|
||||
|
@ -100,10 +100,11 @@ def get_shader_stats(shader):
|
||||
def print_msl_compiler_version():
|
||||
try:
|
||||
subprocess.check_call(['xcrun', '--sdk', 'iphoneos', 'metal', '--version'])
|
||||
print('...are the Metal compiler characteristics.\n') # display after so xcrun FNF is silent
|
||||
print('... are the Metal compiler characteristics.\n') # display after so xcrun FNF is silent
|
||||
except OSError as e:
|
||||
if (e.errno != errno.ENOENT): # Ignore xcrun not found error
|
||||
raise
|
||||
print('Metal SDK is not present.\n')
|
||||
except subprocess.CalledProcessError:
|
||||
pass
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user