diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9efe75e2c62a4..1e40994887f4c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -66,6 +66,21 @@ jobs: - name: Set up MinGW (Windows) if: contains(matrix.os, 'windows') uses: e-t-l/setup-mingw@patch-1 + with: + version: 16.1.0 + cc: '0' + static: '0' + + - name: Select MinGW 16.1 (Windows) + if: contains(matrix.os, 'windows') + shell: pwsh + run: | + $mingwBin = Join-Path $env:ProgramData 'mingw64\mingw64\bin' + $portableBin = $mingwBin.Replace('\', '/') + $mingwBin >> $env:GITHUB_PATH + "CC=$portableBin/x86_64-w64-mingw32-gcc.exe" >> $env:GITHUB_ENV + "CXX=$portableBin/x86_64-w64-mingw32-g++.exe" >> $env:GITHUB_ENV + "MINGW_BIN=$portableBin" >> $env:GITHUB_ENV - name: Install ninja (Windows) if: contains(matrix.os, 'windows') diff --git a/wasix-release.sh b/wasix-release.sh index ed1e8aff93706..85a19e8382304 100755 --- a/wasix-release.sh +++ b/wasix-release.sh @@ -30,7 +30,15 @@ rm -rf build-release/bin/llvm-lit* # Strip binaries strip build-release/bin/* +if test "$OS" = "windows"; then + : "${MINGW_BIN:?MINGW_BIN must point to the selected MinGW bin directory}" + for dll in libgcc_s_seh-1.dll libstdc++-6.dll libwinpthread-1.dll; do + test -f "$MINGW_BIN/$dll" + cp "$MINGW_BIN/$dll" build-release/bin + done +fi + ls build-release/bin cd build-release -tar -czf $OUTFILE bin lib \ No newline at end of file +tar -czf "$OUTFILE" bin lib