From f19a5404cd600fc9a403182f6b9bfa358c1f8055 Mon Sep 17 00:00:00 2001 From: Anush Date: Fri, 22 Nov 2024 23:24:43 +0530 Subject: [PATCH] ci: Use ONNX version as cache key for the ONNX cache (#127) Signed-off-by: Anush008 --- .github/workflows/test.yml | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1ee2746..89d8d9b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,17 +1,13 @@ name: "Cargo Tests" on: - pull_request: - types: - - opened - - edited - - synchronize - - reopened - schedule: - - cron: 0 0 * * * - + pull_request: + schedule: + - cron: 0 0 * * * + env: CARGO_TERM_COLOR: always RUSTFLAGS: "-Dwarnings" + ONNX_VERSION: v1.20.1 jobs: test: @@ -24,7 +20,7 @@ jobs: id: cache-build-restore uses: actions/cache/restore@v4 with: - key: '${{ runner.os }}-cargox-${{ hashFiles(''**/Cargo.toml'') }}' + key: '${{ runner.os }}-onnxruntime-${{ env.ONNX_VERSION }}' path: | onnxruntime/build/Linux/Release/ @@ -32,7 +28,7 @@ jobs: if: steps.cache-build-restore.outputs.cache-hit != 'true' run: | echo Cloning ONNX Runtime repository... - git clone https://github.com/microsoft/onnxruntime --recursive --branch v1.20.1 --single-branch --depth 1 + git clone https://github.com/microsoft/onnxruntime --recursive --branch $ONNX_VERSION --single-branch --depth 1 cd onnxruntime ./build.sh --update --build --config Release --parallel --compile_no_warning_as_error --skip_submodule_sync cd ..