Add OpenCL AMD/NVIDIA Linux Build Instructions. #24
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: Build and Test | |
on: [push, pull_request] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
name: Go CI | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
go: ['1.19', '1.20'] | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 #v4.0.1 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Check out source | |
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 #v3.5.3 | |
- name: Install build dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y beignet-dev nvidia-cuda-dev nvidia-cuda-toolkit ocl-icd-opencl-dev opencl-headers nvidia-opencl-dev | |
- name: Install Linters | |
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.53.3 | |
- name: Build OpenCL | |
env: | |
CL_TARGET_OPENCL_VERSION: "220" | |
run: go build -tags opencl ./... | |
- name: Lint | |
run: golangci-lint -c ./.golangci.yml run | |
- name: Test | |
run: go test -tags opencl -v ./... |