Skip to content

Dev/wdpost

Dev/wdpost #111

name: damocles-manager
on:
pull_request:
branches: ["main", "release/**", "dev/coop/**"]
paths-ignore: ["*.md", "docs/**"]
push:
branches: ["main", "release/**", "dev/coop/**"]
paths-ignore: ["*.md", "docs/**"]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: dependencies
run: sudo apt update && sudo apt install --reinstall ocl-icd-opencl-dev libhwloc-dev -y
- name: setup go
uses: actions/setup-go@v4
with:
go-version: "1.18"
- name: cache paths
id: cache-paths
run: |
echo "go-build=$(go env GOCACHE)" >> $GITHUB_OUTPUT
echo "go-mod=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT
- name: setup go cache
uses: actions/cache@v3
continue-on-error: false
with:
path: |
${{ steps.cache-paths.outputs.go-build }}
${{ steps.cache-paths.outputs.go-mod }}
key: ${{ runner.os }}-go-${{ hashFiles('damocles-manager/go.sum') }}
restore-keys: ${{ runner.os }}-go-
- name: install golangci-lint
run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.46.1
- name: test damocles-manager
run: make test-manager
- name: build damocles-manager
run: make build-manager
- name: check damocles-manager
run: make check-manager
- name: check git dirty
run: make check-git
- name: show bins
run: ls -lha ./dist/bin/
# - name: upload damocles-manager
# uses: actions/upload-artifact@v2
# with:
# name: damocles-manager
# path: ./dist/bin/
# if-no-files-found: error
# retention-days: 3