Skip to content

Commit

Permalink
Fix build workflow to align with the new release structure of slang
Browse files Browse the repository at this point in the history
  • Loading branch information
saipraveenb25 committed Jul 11, 2024
1 parent a5d3a3b commit 92e9621
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: shader-slang/slang
file: 'slang-.*-win64\.zip'
file: 'slang-.*-windows-x86_64\.zip'
target: "./"
regex: true
- name: Download artifact - linux64
Expand All @@ -35,7 +35,7 @@ jobs:
- name: Copy Slang binaries and Build Package
run: |
export TAGNAME=${{ steps.download-win64.outputs.version}}
export WIN64ZIP=slang-${TAGNAME:1}-win64.zip
export WIN64ZIP=slang-${TAGNAME:1}-windows-x86_64.zip
export LINUX64ZIP=slang-${TAGNAME:1}-linux-x86_64.zip
source build-package.sh
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: shader-slang/slang
file: 'slang-.*-win64\.zip'
file: 'slang-.*-windows-x86_64\.zip'
target: "./"
regex: true
- name: Download artifact - linux64
Expand All @@ -38,7 +38,7 @@ jobs:
- name: Copy Slang binaries and Build Package
run: |
export TAGNAME=${{ steps.download-win64.outputs.version}}
export WIN64ZIP=slang-${TAGNAME:1}-win64.zip
export WIN64ZIP=slang-${TAGNAME:1}-windows-x86_64.zip
export LINUX64ZIP=slang-${TAGNAME:1}-linux-x86_64.zip
source build-package.sh
Expand Down
14 changes: 8 additions & 6 deletions build-package.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
mkdir -p ./tmp
mkdir -p ./tmp/win64
mkdir -p ./tmp/linux64
echo "extracting $WIN64ZIP"
unzip -n $WIN64ZIP -d ./tmp
unzip -n $WIN64ZIP -d ./tmp/win64
echo "extracting $LINUX64ZIP"
unzip -n $LINUX64ZIP -d ./tmp
unzip -n $LINUX64ZIP -d ./tmp/linux64

mkdir -p ./slangtorch/bin/
cp ./tmp/bin/windows-x64/release/slang.dll ./slangtorch/bin/slang.dll
cp ./tmp/bin/windows-x64/release/slangc.exe ./slangtorch/bin/slangc.exe
cp ./tmp/bin/linux-x64/release/libslang.so ./slangtorch/bin/libslang.so
cp ./tmp/bin/linux-x64/release/slangc ./slangtorch/bin/slangc
cp ./tmp/win64/bin/slang.dll ./slangtorch/bin/slang.dll
cp ./tmp/win64/bin/slangc.exe ./slangtorch/bin/slangc.exe
cp ./tmp/linux64/lib/libslang.so ./slangtorch/bin/libslang.so
cp ./tmp/linux64/bin/slangc ./slangtorch/bin/slangc
chmod +x ./slangtorch/bin/slangc

echo "content of ./slangtorch/bin/:"
Expand Down

0 comments on commit 92e9621

Please sign in to comment.