Skip to content

Commit

Permalink
Merge branch 'master' into vue-no-typecheck
Browse files Browse the repository at this point in the history
  • Loading branch information
vdiez committed Mar 18, 2024
2 parents 75ff39d + a80fbba commit da588aa
Show file tree
Hide file tree
Showing 6 changed files with 482 additions and 1 deletion.
24 changes: 24 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,30 @@ css_ruling_task:
diff_artifacts:
path: '**/target/actual/**/*'

perf_task:
timeout_in: 240m
depends_on:
- build
only_if: $CIRRUS_CRON == "nightly"
eks_container:
<<: *CONTAINER_DEFINITION
image: ${CIRRUS_AWS_ACCOUNT}.dkr.ecr.eu-central-1.amazonaws.com/base:j17-latest
env:
CIRRUS_CLONE_DEPTH: 10
SONARSOURCE_QA: true
<<: *MAVEN_CACHE
submodules_script:
- git submodule update --init
perf_script:
- source cirrus-env QA
- source set_maven_build_version $BUILD_NUMBER
- cd its/perf
- mvn -B -e -V package
- mvn exec:exec -Dexec.args="-classpath %classpath org.sonar.javascript.it.perf.SonarJsPerfBenchmark LATEST_RELEASE $BUILD_NUMBER"
perf_result_artifacts:
path: 'its/perf/target/perf.txt'
cleanup_before_cache_script: cleanup_maven_repository

promote_task:
depends_on:
- ws_scan
Expand Down
167 changes: 167 additions & 0 deletions its/perf/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>


<parent>
<groupId>org.sonarsource.javascript</groupId>
<artifactId>javascript-its</artifactId>
<version>10.13.0-SNAPSHOT</version>
</parent>

<artifactId>javascript-it-perf</artifactId>

<name>JavaScript :: IT :: Perf</name>
<organization>
<name>SonarSource</name>
<url>http://www.sonarsource.com</url>
</organization>


<dependencies>
<dependency>
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-core</artifactId>
<version>${jmh.version}</version>
</dependency>
<dependency>
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-generator-annprocess</artifactId>
<version>${jmh.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.sonarsource.orchestrator</groupId>
<artifactId>sonar-orchestrator-junit5</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.36</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</dependency>
</dependencies>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

<!--
JMH version to use with this project.
-->
<jmh.version>1.37</jmh.version>

<!--
Name of the benchmark Uber-JAR to generate.
-->
<uberjar.name>benchmarks</uberjar.name>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<finalName>${uberjar.name}</finalName>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>org.openjdk.jmh.Main</mainClass>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
</transformers>
<filters>
<filter>
<!--
Shading signed JARs will fail without this.
http://stackoverflow.com/questions/999489/invalid-signature-file-when-attempting-to-run-a-jar
-->
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>


<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<configuration>
<executable>java</executable>
<arguments>
<argument>-classpath</argument>
<classpath/>
<argument>org.sonar.javascript.it.perf.SonarJsPerfBenchmark</argument>
</arguments>
<additionalClasspathElements>
<additionalClasspathElement>${project.build.directory}/benchmarks.jar</additionalClasspathElement>
</additionalClasspathElements>
</configuration>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>qa</id>
<activation>
<property>
<name>env.SONARSOURCE_QA</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-plugin</id>
<phase>generate-test-resources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>${project.groupId}</groupId>
<artifactId>sonar-javascript-plugin</artifactId>
<type>sonar-plugin</type>
<classifier>multi</classifier>
<overWrite>true</overWrite>
</artifactItem>
</artifactItems>
<outputDirectory>../../sonar-plugin/sonar-javascript-plugin/target</outputDirectory>
<overWriteReleases>true</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
Loading

0 comments on commit da588aa

Please sign in to comment.