Skip to content

Dev/wdpost

Dev/wdpost #106

name: damocles-worker
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: read rust toolchain
id: read-rust-toolchain
run: |
echo "toolchain=$(cat ./rust-toolchain)" >> "$GITHUB_OUTPUT"
- name: setup rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ steps.read-rust-toolchain.outputs.toolchain }}
override: true
components: rustfmt, clippy
- name: setup cargo cache
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/
damocles-worker/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('rust-toolchain') }}-${{ hashFiles('damocles-worker/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-${{ hashFiles('rust-toolchain') }}-
${{ runner.os }}-cargo-
- name: test damocles-worker
run: make test-worker
- name: build damocles-worker
run: make build-worker
- name: check damocles-worker
run: make check-worker
- name: check git dirty
run: make check-git
- name: show bins
run: ls -lha ./dist/bin/
# - name: upload damocles-worker
# uses: actions/upload-artifact@v2
# with:
# name: damocles-worker
# path: ./dist/bin/
# if-no-files-found: error
# retention-days: 3