Skip to content

Commit

Permalink
NH-37575: move benchmarking to Push workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
cleverchuk committed Jun 28, 2024
1 parent 682a0c0 commit f737923
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 41 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -381,3 +381,40 @@ jobs:

- name: Docker logout
run: docker logout

benchmark:
runs-on: ubuntu-latest
needs:
- s3-stage-upload
steps:
- uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'

- name: Docker login
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $GITHUB_USERNAME --password-stdin

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Benchmark test
working-directory: benchmark
run: ./gradlew test

- uses: actions/upload-artifact@v4
with:
path: benchmark/results/release/summary.txt
name: benchmark-summary

- uses: actions/upload-artifact@v4
if: always()
with:
path: benchmark/build/reports/tests/test/
name: benchmark-test

- name: Docker logout
run: docker logout
32 changes: 0 additions & 32 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -285,35 +285,3 @@ jobs:
with:
path: arns.txt
name: arns

benchmark:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'

- name: Docker login
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $GITHUB_USERNAME --password-stdin

- name: Benchmark test
run: |
cd benchmark
./gradlew test
- uses: actions/upload-artifact@v4
with:
path: benchmark/results/release/summary.txt
name: benchmark-summary

- uses: actions/upload-artifact@v4
with:
path: benchmark/build/reports/tests/test/
name: benchmark-test

- name: Docker logout
run: docker logout
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,6 @@ public class AOTestCollectorContainer {

private static final Logger logger = LoggerFactory.getLogger(CollectorContainer.class);

static {
// needs to be executed, before Docker images are resolved
if (System.getenv("GITHUB_USERNAME") != null && System.getenv("GITHUB_TOKEN") != null) {
System.setProperty("registry.username", System.getenv("GITHUB_USERNAME"));
System.setProperty("registry.password", System.getenv("GITHUB_TOKEN"));
} else {
throw new RuntimeException("GP_USERNAME and GP_TOKEN are needed.");
}
}

public static GenericContainer<?> build(Network network) {
return new GenericContainer<>(
Expand Down

0 comments on commit f737923

Please sign in to comment.