Slang Native #47
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: Slang Native | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Branch | |
| uses: actions/checkout@v4 | |
| with: | |
| path: ${{github.workspace}}/CodeSpace | |
| - name: Download Native | |
| id: download-slang-native | |
| uses: robinraju/[email protected] | |
| with: | |
| repository: 'shader-slang/slang' | |
| latest: true | |
| fileName: '*.zip' | |
| out-file-path: 'Native' | |
| - name: Copy Native | |
| working-directory: ${{github.workspace}} | |
| run: | | |
| release_name=${{steps.download-slang-native.outputs.release_name}} | |
| release_name_no_v=${release_name#v} | |
| rm -rf CodeSpace/native | |
| mkdir -p CodeSpace/native | |
| mv Native/* CodeSpace/native | |
| rm -rf Native | |
| cd CodeSpace/native | |
| mv slang-${release_name_no_v}-linux-aarch64.zip linux-arm64.zip | |
| unzip -o linux-arm64.zip -d linux-arm64 | |
| cd linux-arm64 | |
| mv lib/* . | |
| find . -type d -not -path '.' -exec rm -rf {} + | |
| ls -1 | grep -v -E '^libslang-compiler\.so\.0\.' | grep -v -E '^libslang-glslang-.*\.so$' | xargs -r rm -f | |
| for f in libslang-compiler.so.0.*; do [ -f "$f" ] && mv "$f" libslang-compiler.so; done | |
| cd .. | |
| mv slang-${release_name_no_v}-linux-x86_64.zip linux-x64.zip | |
| unzip -o linux-x64.zip -d linux-x64 | |
| cd linux-x64 | |
| mv lib/* . | |
| find . -type d -not -path '.' -exec rm -rf {} + | |
| ls -1 | grep -v -E '^libslang-compiler\.so\.0\.' | grep -v -E '^libslang-glslang-.*\.so$' | xargs -r rm -f | |
| for f in libslang-compiler.so.0.*; do [ -f "$f" ] && mv "$f" libslang-compiler.so; done | |
| cd .. | |
| mv slang-${release_name_no_v}-macos-aarch64.zip osx-arm64.zip | |
| unzip -o osx-arm64.zip -d osx-arm64 | |
| cd osx-arm64 | |
| mv lib/* . | |
| find . -type d -not -path '.' -exec rm -rf {} + | |
| ls -1 | grep -v -E '^libslang-compiler\.0\..*\.dylib$' | grep -v -E '^libslang-glslang-.*\.dylib$' | xargs -r rm -f | |
| for f in libslang-compiler.0.*.dylib; do [ -f "$f" ] && mv "$f" libslang-compiler.dylib; done | |
| cd .. | |
| mv slang-${release_name_no_v}-macos-x86_64.zip osx-x64.zip | |
| unzip -o osx-x64.zip -d osx-x64 | |
| cd osx-x64 | |
| mv lib/* . | |
| find . -type d -not -path '.' -exec rm -rf {} + | |
| ls -1 | grep -v -E '^libslang-compiler\.0\..*\.dylib$' | grep -v -E '^libslang-glslang-.*\.dylib$' | xargs -r rm -f | |
| for f in libslang-compiler.0.*.dylib; do [ -f "$f" ] && mv "$f" libslang-compiler.dylib; done | |
| cd .. | |
| mv slang-${release_name_no_v}-windows-aarch64.zip win-arm64.zip | |
| unzip -o win-arm64.zip -d win-arm64 | |
| cd win-arm64 | |
| mv bin/* . | |
| find . -type d -not -path '.' -exec rm -rf {} + | |
| ls -1 | grep -v -E '^slang-compiler\.dll$' | grep -v -E '^slang-glslang\.dll$' | xargs -r rm -f | |
| cd .. | |
| mv slang-${release_name_no_v}-windows-x86_64.zip win-x64.zip | |
| unzip -o win-x64.zip -d win-x64 | |
| cd win-x64 | |
| mv bin/* . | |
| find . -type d -not -path '.' -exec rm -rf {} + | |
| ls -1 | grep -v -E '^slang-compiler\.dll$' | grep -v -E '^slang-glslang\.dll$' | xargs -r rm -f | |
| cd .. | |
| rm -rf *.zip | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@v7 | |
| with: | |
| path: ${{github.workspace}}/CodeSpace | |
| branch: slang-native-${{steps.download-slang-native.outputs.release_name}} | |
| commit-message: 'Update Slang Native to ${{steps.download-slang-native.outputs.release_name}}' | |
| title: 'Update Slang Native to ${{steps.download-slang-native.outputs.release_name}}' | |
| body: 'This PR updates the Slang Native binaries.' | |
| labels: 'update, slang-native' |