Skip to content
Permalink
Browse files
Enable Arm builds (#12451)
This PR enables ARM builds on Travis. I've ported over the changes from @martin-g on reducing heap requirements for some of the tests to ensure they run well on Travis arm instances.
  • Loading branch information
2bethere committed Apr 26, 2022
1 parent 95694b5 commit 4868ef952977e2cb527900eff59188687a2b2183
Showing 6 changed files with 60 additions and 4 deletions.
@@ -186,7 +186,7 @@ jobs:
name: "(openjdk11) packaging check"
stage: Tests - phase 2
jdk: openjdk11

- <<: *package
name: "(openjdk15) packaging check"
stage: Tests - phase 2
@@ -382,6 +382,28 @@ jobs:
after_success:
- (cd web-console && travis_retry npm run codecov) # retry in case of network error

- name: "Build and test on ARM64 CPU architecture (1)"
stage: Tests - phase 2
arch: arm64-graviton2
dist: focal
virt: vm
group: edge
jdk: openjdk11
env:
- MAVEN_PROJECTS='core,indexing-hadoop,indexing-service,processing'
script: ${MVN} test -B -pl ${MAVEN_PROJECTS} -Ddruid.console.skip=true -DargLine=-Xmx3000m -T1C

- name: "Build and test on ARM64 CPU architecture (2)"
stage: Tests - phase 2
arch: arm64-graviton2
dist: focal
virt: vm
group: edge
jdk: openjdk11
env:
- MAVEN_PROJECTS='core,sql,server,services'
script: ${MVN} test -B -pl ${MAVEN_PROJECTS} -Ddruid.console.skip=true -DargLine=-Xmx3000m -T1C

- name: "web console end-to-end test"
before_install: *setup_generate_license
install: web-console/script/druid build
@@ -23,12 +23,22 @@
import org.apache.druid.java.util.common.StringUtils;
import org.apache.druid.java.util.emitter.core.Event;
import org.junit.Assert;
import org.junit.Assume;
import org.junit.Before;
import org.junit.Test;

import java.util.List;

public class MonitorsTest
{
private static final String CPU_ARCH = System.getProperty("os.arch");

@Before
public void before()
{
// Do not run the tests on ARM64. Sigar library has no binaries for ARM64
Assume.assumeFalse("aarch64".equals(CPU_ARCH));
}

@Test
public void testSetFeed()
@@ -19,12 +19,23 @@

package org.apache.druid.java.util.metrics;

import junit.framework.Assert;
import org.hyperic.sigar.Sigar;
import org.junit.Assert;
import org.junit.Assume;
import org.junit.Before;
import org.junit.Test;

public class SigarLoadTest
{
private static final String CPU_ARCH = System.getProperty("os.arch");

@Before
public void before()
{
// Do not run the tests on ARM64. Sigar library has no binaries for ARM64
Assume.assumeFalse("aarch64".equals(CPU_ARCH));
}

@Test
public void testSigarLoad()
{
@@ -19,13 +19,19 @@

package org.apache.druid.java.util.metrics;

import org.junit.Assume;
import org.junit.Test;

public class SigarPidDiscovererTest
{
private static final String CPU_ARCH = System.getProperty("os.arch");

@Test
public void simpleTest()
{
// Do not run the tests on ARM64. Sigar library has no binaries for ARM64
Assume.assumeFalse("aarch64".equals(CPU_ARCH));

// Just make sure we don't crash
SigarPidDiscoverer.instance().getPid();
}
@@ -22,12 +22,14 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
import org.apache.druid.common.config.NullHandling;
import org.apache.druid.java.util.common.Intervals;
import org.apache.druid.query.filter.SelectorDimFilter;
import org.apache.druid.segment.TestHelper;
import org.apache.druid.timeline.DataSegment;
import org.joda.time.Interval;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;

import java.util.List;
@@ -38,6 +40,12 @@
{
private static final ObjectMapper MAPPER = TestHelper.makeJsonMapper();

@Before
public void before()
{
NullHandling.initializeForTests();
}

@Test
public void testSingleIntervalSerde() throws Exception
{
@@ -20,7 +20,6 @@
package org.apache.druid.segment.virtual;

import com.google.common.collect.ImmutableList;
import org.apache.druid.java.util.common.StringUtils;
import org.apache.druid.java.util.common.granularity.Granularities;
import org.apache.druid.java.util.common.guava.Sequence;
import org.apache.druid.java.util.common.io.Closer;
@@ -262,7 +261,7 @@ public static void sanityTestVectorizedExpressionSelectors(
int rows = 0;
while (!nonVectorized.isDone()) {
Assert.assertEquals(
StringUtils.format("Failed at row %s", rows),
"Failed at row " + rows,
nonSelector.getObject(),
results.get(rows)
);

0 comments on commit 4868ef9

Please sign in to comment.