Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: cache sdk #155

Merged
merged 1 commit into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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