Add builds for windows (#11284)

Motivation:

Let's also build on windows during PR validation

Modifications:

Add build on windows during PR

Result:

Validate that all also pass on windows
This commit is contained in:
Norman Maurer 2021-05-26 12:12:11 +02:00
parent 824fe7a0eb
commit c44a8d7e1d
5 changed files with 60 additions and 0 deletions

View File

@ -31,6 +31,7 @@ jobs:
- setup: linux-x86_64-java11
- setup: linux-x86_64-java16
- setup: linux-x86_64-java11-boringssl
- setuo: windows-x86_64-java11-boringssl
steps:
- name: Download Artifacts
uses: dawidd6/action-download-artifact@v2.11.0

View File

@ -46,6 +46,43 @@ jobs:
- name: Verify with Maven
run: ./mvnw verify -B --file pom.xml -DskipTests=true
build-pr-windows:
runs-on: windows-2016
name: windows-x86_64-java11-boringssl
needs: verify-pr
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
# Cache .m2/repository
# Caching of maven dependencies
- uses: actions/cache@v2
with:
path: ~/.m2/repository
key: pr-windows-x86_64-maven-cache-${{ hashFiles('**/pom.xml') }}
restore-keys: |
pr-windows-x86_64-maven-cache-
- name: Build project
run: ./mvnw.cmd --file pom.xml clean package -Pboringssl -DskipHttp2Testsuite=true -DskipAutobahnTestsuite=true
- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v2
with:
name: test-results-windows-x86_64-java11-boringssl
path: '**/target/surefire-reports/TEST-*.xml'
- uses: actions/upload-artifact@v2
if: ${{ failure() }}
with:
name: build-pr-windows-target
path: "**/target/"
build-pr-aarch64:
name: linux-aarch64-verify-native
# The host should always be Linux

View File

@ -30,7 +30,9 @@ import io.netty.handler.codec.compression.ZlibEncoder;
import io.netty.handler.codec.compression.ZlibWrapper;
import io.netty.util.CharsetUtil;
import io.netty.util.ReferenceCountUtil;
import io.netty.util.internal.PlatformDependent;
import org.apache.commons.io.IOUtils;
import org.junit.Assume;
import org.junit.Test;
import java.io.InputStream;
@ -188,6 +190,8 @@ public class HttpContentDecoderTest {
@Test
public void testResponseBrotliDecompression() throws Throwable {
Brotli.ensureAvailability();
// Failing on windows atm
Assume.assumeFalse(PlatformDependent.isWindows());
HttpResponseDecoder decoder = new HttpResponseDecoder();
HttpContentDecoder decompressor = new HttpContentDecompressor();
HttpObjectAggregator aggregator = new HttpObjectAggregator(Integer.MAX_VALUE);
@ -220,6 +224,8 @@ public class HttpContentDecoderTest {
@Test
public void testResponseChunksBrotliDecompression() throws Throwable {
Brotli.ensureAvailability();
// Failing on windows atm
Assume.assumeFalse(PlatformDependent.isWindows());
HttpResponseDecoder decoder = new HttpResponseDecoder();
HttpContentDecoder decompressor = new HttpContentDecompressor();
HttpObjectAggregator aggregator = new HttpObjectAggregator(Integer.MAX_VALUE);

View File

@ -26,7 +26,9 @@ import io.netty.util.CharsetUtil;
import io.netty.util.NetUtil;
import io.netty.util.concurrent.ImmediateEventExecutor;
import io.netty.util.concurrent.Promise;
import io.netty.util.internal.PlatformDependent;
import org.junit.Assert;
import org.junit.Assume;
import org.junit.Test;
import java.net.PortUnreachableException;
@ -45,6 +47,9 @@ public class DatagramConnectNotExistsTest extends AbstractClientSocketTest {
}
public void testConnectNotExists(Bootstrap cb) throws Throwable {
// Currently not works on windows
// See https://github.com/netty/netty/issues/11285
Assume.assumeFalse(PlatformDependent.isWindows());
final Promise<Throwable> promise = ImmediateEventExecutor.INSTANCE.newPromise();
cb.handler(new ChannelHandler() {
@Override

View File

@ -15,10 +15,21 @@
*/
package io.netty.testsuite.transport.socket;
import io.netty.bootstrap.Bootstrap;
import io.netty.channel.socket.InternetProtocolFamily;
import io.netty.util.internal.PlatformDependent;
import org.junit.Assume;
public class DatagramMulticastIPv6Test extends DatagramMulticastTest {
@Override
public void testMulticast(Bootstrap sb, Bootstrap cb) throws Throwable {
// Not works on windows atm.
// See https://github.com/netty/netty/issues/11285
Assume.assumeFalse(PlatformDependent.isWindows());
super.testMulticast(sb, cb);
}
@Override
protected InternetProtocolFamily internetProtocolFamily() {
return InternetProtocolFamily.IPv6;