Use msys clang toolchain to build windows binaries

pull/266/head
Cheng Shao 2 years ago committed by Dan Gohman
parent f4a0844656
commit 5f28fa9293

@ -42,42 +42,45 @@ jobs:
winbuild: winbuild:
name: Windows Build name: Windows Build
runs-on: windows-2019 runs-on: windows-latest
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
arch: include:
- x64 - arch: x64
- x86 sys: clang64
env: env: clang-x86_64
MSYS2_PATH_TYPE: inherit - arch: x86
MSYSTEM: MINGW64 sys: clang32
CC: cl env: clang-i686
CXX: cl
NINJA_FLAGS: -v
steps: steps:
- uses: actions/checkout@v1 - uses: msys2/setup-msys2@v2
with:
install: >-
base-devel
git
mingw-w64-${{ matrix.env }}-cmake
mingw-w64-${{ matrix.env }}-ninja
mingw-w64-${{ matrix.env }}-toolchain
msystem: ${{ matrix.sys }}
update: true
release: false
- uses: actions/checkout@v3
with: with:
fetch-depth: 0
submodules: true submodules: true
- name: Install ninja (Windows)
run: choco install ninja
- name: Build - name: Build
shell: cmd shell: msys2 {0}
# vcvarsall.bat need explicit Visual Studio 2019 to be installed
run: | run: |
set "HOME=%CD%" make package
set CL_ARCH=${{ fromJson('{ "x86": "amd64_x86", "x64": "amd64" }')[matrix.arch] }} make check
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" %CL_ARCH% - name: Does it work sans msys2?
C:\msys64\usr\bin\bash.exe --login -c "make package"
- name: Run the testsuite
shell: cmd
run: | run: |
set "HOME=%CD%" C:\wasi-sdk\bin\clang.exe --version
set CL_ARCH=${{ fromJson('{ "x86": "amd64_x86", "x64": "amd64" }')[matrix.arch] }} C:\wasi-sdk\bin\llvm-ar.exe --version
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" %CL_ARCH% C:\wasi-sdk\bin\wasm-ld.exe --version
C:\msys64\usr\bin\bash.exe --login -c "make check"
- name: Upload artifacts - name: Upload artifacts
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v3
with: with:
# Upload the dist folder. Give it a name according to the OS it was built for. # Upload the dist folder. Give it a name according to the OS it was built for.
name: ${{ format( 'dist-windows-latest-{0}', matrix.arch) }} name: ${{ format( 'dist-windows-latest-{0}', matrix.arch) }}

Loading…
Cancel
Save