Skip to content

Commit

Permalink
ci: Use ONNX version as cache key for the ONNX cache (#127)
Browse files Browse the repository at this point in the history
Signed-off-by: Anush008 <anushshetty90@gmail.com>
  • Loading branch information
Anush008 authored Nov 22, 2024
1 parent 106ab1f commit f19a540
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -24,15 +20,15 @@ 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/
- name: Compile ONNX Runtime for Linux
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 ..
Expand Down

0 comments on commit f19a540

Please sign in to comment.