Add a MinGW release to our CI
This commit extends our CI to produce release artifacts for the x86_64-pc-windows-gnu target. This was originally motivate by the [go extension] where it looks like the Go toolchain primarily interoperates with MinGW, not with MSVC natively. The support here turned out to be quite trivial, largely just adding the configuration to make the release. I don't think we should necessarily commit to this being a primary platform for Wasmtime at this time though. If the support here regresses in the future for a difficult-to-fix reason I think it would be fine to back out the platform at least temporarily. Note that this does not add a full test suite for the MinGW target, only a release builder. This release builder does run tests, but not with full debug assertions enabled. [go extension]: https://github.com/bytecodealliance/wasmtime-go/issues/3 Closes #1535
This commit is contained in:
37
.github/workflows/main.yml
vendored
37
.github/workflows/main.yml
vendored
@@ -269,10 +269,17 @@ jobs:
|
|||||||
include:
|
include:
|
||||||
- build: x86_64-linux
|
- build: x86_64-linux
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
|
rust: stable
|
||||||
- build: x86_64-macos
|
- build: x86_64-macos
|
||||||
os: macos-latest
|
os: macos-latest
|
||||||
|
rust: stable
|
||||||
- build: x86_64-windows
|
- build: x86_64-windows
|
||||||
os: windows-latest
|
os: windows-latest
|
||||||
|
rust: stable
|
||||||
|
- build: x86_64-mingw
|
||||||
|
os: windows-latest
|
||||||
|
target: x86_64-pc-windows-gnu
|
||||||
|
rust: nightly # needs rust-lang/rust#69351 to ride to stable
|
||||||
- build: aarch64-linux
|
- build: aarch64-linux
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
rust: stable
|
rust: stable
|
||||||
@@ -286,9 +293,18 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- uses: ./.github/actions/install-rust
|
- uses: ./.github/actions/install-rust
|
||||||
|
with:
|
||||||
|
toolchain: ${{ matrix.rust }}
|
||||||
- uses: ./.github/actions/binary-compatible-builds
|
- uses: ./.github/actions/binary-compatible-builds
|
||||||
if: matrix.target == ''
|
if: matrix.target == ''
|
||||||
|
|
||||||
|
- name: Configure Cargo target
|
||||||
|
run: |
|
||||||
|
echo ::set-env name=CARGO_BUILD_TARGET::${{ matrix.target }}
|
||||||
|
rustup target add ${{ matrix.target }}
|
||||||
|
shell: bash
|
||||||
|
if: matrix.target != ''
|
||||||
|
|
||||||
- name: Install cross-compilation tools
|
- name: Install cross-compilation tools
|
||||||
run: |
|
run: |
|
||||||
set -ex
|
set -ex
|
||||||
@@ -309,9 +325,7 @@ jobs:
|
|||||||
upcase=$(echo ${{ matrix.target }} | awk '{ print toupper($0) }' | sed 's/-/_/g')
|
upcase=$(echo ${{ matrix.target }} | awk '{ print toupper($0) }' | sed 's/-/_/g')
|
||||||
echo ::set-env name=CARGO_TARGET_${upcase}_RUNNER::$HOME/qemu/bin/${{ matrix.qemu }}
|
echo ::set-env name=CARGO_TARGET_${upcase}_RUNNER::$HOME/qemu/bin/${{ matrix.qemu }}
|
||||||
echo ::set-env name=CARGO_TARGET_${upcase}_LINKER::${{ matrix.gcc }}
|
echo ::set-env name=CARGO_TARGET_${upcase}_LINKER::${{ matrix.gcc }}
|
||||||
echo ::set-env name=CARGO_BUILD_TARGET::${{ matrix.target }}
|
if: matrix.target != '' && matrix.os == 'ubuntu-latest'
|
||||||
rustup target add ${{ matrix.target }}
|
|
||||||
if: matrix.target != ''
|
|
||||||
|
|
||||||
# Install wasm32-wasi target in order to build wasi-common's integration
|
# Install wasm32-wasi target in order to build wasi-common's integration
|
||||||
# tests
|
# tests
|
||||||
@@ -348,7 +362,10 @@ jobs:
|
|||||||
if: matrix.os != 'windows-latest' && matrix.target != ''
|
if: matrix.os != 'windows-latest' && matrix.target != ''
|
||||||
- run: cp target/release/wasmtime.exe dist
|
- run: cp target/release/wasmtime.exe dist
|
||||||
shell: bash
|
shell: bash
|
||||||
if: matrix.os == 'windows-latest'
|
if: matrix.build == 'x86_64-windows'
|
||||||
|
- run: cp target/x86_64-pc-windows-gnu/release/wasmtime.exe dist
|
||||||
|
shell: bash
|
||||||
|
if: matrix.build == 'x86_64-mingw'
|
||||||
|
|
||||||
# Move libwasmtime dylib to dist folder
|
# Move libwasmtime dylib to dist folder
|
||||||
- run: cp target/release/libwasmtime.{so,a} dist
|
- run: cp target/release/libwasmtime.{so,a} dist
|
||||||
@@ -359,7 +376,10 @@ jobs:
|
|||||||
if: matrix.os == 'macos-latest'
|
if: matrix.os == 'macos-latest'
|
||||||
- run: cp target/release/wasmtime.{dll,lib,dll.lib} dist
|
- run: cp target/release/wasmtime.{dll,lib,dll.lib} dist
|
||||||
shell: bash
|
shell: bash
|
||||||
if: matrix.os == 'windows-latest'
|
if: matrix.build == 'x86_64-windows'
|
||||||
|
- run: cp target/x86_64-pc-windows-gnu/release/{wasmtime.dll,libwasmtime.a} dist
|
||||||
|
shell: bash
|
||||||
|
if: matrix.build == 'x86_64-mingw'
|
||||||
|
|
||||||
# Make a Windows MSI installer if we're on Windows
|
# Make a Windows MSI installer if we're on Windows
|
||||||
- run: |
|
- run: |
|
||||||
@@ -368,7 +388,7 @@ jobs:
|
|||||||
"$WIX/bin/light" -out dist/installer.msi target/wasmtime.wixobj -ext WixUtilExtension
|
"$WIX/bin/light" -out dist/installer.msi target/wasmtime.wixobj -ext WixUtilExtension
|
||||||
rm dist/installer.wixpdb
|
rm dist/installer.wixpdb
|
||||||
shell: bash
|
shell: bash
|
||||||
if: matrix.os == 'windows-latest'
|
if: matrix.build == 'x86_64-windows'
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v1
|
- uses: actions/upload-artifact@v1
|
||||||
with:
|
with:
|
||||||
@@ -416,6 +436,10 @@ jobs:
|
|||||||
uses: actions/download-artifact@v1
|
uses: actions/download-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: bins-x86_64-windows
|
name: bins-x86_64-windows
|
||||||
|
- name: Download x86_64 Windows MinGW binaries
|
||||||
|
uses: actions/download-artifact@v1
|
||||||
|
with:
|
||||||
|
name: bins-x86_64-mingw
|
||||||
|
|
||||||
- name: Assemble gh-pages
|
- name: Assemble gh-pages
|
||||||
run: |
|
run: |
|
||||||
@@ -449,6 +473,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
./ci/build-tarballs.sh x86_64-linux
|
./ci/build-tarballs.sh x86_64-linux
|
||||||
./ci/build-tarballs.sh x86_64-windows .exe
|
./ci/build-tarballs.sh x86_64-windows .exe
|
||||||
|
./ci/build-tarballs.sh x86_64-mingw .exe
|
||||||
./ci/build-tarballs.sh x86_64-macos
|
./ci/build-tarballs.sh x86_64-macos
|
||||||
./ci/build-tarballs.sh aarch64-linux
|
./ci/build-tarballs.sh aarch64-linux
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ mv bins-$platform/wasmtime$exe tmp/$bin_pkgname
|
|||||||
chmod +x tmp/$bin_pkgname/wasmtime$exe
|
chmod +x tmp/$bin_pkgname/wasmtime$exe
|
||||||
mktarball $bin_pkgname
|
mktarball $bin_pkgname
|
||||||
|
|
||||||
if [ "$exe" = ".exe" ]; then
|
if [ -f bins-$platform/installer.msi ]; then
|
||||||
mv bins-$platform/installer.msi dist/$bin_pkgname.msi
|
mv bins-$platform/installer.msi dist/$bin_pkgname.msi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user