forked from facebookincubator/cinder
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'deploy-bench-runner' into sample-terraform
- Loading branch information
Showing
5 changed files
with
117 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -183,3 +183,5 @@ terraform.log | |
*.tfvars | ||
*.tfvars.* | ||
|
||
# Ignore venv directory | ||
venv/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
git+https://github.com/faster-cpython/[email protected]#egg=bench_runner |