Skip to content

Commit

Permalink
CI
Browse files Browse the repository at this point in the history
  • Loading branch information
streamer45 committed Jul 5, 2024
1 parent fbbfa90 commit a656637
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
on: [push]
name: CI
jobs:
test:
env:
GOPATH: ${{ github.workspace }}

defaults:
run:
working-directory: ${{ env.GOPATH }}/src/github.com/${{ github.repository }}

strategy:
matrix:
go-version: [1.21.x]

runs-on: ubuntu-latest

steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout Code
uses: actions/checkout@v2
with:
path: ${{ env.GOPATH }}/src/github.com/${{ github.repository }}
- name: Install ONNX
run: |
wget https://github.com/microsoft/onnxruntime/releases/download/v1.16.2/onnxruntime-linux-x64-1.16.2.tgz
tar xf onnxruntime-linux-x64-1.16.2.tgz
sudo cp ./onnxruntime-linux-x64-1.16.2/include/* /usr/local/include
sudo cp ./onnxruntime-linux-x64-1.16.2/lib/* /usr/local/lib
sudo ldconfig
- name: Execute Tests
run: |
go mod download
go mod verify
make test
env:
CI: true
29 changes: 29 additions & 0 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: golangci-lint
on: [push]
permissions:
contents: read
jobs:
golangci:
name: lint
strategy:
matrix:
go-version: [1.21.x]
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Install ONNX
run: |
wget https://github.com/microsoft/onnxruntime/releases/download/v1.16.2/onnxruntime-linux-x64-1.16.2.tgz
tar xf onnxruntime-linux-x64-1.16.2.tgz
sudo cp ./onnxruntime-linux-x64-1.16.2/include/* /usr/local/include
sudo cp ./onnxruntime-linux-x64-1.16.2/lib/* /usr/local/lib
sudo ldconfig
- name: Checkout Code
uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.57.2

0 comments on commit a656637

Please sign in to comment.