Skip to content

Commit

Permalink
Merge pull request #4 from neu-se/fix-workflow
Browse files Browse the repository at this point in the history
update model options; update upload-artifact action
  • Loading branch information
franktip authored Dec 18, 2024
2 parents 042396d + 429710a commit ed2b10a
Showing 1 changed file with 52 additions and 22 deletions.
74 changes: 52 additions & 22 deletions .github/workflows/experiment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ on:
- "mixtral-8x22b"
- "llama-2-13b-chat"
- "llama-2-70b-chat"
default: "codellama-34b-instruct"
default: "gpt-4o-mini"
# rateLimit:
# description: "number of milliseconds between requests sent to the LLM"
# type: number
# default: 0
benchmarkMode:
description: "use custom rate limiting for benchmarking"
type: "boolean"
default: true
default: false
maxNrPrompts:
type: number
description: "maximum number of prompts to produce"
Expand Down Expand Up @@ -180,9 +180,9 @@ jobs:
cp LLMorpheusOutput.txt ${{ matrix.package.name }}/${{ matrix.package.name }}/LLMorpheusOutput.txt
- name: Upload mutants info
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: mutants
name: mutants-${{ matrix.package.name }}
path: ${{ matrix.package.name }}/${{ matrix.package.name }}

- name: install stryker-js into benchmark and run stryker (precomputed mutators)
Expand All @@ -195,10 +195,6 @@ jobs:
STRYKER_OPTIONS="${{ needs.setup.outputs.strykerOptions }}"
(time npx stryker run $STRYKER_OPTIONS --usePrecomputed --mutate $STRYKER_FILES) 2>&1 | tee -a StrykerOutput.txt
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}

- name: extract summary from StrykerOutput.txt
run: |
cd ${{ matrix.package.name }}
Expand All @@ -214,7 +210,7 @@ jobs:
cp StrykerInfo.json results/results-${{ matrix.package.name }}/StrykerInfo.json
- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: results-${{ matrix.package.name }}
path: ${{ matrix.package.name }}/results
Expand All @@ -227,7 +223,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download output zips
uses: actions/download-artifact@v4.1.7
uses: actions/download-artifact@v4
- name: Combine outputs
run: |
mkdir results
Expand All @@ -244,7 +240,7 @@ jobs:
cd ../..
- name: Upload combined output files
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: results
path: results/results
Expand All @@ -257,23 +253,57 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Download combined output files
uses: actions/[email protected]


# download all files mutants-*
- name: Download LLMorpheus results
uses: actions/download-artifact@v4
with:
name: results
path: results
pattern: "mutants-*"

- name: Download combined output files
uses: actions/[email protected]
# download all files results-*
- name: Download Stryker results
uses: actions/download-artifact@v4
with:
name: mutants
path: mutants
pattern: "results-*"

# move all mutants-* directories into a single directory
- name: Gather mutants into single directory
run: |
mkdir mutants
cd mutants
for mutants in ../mutants-*
do
# remove "../mutants-" prefix, leaving only the benchmark name
name=$(echo $mutants | sed 's/\.\.\/mutants-//')
echo "moving $mutants to $name"
mv $mutants/* $name
done
cd ..
# move all results-* directories into a single directory
- name: Gather Stryker results into single directory
run: |
mkdir results
cd results
for results in ../results-*
do
# extract benchmark name
name=$(echo $results | sed 's/\.\.\/results-//')
echo "moving $results to $name"
mv $results/* $name
done
cd ..
- name: Check out llm-mutation-testing
uses: actions/checkout@v3
with:
path: llm-mutation-testing
path: llm-mutation-testing

- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}

- name: Generate report
run: |
cd llm-mutation-testing
Expand All @@ -289,7 +319,7 @@ jobs:
more report.md > $GITHUB_STEP_SUMMARY
- name: Upload report
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: report.md
path: llm-mutation-testing/report.md
Expand All @@ -300,7 +330,7 @@ jobs:
node .github/generateLatexTable.js "$title" ../results ../mutants > table.tex
- name: Upload table
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: table.tex
path: llm-mutation-testing/table.tex
Expand Down

0 comments on commit ed2b10a

Please sign in to comment.