Skip to content

Commit

Permalink
Don't run chained tests on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
adamw committed Jan 8, 2024
1 parent 24869a1 commit ab280da
Showing 1 changed file with 1 addition and 28 deletions.
29 changes: 1 addition & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,6 @@ jobs:
mvn package -DskipTests=true
java -Djmh.executor=VIRTUAL -jar bench/bench-java/target/benchmarks.jar -i 5 -wi 5 -f 1 -to 1100ms -r 1000ms -w 1000ms -rff jmh-result-java.json -e ".*Chained.*" | tee out.txt
echo 'output<<EOF' >> $GITHUB_OUTPUT
cat out.txt >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
- name: Run java benchmarks (chained) # on CI, running chained tests only with up to 100 channels
id: benchmark_java_chained
run: |
mvn package -DskipTests=true
java -Djmh.executor=VIRTUAL -jar bench/bench-java/target/benchmarks.jar -i 5 -wi 5 -f 1 -to 1100ms -r 1000ms -w 1000ms -rff jmh-result-java-chained.json -p channelCount=10 ".*Chained.*" | tee out.txt
echo 'output<<EOF' >> $GITHUB_OUTPUT
cat out.txt >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
Expand All @@ -61,19 +52,11 @@ jobs:
run: |
java -jar bench/bench-kotlin/target/benchmarks.jar -i 5 -wi 5 -f 1 -to 1100ms -r 1000ms -w 1000ms -rf json -rff jmh-result-kotlin.json -e ".*Chained.*" | tee out.txt
echo 'output<<EOF' >> $GITHUB_OUTPUT
cat out.txt >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
- name: Run kotlin benchmarks (chained) # on CI, running chained tests only with up to 100 channels
id: benchmark_kotlin_chained
run: |
java -jar bench/bench-kotlin/target/benchmarks.jar -i 5 -wi 5 -f 1 -to 1100ms -r 1000ms -w 1000ms -rf json -rff jmh-result-kotlin-chained.json -p channelCount=10 ".*Chained.*" | tee out.txt
echo 'output<<EOF' >> $GITHUB_OUTPUT
cat out.txt >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
- name: Merge java and kotlin benchmark results
run: jq -s '.[0] + .[1] + .[2] + .[3]' jmh-result-java.json jmh-result-java-chained.json jmh-result-kotlin.json jmh-result-kotlin-chained.json > jmh-result-all.json
run: jq -s '.[0] + .[1]' jmh-result-java.json jmh-result-kotlin.json > jmh-result-all.json
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -101,9 +84,7 @@ jobs:
uses: actions/github-script@v7
env:
JAVA_OUTPUT: ${{ steps.benchmark_java.outputs.output }}
JAVA_OUTPUT_CHAINED: ${{ steps.benchmark_java_chained.outputs.output }}
KOTLIN_OUTPUT: ${{ steps.benchmark_kotlin.outputs.output }}
KOTLIN_OUTPUT_CHAINED: ${{ steps.benchmark_kotlin_chained.outputs.output }}
with:
script: |
function extractContent(str) {
Expand All @@ -115,24 +96,16 @@ jobs:
// Only if there's a PR within which we run
if (context.issue.number) {
let javaResults = extractContent(`${process.env.JAVA_OUTPUT}`);
let javaChainedResults = extractContent(`${process.env.JAVA_OUTPUT_CHAINED}`);
let kotlinResults = extractContent(`${process.env.KOTLIN_OUTPUT}`);
let kotlinChainedResults = extractContent(`${process.env.KOTLIN_OUTPUT_CHAINED}`);
let comment = `<details><summary>Benchmark results</summary>
\`\`\`
Java:
${javaResults}
Java chained:
${javaChainedResults}
Kotlin:
${kotlinResults}
Kotlin chained:
${kotlinChainedResults}
\`\`\`
</details>`;
Expand Down

0 comments on commit ab280da

Please sign in to comment.