Skip to content

Commit

Permalink
Reworked pom files to pull in correct dependencies for the release ve…
Browse files Browse the repository at this point in the history
…rsion (even if old)
  • Loading branch information
stanbrub committed Oct 9, 2024
1 parent 6bdc30c commit ec13b8e
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 25 deletions.
40 changes: 40 additions & 0 deletions .github/distro/dependency-pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<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>
<groupId>io.deephaven</groupId>
<artifactId>deephaven-benchmark-distro</artifactId>
<version>1.0-SNAPSHOT</version>
<name>deephaven-benchmark-distro</name>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.8.0</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/dependencies</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>io.deephaven</groupId>
<artifactId>deephaven-benchmark</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
11 changes: 9 additions & 2 deletions .github/scripts/make-release-distro.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,17 @@ echo "**What's Changed**" > ${RELEASE_NOTES}
git log --oneline ${PREVIOUS_REF}...${RELEASE_COMMIT} | sed -e 's/^/- /' >> ${RELEASE_NOTES}
echo "**Full Changelog**: https://github.com/deephaven/benchmark/compare/${PREVIOUS_TAG}...${RELEASE_TAG}" >> ${RELEASE_NOTES}

# Build the Distro for running standard benchmarks
# Generate dependencies directory
mkdir -p ${DISTRO_DEST}/libs/
cp ${DISTRO_SOURCE}/dependency-pom.xml ${DISTRO_DEST}
(cd ${DISTRO_DEST}; mvn -B install --file dependency-pom.xml)
mv ${DISTRO_DEST}/target/dependencies/* ${DISTRO_DEST}/libs/
rm -rf ${DISTRO_DEST}/target
rm ${DISTRO_DEST}/libs/deephaven-benchmark-*SNAPSHOT*.jar

# Build the Distro for running standard benchmarks
cp ${DISTRO_SOURCE}/* ${DISTRO_DEST}
cp target/dependencies/* ${DISTRO_DEST}/libs
rm ${DISTRO_DEST}/dependency-pom.xml
cp target/deephaven-benchmark-1.0-SNAPSHOT.jar ${DISTRO_DEST}/libs/${ARTIFACT}.jar
cp target/deephaven-benchmark-1.0-SNAPSHOT-tests.jar ${DISTRO_DEST}/libs/${ARTIFACT}-tests.jar
echo "VERSION=${RELEASE_VERSION}" > ${DISTRO_DEST}/.env
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish-benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,16 @@ jobs:
working-directory: ${{env.RELEASE_DIR}}
run: git checkout ${COMMIT}

- name: Build Release Artifacts
- name: Pull and Start Docker Image
working-directory: ${{env.RELEASE_DIR}}
run: |
cp ${LATEST_DIR}/.github/resources/integration-docker-compose.yml docker-compose.yml
docker compose up -d
- name: Build Release Artifacts
- name: Build and Install Release Artifacts Locally
working-directory: ${{env.RELEASE_DIR}}
run: |
mvn -B verify --file pom.xml
mvn -B install --file pom.xml
docker compose down
- name: Build Release Distro and Notes
Expand Down
20 changes: 0 additions & 20 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,26 +57,6 @@
<target>21</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.8.0</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/dependencies</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
Expand Down

0 comments on commit ec13b8e

Please sign in to comment.