Skip to content

Commit 3666d44

Browse files
authored
Merge pull request #24 from jburel/gha
Gha
2 parents e21cd58 + 991ec9c commit 3666d44

File tree

5 files changed

+58
-1
lines changed

5 files changed

+58
-1
lines changed

.env-gha

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
AWS_ACCESS_KEY_ID=minioadmin
2+
AWS_SECRET_ACCESS_KEY=minioadmin
3+
BUCKET=ngff-latency-benchmark
4+
HOST=nginx
5+
6+
XY=32
7+
Z=1
8+
C=1
9+
T=1
10+
XC=1
11+
ZC=1
12+
ROOT=/tmp
13+
NAME=${XY}-Z-${Z}-T-${T}-C-${C}-XYC-${XC}-ZC-${ZC}
14+
DIR=${ROOT}/${NAME}
15+
BASE=IMS_XY-${NAME}
16+
ROUNDS=20
17+
TEST_REPEATS=1
18+
19+
S3ARGS={"anon": true, "client_kwargs": {"endpoint_url": "http://${HOST}:9000"}}

.github/workflows/main.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: Build
3+
4+
on:
5+
push:
6+
pull_request:
7+
schedule:
8+
- cron: '0 0 * * 0'
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Set env
16+
run: |
17+
rm .env
18+
mv .env-gha .env
19+
- name: Build
20+
run: |
21+
docker-compose pull && docker-compose build
22+
- name: Generate
23+
run: ./generate.sh
24+
- name: Start Upload and Run benchmark
25+
run: ./test.sh
26+
- name: Check logs
27+
run: docker-compose logs
28+
if: ${{ failure() }}

benchmark/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ FROM continuumio/miniconda3
22
COPY environment.yml /tmp/environment.yml
33
RUN conda update -n base -c defaults conda
44
RUN conda env create -n benchmark -f /tmp/environment.yml
5+
RUN conda list -n benchmark
56

67
# Note: docker-compose.yml mounts this file on each run
78
# to prevent stale copies.

benchmark/benchmark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def run(self, chunk_index):
183183
try:
184184
group = zarr.group(store=store)
185185
data = group["0"]
186-
except KeyError:
186+
except (KeyError, ValueError):
187187
# This likely happens due to dim
188188
data = zarr.open(store, mode="r")
189189
chunks = data.chunks

test.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/sh
2+
set -eu
3+
4+
# start
5+
docker-compose up -d
6+
# upload
7+
docker-compose run --rm upload
8+
# run benchmark
9+
docker-compose run --rm benchmark -sv

0 commit comments

Comments
 (0)