Skip to content

Commit

Permalink
.github/workflows/windows.yml: copy VC runtime libraries for release
Browse files Browse the repository at this point in the history
Signed-off-by: akarin <[email protected]>
  • Loading branch information
AkarinVS committed Mar 24, 2022
1 parent 5ec91d5 commit e8cff08
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,31 @@ jobs:
set -ex
mv doc/_build/html upload/doc
- name: Setup VC commands
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{matrix.platform}}
- name: Copy VC Runtime Libraries
shell: bash
run: |
cd upload
while true; do
changed=false
for dll in *.[dD][lL][lL] *.[Ee][Xx][Ee] *.[Pp][Yy][Dd]; do
for dep in $(dumpbin -dependents "$dll" | grep -o -i '\(vc\|msvc\)[a-z0-9_-]*\.dll'); do
echo "finding $dep for $dll"
if ! test -f ./"$dep"; then
changed=true
src="$(where "$dep" | grep -i 'MSVC' | head -1)"
echo "copying $src for $dep"
test -f "$src" || exit 1
cp -f "$src" .
fi
done
done
$changed || break
done
- name: Upload release artifact
uses: actions/upload-artifact@v2
with:
Expand Down

0 comments on commit e8cff08

Please sign in to comment.