Skip to content

Commit

Permalink
Add benchmarks workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
abarciauskas-bgse committed Sep 17, 2023
1 parent c18b1cd commit 2f47932
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/benchmarking.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Run Benchmarks

on:
push:
branches:
- feat/run-benchmarks # Trigger the workflow on push to the main branch

jobs:
benchmark:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Clone tile-benchmarking repository
run: git clone https://github.com/developmentseed/tile-benchmarking.git

- name: Set working directory to 03-e2e
run: cd tile-benchmarking/03-e2e

- name: Install requirements
run: pip install -r requirements.txt

- name: Run locus on files in urls/ directory and store results in results/
run: |
mkdir -p results
for file in urls/*; do
locus -i 10 --urls-file=$file > --csv=results/$(basename ${file%.*})
done
working-directory: tile-benchmarking/03-e2e

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::444055461661:role/github-actions-role-eodc
role-session-name: samplerolesession
aws-region: us-west-2

- name: Upload results to S3
run: |
current_time=$(date +"%Y-%m-%d_%H-%M-%S")
aws s3 cp results/ s3://nasa-eodc-data-store/tile-benchmarking-results/latest/ --recursive
aws s3 cp results/ s3://nasa-eodc-data-store/tile-benchmarking-results/$current_time/ --recursive
working-directory: tile-benchmarking/03-e2e

0 comments on commit 2f47932

Please sign in to comment.