diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 70beb9a4..ab392e7e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -67,6 +67,36 @@ jobs: --target=integration_test/webcrypto_test.dart \ -d chrome - run: flutter pub run test -p vm,chrome # TODO: Enable firefox if it works + windows: + name: webcrypto on Windows Chrome / Firefox + runs-on: windows-latest + steps: + - uses: ilammy/setup-nasm@v1 + - uses: actions/checkout@v3 + - uses: subosito/flutter-action@v2 + with: + channel: 'stable' + architecture: x64 + - name: Configure Flutter + run: | + flutter config --no-analytics + flutter config --enable-windows-desktop + - run: flutter pub get + - run: flutter pub run webcrypto:setup + - run: flutter test + - run: flutter test --platform chrome + - run: flutter test integration_test/webcrypto_test.dart -d windows + working-directory: ./example + - uses: nanasess/setup-chromedriver@v2 + - name: Run integration_test with chromedriver + working-directory: ./example + shell: bash + run: | + ../tool/with-chromedriver.sh flutter drive \ + --driver=test_driver/integration_test.dart \ + --target=integration_test/webcrypto_test.dart \ + -d chrome + - run: flutter pub run test -p vm,chrome,firefox ios: name: webcrypto on iOS emulator (iPhone) runs-on: macos-latest diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index bb137fa3..8799b5aa 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -111,6 +111,10 @@ if(MSVC) ${MSVC_DISABLED_WARNINGS_LIST}) set(CMAKE_C_FLAGS "-utf-8 -W4 -WX ${MSVC_DISABLED_WARNINGS_STR}") set(CMAKE_CXX_FLAGS "-utf-8 -W4 -WX ${MSVC_DISABLED_WARNINGS_STR}") + + # Hack because Windows compilers will put .dll files in + # $CMAKE_BINARY_DIR/Debug/ folder. + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY $<1:${CMAKE_BINARY_DIR}>) endif() if(WIN32) # Windows/MSVC option from CMakeLists.txt in BoringSSL diff --git a/tool/with-chromedriver.sh b/tool/with-chromedriver.sh index 0c153d4c..1a5affcb 100755 --- a/tool/with-chromedriver.sh +++ b/tool/with-chromedriver.sh @@ -32,6 +32,12 @@ else PLATFORM='linux64' elif [[ "$OSTYPE" == "darwin"* ]]; then PLATFORM='mac64' + elif [[ "$OSTYPE" == "cygwin" ]]; then + PLATFORM='win32' + elif [[ "$OSTYPE" == "msys" ]]; then + PLATFORM='win32' + elif [[ "$OSTYPE" == "win32" ]]; then + PLATFORM='win32' else echo "Unsupported OSTYPE: $OSTYPE" exit 1