Skip to content

Commit

Permalink
ci: cache action for deps (#5)
Browse files Browse the repository at this point in the history
* ci: test.yml cache

* ci: cache artifacts release.yml

* chore: no cache local_cache

* chore: no cache local_cache test.yml
  • Loading branch information
Anush008 authored Oct 10, 2023
1 parent a164354 commit a9d4c38
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 6 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,35 @@ on:
workflow_dispatch:

jobs:

test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.21
- name: Install dependencies
run: go get .

- name: Install ONNX Runtime
run: |
wget https://github.com/microsoft/onnxruntime/releases/download/v1.16.0/onnxruntime-linux-x64-1.16.0.tgz
tar xvzf onnxruntime-linux-x64-1.16.0.tgz
echo "ONNX_PATH=$(pwd)/onnxruntime-linux-x64-1.16.0/lib/libonnxruntime.so" >> $GITHUB_ENV
- name: Install dependencies
run: go get .

- name: Test with Go
run: go test

Expand All @@ -47,4 +60,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
bun x semantic-release
bun x semantic-release
17 changes: 15 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,29 @@ jobs:

steps:
- uses: actions/checkout@v4

- uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.21
- name: Install dependencies
run: go get .

- name: Install ONNX Runtime
run: |
wget https://github.com/microsoft/onnxruntime/releases/download/v1.16.0/onnxruntime-linux-x64-1.16.0.tgz
tar xvzf onnxruntime-linux-x64-1.16.0.tgz
echo "ONNX_PATH=$(pwd)/onnxruntime-linux-x64-1.16.0/lib/libonnxruntime.so" >> $GITHUB_ENV
- name: Install dependencies
run: go get .

- name: Test with Go
run: go test

0 comments on commit a9d4c38

Please sign in to comment.