Merge pull request #1580 from alexcrichton/mingw-ci
Add a MinGW release to our CI
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