11name : Code Quality & Regression Tests - NVIDIA T4
22
33on :
4- push :
5- branches : [main]
6- workflow_dispatch :
4+ workflow_run :
5+ workflows : ["Build and Push GPU Container"] # The name of the first workflow
6+ types :
7+ - completed # Trigger this workflow when the first workflow completes
78
89jobs :
910 build :
@@ -17,19 +18,39 @@ jobs:
1718 - name : Set up Docker Buildx
1819 uses : docker/setup-buildx-action@v2
1920 - name : 🛎️ Checkout
20- uses : actions/checkout@v3
21+ uses : actions/checkout@v4
2122 with :
2223 ref : ${{ github.head_ref }}
24+ - name : 📦 Cache Python packages
25+ uses : actions/cache@v3
26+ with :
27+ path : ~/.cache/pip
28+ key : ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('requirements/**') }}
29+ restore-keys : |
30+ ${{ runner.os }}-pip-${{ matrix.python-version }}-
31+ - name : Read version from file
32+ run : echo "VERSION=$(DISABLE_VERSION_CHECK=true python ./inference/core/version.py)" >> $GITHUB_ENV
2333 - name : 🦾 Install dependencies
2434 run : |
2535 python3 -m pip install --upgrade pip
2636 python3 -m pip install -r requirements/requirements.test.integration.txt
27- - name : �🔨 Build and Push Test Docker - GPU
28- run : |
29- docker build -t roboflow/roboflow-inference-server-gpu:test -f docker/dockerfiles/Dockerfile.onnx.gpu .
37+ - name : Set up Depot CLI
38+ uses : depot/setup-action@v1
39+ - name : Retireve build ID
40+ uses : actions/download-artifact@v3
41+ with :
42+ name : build_id
43+ path : .
44+ - name : Read build ID
45+ run : echo "BUILD_ID=$(cat build_id/build_id.txt)" >> $GITHUB_ENV
46+ - name : Set Repo
47+ run : echo "INFERENCE_SERVER_REPO=roboflow-inference-server-gpu" >> $GITHUB_ENV
48+ - name : Pull GPU Image
49+ run : depot pull $BUILD_ID -t roboflow/${INFERENCE_SERVER_REPO}:${VERSION}
3050 - name : 🔋 Start Test Docker - GPU
3151 run : |
32- PORT=9101 INFERENCE_SERVER_REPO=roboflow-inference-server-gpu make start_test_docker_gpu
52+ docker tag roboflow/${INFERENCE_SERVER_REPO}:${VERSION} roboflow/${INFERENCE_SERVER_REPO}:test
53+ PORT=9101 make start_test_docker_gpu
3354 - name : 🧪 Regression Tests - GPU
3455 id : regression_tests
3556 run : |
@@ -85,10 +106,10 @@ jobs:
85106 - name : 🧪 Regression Tests - SAM2
86107 id : sam2_tests
87108 run : |
88- PORT=9101 API_KEY=${{ secrets.API_KEY }} SKIP_SAM2_TESTS=False python3 -m pytest tests/inference/integration_tests/test_sam2.py
109+ PORT=9101 API_KEY=${{ secrets.API_KEY }} SKIP_SAM2_TESTS=False python3 -m pytest tests/inference/integration_tests/test_sam2.py
89110 - name : 🚨 Show server logs on error
90111 run : docker logs inference-test
91112 if : ${{ steps.sam2_tests.outcome != 'success' }}
92113 - name : 🧹 Cleanup Test Docker - SAM2
93114 run : make stop_test_docker
94- if : success() || failure()
115+ if : success() || failure()
0 commit comments