run simple test in ci #6
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| env: | |
| ONNXRUNTIME_VERSION: "1.23.0" | |
| ONNXRUNTIME_GENAI_VERSION: "0.11.0" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: 'go.mod' | |
| - name: Install staticcheck | |
| run: go install honnef.co/go/tools/cmd/[email protected] | |
| - name: Build | |
| run: go build -v ./... | |
| - name: Lint | |
| run: | | |
| go vet -v ./... | |
| staticcheck ./... | |
| - name: Cache ONNX Runtime | |
| id: cache-onnxruntime | |
| uses: actions/cache@v4 | |
| with: | |
| path: libs/${{ env.ONNXRUNTIME_VERSION }} | |
| key: onnxruntime-linux-x64-${{ env.ONNXRUNTIME_VERSION }} | |
| - name: Download ONNX Runtime | |
| if: steps.cache-onnxruntime.outputs.cache-hit != 'true' | |
| run: ./download.sh ${{ env.ONNXRUNTIME_VERSION }} | |
| - name: Cache ONNX Runtime GenAI | |
| id: cache-genai | |
| uses: actions/cache@v4 | |
| with: | |
| path: libs/genai/${{ env.ONNXRUNTIME_GENAI_VERSION }} | |
| key: onnxruntime-genai-linux-x64-${{ env.ONNXRUNTIME_GENAI_VERSION }} | |
| - name: Download ONNX Runtime GenAI | |
| if: steps.cache-genai.outputs.cache-hit != 'true' | |
| run: ./download_genai.sh ${{ env.ONNXRUNTIME_GENAI_VERSION }} | |
| - name: Test | |
| run: go test -v ./... | |
| env: | |
| ONNXRUNTIME_LIB_PATH: ${{ github.workspace }}/libs/${{ env.ONNXRUNTIME_VERSION }}/lib/libonnxruntime.so | |
| ONNXRUNTIME_GENAI_LIB_PATH: ${{ github.workspace }}/libs/genai/${{ env.ONNXRUNTIME_GENAI_VERSION }}/lib/libonnxruntime-genai.so |