Skip to content

Commit

Permalink
ci: cache sdk (#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
AzHicham authored Sep 10, 2024
1 parent cf1e0a0 commit b9ce7e4
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 29 deletions.
27 changes: 19 additions & 8 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,34 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4 # v4
- name: Cache sample slide
id: cache-slide
uses: actions/cache@v4
with:
path: tests/data/
key: slides-test
- name: Cache SDK
id: cache-sdk
uses: actions/cache@v4
with:
path: /tmp/sdk/
key: cache-sdk
- name: Google Storage authentication
if: ${{ steps.cache-slide.outputs.cache-hit != 'true' || steps.cache-sdk.outputs.cache-hit != 'true' }}
uses: google-github-actions/auth@v2
with:
credentials_json: '${{ secrets.GCP_CREDENTIALS }}'
export_environment_variables: true
create_credentials_file: true
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v2
- name: Cache sample slide
id: cache-slide
uses: actions/cache@v4
with:
path: tests/data/
key: slides-test
if: ${{ steps.cache-slide.outputs.cache-hit != 'true' || steps.cache-sdk.outputs.cache-hit != 'true' }}
- name: Download sample tests data
if: steps.cache-slide.outputs.cache-hit != 'true'
run: make dl-test-images
- name: Download dependencies
if: steps.cache-sdk.outputs.cache-hit != 'true'
run: make dl-sdk
- name: Install dependencies
run: make install-deps
- uses: dtolnay/rust-toolchain@stable
Expand All @@ -56,8 +67,8 @@ jobs:
benchmark-data-dir-path: '.'
max-items-in-chart: 30
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
alert-threshold: '200%'
auto-push: ${{ github.event_name == 'push' }}
alert-threshold: '120%'
comment-on-alert: true
fail-on-alert: true
comment-always: true
Expand Down
23 changes: 17 additions & 6 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,34 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4 # v4
- name: Cache sample slide
id: cache-slide
uses: actions/cache@v4
with:
path: tests/data/
key: slides-test
- name: Cache SDK
id: cache-sdk
uses: actions/cache@v4
with:
path: /tmp/sdk/
key: cache-sdk
- name: Google Storage authentication
if: ${{ steps.cache-slide.outputs.cache-hit != 'true' || steps.cache-sdk.outputs.cache-hit != 'true' }}
uses: google-github-actions/auth@v2
with:
credentials_json: '${{ secrets.GCP_CREDENTIALS }}'
export_environment_variables: true
create_credentials_file: true
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v2
- name: Cache sample slide
id: cache-slide
uses: actions/cache@v4
with:
path: tests/data/
key: slides-test
if: ${{ steps.cache-slide.outputs.cache-hit != 'true' || steps.cache-sdk.outputs.cache-hit != 'true' }}
- name: Download sample tests data
if: steps.cache-slide.outputs.cache-hit != 'true'
run: make dl-test-images
- name: Download dependencies
if: steps.cache-sdk.outputs.cache-hit != 'true'
run: make dl-sdk
- name: Install dependencies
run: make install-deps
- uses: dtolnay/rust-toolchain@stable
Expand Down
33 changes: 22 additions & 11 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,31 +25,42 @@ jobs:

steps:
- uses: actions/checkout@v4 # v4
- name: Cache sample slide
id: cache-slide
uses: actions/cache@v4
with:
path: tests/data/
key: slides-test
- name: Cache SDK
id: cache-sdk
uses: actions/cache@v4
with:
path: /tmp/sdk/
key: cache-sdk
- name: Google Storage authentication
if: ${{ steps.cache-slide.outputs.cache-hit != 'true' || steps.cache-sdk.outputs.cache-hit != 'true' }}
uses: google-github-actions/auth@v2
with:
credentials_json: '${{ secrets.GCP_CREDENTIALS }}'
export_environment_variables: true
create_credentials_file: true
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v2
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_VERSION }}
- name: Cache sample slide
id: cache-slide
uses: actions/cache@v4
with:
path: tests/data/
key: slides-test
if: ${{ steps.cache-slide.outputs.cache-hit != 'true' || steps.cache-sdk.outputs.cache-hit != 'true' }}
- name: Download sample tests data
if: steps.cache-slide.outputs.cache-hit != 'true'
run: make dl-test-images
- name: Download dependencies
if: steps.cache-sdk.outputs.cache-hit != 'true'
run: make dl-sdk
- name: Install dependencies
run: make install-deps
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_VERSION }}
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.os }}-${{ matrix.feature }}
- name: Install dependencies ubuntu
run: make install-deps
- name: Build & Test
run: cargo test --workspace ${{ matrix.feature }} -- --nocapture --test-threads=1

Expand Down
10 changes: 6 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
.PHONY: install-deps dl-test-images

dl-sdk:
cd /tmp && \
gsutil cp gs://az-philips/sdk.zip . && \
unzip sdk.zip -d .

install-deps:
export DEBIAN_FRONTEND=noninteractive && \
sudo apt-get update -qq && \
sudo apt-get install -y --no-install-recommends unzip binutils build-essential && \
cd /tmp && \
gsutil cp gs://az-philips/sdk.zip . && \
unzip sdk.zip -d . && \
cd ./sdk && \
cd /tmp/sdk && \
chmod +x InstallPathologySDK.sh && \
sudo ./InstallPathologySDK.sh -y

Expand Down

1 comment on commit b9ce7e4

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

philips-isyntax-rs Benchmark

Benchmark suite Current: b9ce7e4 Previous: 7038c83 Ratio
philips_i2syntax_read_region_256_lvl_0 1346523 ns/iter (± 75422) 1362465 ns/iter (± 179418) 0.99
philips_i2syntax_read_region_256_lvl_1 1139564 ns/iter (± 39583) 1162260 ns/iter (± 39703) 0.98
philips_i2syntax_read_region_512_lvl_0 1541889 ns/iter (± 152716) 1563329 ns/iter (± 174752) 0.99
philips_i2syntax_read_region_512_lvl_1 7296017 ns/iter (± 262973) 7387347 ns/iter (± 262884) 0.99
philips_read_region_256_lvl_0 493832 ns/iter (± 39938) 506110 ns/iter (± 170981) 0.98
philips_read_region_256_lvl_1 1237506 ns/iter (± 40077) 1252333 ns/iter (± 58734) 0.99
philips_read_region_512_lvl_0 3512392 ns/iter (± 120668) 3570019 ns/iter (± 173346) 0.98
philips_read_region_512_lvl_1 2714711 ns/iter (± 114480) 2754567 ns/iter (± 107864) 0.99

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.