Skip to content

Commit

Permalink
Merge branch 'deploy-bench-runner' into sample-terraform
Browse files Browse the repository at this point in the history
  • Loading branch information
emilyllim committed Oct 23, 2023
2 parents 0cafb54 + 7d9d788 commit 0211600
Show file tree
Hide file tree
Showing 5 changed files with 117 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/_generate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
name: _generate

"on":
workflow_call:
inputs:
force:
type: boolean
default: false
dry_run:
type: boolean
default: false

workflow_dispatch:
inputs:
force:
description: "Regenerate all of the derived data, even if it already exists"
type: boolean
default: false
dry_run:
description: "Dry run: Do not commit to the repo"
type: boolean
default: false

jobs:
generate-results:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: pip
- name: install dependencies
run:
python -m pip install -r requirements.txt
- name: regenerate
run:
python -m bench_runner.scripts.generate_results ${{ inputs.force == true && '--force' || '' }}
- name: Add to repo
uses: EndBug/add-and-commit@v9
if: ${{ !inputs.dry_run }}
with:
add: "['results', 'README.md', 'RESULTS.md', 'longitudinal.png', 'profiling/profiling.png', 'profiling/profiling.md']"
message: Benchmarking results for @${{ github.actor }}
50 changes: 50 additions & 0 deletions .github/workflows/_publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
name: _publish

"on":
workflow_call:
inputs:
force:
type: boolean
default: false
dry_run:
type: boolean
default: false

workflow_dispatch:
inputs:
force:
description: "Regenerate all of the derived data, even if it already exists"
type: boolean
default: false
dry_run:
description: "Dry run: Do not commit to the repo"
type: boolean
default: false

jobs:
mirror:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: private
ref: main
fetch-depth: 0
- uses: actions/checkout@v3
with:
path: public
ref: main
repository: faster-cpython/benchmarking-public
token: ${{ secrets.BENCHMARK_MIRROR }}
- name: Mirror
run: |
cd public
git remote add upstream $PWD/../private
git fetch upstream
git reset --hard upstream/main
- name: Push
if: ${{ !inputs.dry_run }}
run: |
cd public
git push origin main
19 changes: 19 additions & 0 deletions .github/workflows/benchrunner-aws.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Deploy benchrunner to AWS

on:
workflow_dispatch: {}

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Check out the repository to the runner
uses: actions/checkout@v4

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -183,3 +183,5 @@ terraform.log
*.tfvars
*.tfvars.*

# Ignore venv directory
venv/
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git+https://github.com/faster-cpython/[email protected]#egg=bench_runner

0 comments on commit 0211600

Please sign in to comment.