update doc #4376
Workflow file for this run
This file contains 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: golangci-lint | |
on: | |
push: | |
pull_request: | |
permissions: | |
contents: read | |
jobs: | |
golangci: | |
name: lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Load .env file | |
uses: cardinalby/export-env-action@v2 | |
with: | |
envFile: .env | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ env.GOLANG_VERSION }} | |
cache: false | |
- name: Install sorx | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libsoxr-dev | |
- name: Install onnxruntime library and headers | |
run: | | |
export ONNXRUNTIME_ROOT_PATH=$GITHUB_WORKSPACE/onnxruntime | |
LATEST_VERSION=$(wget -qO- https://api.github.com/repos/microsoft/onnxruntime/releases/latest | jq -r .tag_name) | |
ONNX_ARCH=$([ "$TARGETARCH" = "arm64" ] && echo "aarch64" || echo "x64") | |
wget https://github.com/microsoft/onnxruntime/releases/download/${LATEST_VERSION}/onnxruntime-linux-${ONNX_ARCH}-${LATEST_VERSION#v}.tgz | |
tar -xzf onnxruntime-linux-${ONNX_ARCH}-${LATEST_VERSION#v}.tgz | |
mv onnxruntime-linux-${ONNX_ARCH}-${LATEST_VERSION#v} ${ONNXRUNTIME_ROOT_PATH} | |
rm onnxruntime-linux-${ONNX_ARCH}-${LATEST_VERSION#v}.tgz | |
echo "C_INCLUDE_PATH=${ONNXRUNTIME_ROOT_PATH}/include" >> $GITHUB_ENV | |
echo "LD_RUN_PATH=${ONNXRUNTIME_ROOT_PATH}/lib" >> $GITHUB_ENV | |
echo "LIBRARY_PATH=${ONNXRUNTIME_ROOT_PATH}/lib" >> $GITHUB_ENV | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: v1.61 | |
args: --timeout=10m --build-tags onnx |