Skip to content

Commit

Permalink
test windows
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed Jul 22, 2024
1 parent 08be2d4 commit 130e001
Showing 1 changed file with 24 additions and 18 deletions.
42 changes: 24 additions & 18 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- 'wasi-sdk-*'
branches:
- main
- windows-tests

pull_request:
workflow_dispatch:
Expand All @@ -27,23 +28,32 @@ jobs:

- artifact: arm64-macos
os: macos-latest
llvm_cmake_flags: -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 -DCMAKE_OSX_ARCHITECTURES=arm64
rust_target: aarch64-apple-darwin
env:
WASI_SDK_CI_TOOLCHAIN_LLVM_CMAKE_ARGS: >
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.12
-DCMAKE_OSX_ARCHITECTURES=arm64
- artifact: x86_64-macos
os: macos-latest
llvm_cmake_flags: -DCMAKE_OSX_DEPLOYMENT_TARGET=10.12 -DCMAKE_OSX_ARCHITECTURES=x86_64
rust_target: x86_64-apple-darwin
skip_sysroot: 1
env:
WASI_SDK_CI_SKIP_SYSROOT: 1
WASI_SDK_CI_TOOLCHAIN_LLVM_CMAKE_ARGS: >
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.12
-DCMAKE_OSX_ARCHITECTURES=x86_64
- artifact: x86_64-windows
os: windows-latest
# TODO: tests are pretty close to passing on Windows but need some
# final tweaks, namely testing the exit code doesn't work since
# exit codes are different on Windows and the `mmap.c` tests seems
# to have issues probably with line endings. Needs someone with a
# Windows checkout tot test further.
skip_tests: 1
env:
# TODO: tests are pretty close to passing on Windows but need some
# final tweaks, namely testing the exit code doesn't work since
# exit codes are different on Windows and the `mmap.c` tests seems
# to have issues probably with line endings. Needs someone with a
# Windows checkout tot test further.
WASI_SDK_CI_SKIP_TESTS: 1

env: ${{ matrix.env || fromJSON('{}') }}
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -77,9 +87,6 @@ jobs:
# Configure CMake flags for `ci/build.sh` as necessary for each
# matrix entry.
- run: echo WASI_SDK_CI_TOOLCHAIN_LLVM_CMAKE_ARGS=${{ matrix.llvm_cmake_flags }} >> $GITHUB_ENV
if: matrix.llvm_cmake_flags != ''
shell: bash
- run: |
cmake_args=-DWASI_SDK_ARTIFACT=${{ matrix.artifact }}
if [ "${{ matrix.rust_target }}" != "" ]; then
Expand All @@ -88,12 +95,6 @@ jobs:
fi
echo WASI_SDK_CI_TOOLCHAIN_CMAKE_ARGS="$cmake_args" >> $GITHUB_ENV
shell: bash
- run: echo WASI_SDK_CI_SKIP_SYSROOT=1 >> $GITHUB_ENV
shell: bash
if: matrix.skip_sysroot != ''
- run: echo WASI_SDK_CI_SKIP_TESTS=1 >> $GITHUB_ENV
shell: bash
if: matrix.skip_tests != ''
# Add some extra installed software on each runner as necessary.
- name: Setup `wasmtime` for tests
Expand Down Expand Up @@ -121,6 +122,11 @@ jobs:
# Use a shorter build directory than the default on Windows to avoid
# hitting path length and command line length limits. See
# WebAssembly/wasi-libc#514
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
with:
msbuild-architecture: x64
if: runner.os == 'Windows'
- name: Build and test (Windows)
run: |
./ci/build.sh C:/wasi-sdk
Expand Down

0 comments on commit 130e001

Please sign in to comment.