Skip to content

Update build.yml

Update build.yml #2203

Workflow file for this run

name: build
on: push
env:
DVC_TEST: "true"
FORCE_COLOR: "1"
DATASET: ${{ (github.event_name == 'schedule' && 'mnist') || github.event.inputs.dataset || 'small' }}
REVS: ${{ github.event.inputs.revs || 'main,3.53.2,3.10.0,2.58.2' }}
# run on small set of revisions for clouds
CLOUD_REVS: ${{ github.event.inputs.revs || 'main,3.53.2' }}
DVC_REPOSITORY: iterative/dvc
DVC_REF: ${{ github.event.inputs.host_dvc_rev || 'main' }}
DVC_AZURE_REPOSITORY: iterative/dvc-azure
DVC_AZURE_REF: main
DVC_GS_REPOSITORY: iterative/dvc-gs
DVC_GS_REF: main
DVC_S3_REPOSITORY: iterative/dvc-s3
DVC_S3_REF: main
UV_SYSTEM_PYTHON: true
TESTS_TO_RUN: ${{ github.event.inputs.tests_to_run || '' }}
CPROFILE_ARGS: ${{ github.event.inputs.cprofile == 'true' && '--benchmark-cprofile-dump' || '' }}
permissions:
contents: read
jobs:
build_gs:
runs-on: ubuntu-latest
timeout-minutes: 480
continue-on-error: true
environment: google-cloud
permissions:
id-token: write
steps:
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: actions/checkout@v4
with:
path: dvc-bench
- uses: actions/checkout@v4
with:
repository: ${{ env.DVC_REPOSITORY }}
ref: ${{ env.DVC_REF }}
path: dvc
fetch-depth: 0
- run: ../dvc-bench/scripts/ci/fetch-all-revs.sh "${REVS}"
working-directory: dvc
- uses: actions/checkout@v4
with:
repository: ${{ env.DVC_GS_REPOSITORY }}
ref: ${{ env.DVC_GS_REF }}
path: dvc-gs
fetch-depth: 0
- uses: hynek/setup-cached-uv@v2
with:
cache-dependency-path: |
dvc/pyproject.toml
dvc-gs/pyproject.toml
- name: install reqs
run: pip install "./dvc[tests]" "./dvc-gs[tests]"
- uses: actions/cache/restore@v4
with:
path: dvc-bench/.dvc/cache
key: ${{ env.DATASET }}
- id: 'auth'
name: 'Authenticate to GCP'
uses: 'google-github-actions/[email protected]'
with:
workload_identity_provider: 'projects/385088528371/locations/global/workloadIdentityPools/github/providers/github'
service_account: '[email protected]'
- name: configure real GS DVC env
run: |
echo "DVC_TEST_GS_BUCKET=dvc-bench" >> "$GITHUB_ENV"
- name: run benchmarks
shell: bash
working-directory: dvc-gs/
run: >
pytest --benchmark-save test_sharing_gs --benchmark-group-by func
dvc_gs/tests/benchmarks.py::test_sharing_gs
--dvc-revs ${CLOUD_REVS}
--dataset ${DATASET}
--dvc-install-deps gs
--dvc-bench-repo ../dvc-bench --dvc-repo ../dvc
-W ignore
dvc_gs/tests/benchmarks.py::test_sharing_gs
${{ env.CPROFILE_ARGS }}