Skip to content

remove opencl in readme #37

remove opencl in readme

remove opencl in readme #37

Workflow file for this run

name: Tests
on: [push, pull_request]
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install protoc
uses: taiki-e/install-action@v2
with:
tool: protoc
- name: Install toolchain
id: rust-toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install cuda
uses: Jimver/[email protected]
with:
cuda: '12.5.0'
method: 'network'
sub-packages: '["nvcc", "cudart"]'
- name: Cache cargo bin
uses: actions/cache@v4
with:
path: ~/.cargo/bin/
key: ${{ runner.os }}-cargo-bin-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-bin-
- name: Cache cargo registry index
uses: actions/cache@v4
with:
path: ~/.cargo/registry/index/
key: ${{ runner.os }}-cargo-registry-index-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-index-
- name: Cache cargo registry cache
uses: actions/cache@v4
with:
path: ~/.cargo/registry/cache/
key: ${{ runner.os }}-cargo-registry-cache-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-cache-
- name: Cache cargo git db
uses: actions/cache@v4
with:
path: ~/.cargo/git/db/
key: ${{ runner.os }}-cargo-git-db-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-git-db-
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-
- name: Cache cargo git
uses: actions/cache@v4
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-git-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-git-
- name: Cache build
uses: actions/cache@v4
with:
path: target
key: ${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-target-
- name: Run cargo check
run: cargo check --tests
test:
name: Test Suite
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest ]
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Fix CRLF on Windows
if: runner.os == 'Windows'
run: git config --global core.autocrlf false
- name: Install protoc
uses: taiki-e/install-action@v2
with:
tool: protoc
- name: Install toolchain
id: rust-toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install CUDA Linux
if: runner.os == 'Linux'
uses: Jimver/[email protected]
with:
cuda: '12.5.0'
method: 'network'
sub-packages: '["nvcc", "cudart"]'
- name: Install CUDA Windows
if: runner.os == 'Windows'
uses: Jimver/[email protected]
with:
cuda: '12.5.0'
method: 'network'
sub-packages: '["nvcc", "cudart"]'
- name: Cache cargo bin
uses: actions/cache@v4
with:
path: ~/.cargo/bin/
key: ${{ runner.os }}-cargo-bin-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-bin-
- name: Cache cargo registry index
uses: actions/cache@v4
with:
path: ~/.cargo/registry/index/
key: ${{ runner.os }}-cargo-registry-index-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-index-
- name: Cache cargo registry cache
uses: actions/cache@v4
with:
path: ~/.cargo/registry/cache/
key: ${{ runner.os }}-cargo-registry-cache-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-cache-
- name: Cache cargo git db
uses: actions/cache@v4
with:
path: ~/.cargo/git/db/
key: ${{ runner.os }}-cargo-git-db-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-git-db-
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-
- name: Cache cargo git
uses: actions/cache@v4
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-git-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-git-
- name: Cache build
uses: actions/cache@v4
with:
path: target
key: ${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-target-
- name: Run cargo test regular features
run: cargo test -p karlsen-miner
- name: Run cargo test no asm
run: cargo test -p karlsen-miner --features=no-asm
- name: Run cargo test no parking_lot
run: cargo test -p karlsen-miner --no-default-features
- name: Run cargo test shuttle
run: cargo test -p karlsen-miner --no-default-features --features=shuttle
test-release:
name: Test Suite Release
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest ]
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Fix CRLF on Windows
if: runner.os == 'Windows'
run: git config --global core.autocrlf false
- name: Install protoc
uses: taiki-e/install-action@v2
with:
tool: protoc
- name: Install toolchain
id: rust-toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install CUDA Linux
if: runner.os == 'Linux'
uses: Jimver/[email protected]
with:
cuda: '12.5.0'
method: 'network'
sub-packages: '["nvcc", "cudart"]'
- name: Install CUDA Windows
if: runner.os == 'Windows'
uses: Jimver/[email protected]
with:
cuda: '12.5.0'
method: 'network'
sub-packages: '["nvcc", "cudart"]'
- name: Cache cargo bin
uses: actions/cache@v4
with:
path: ~/.cargo/bin/
key: ${{ runner.os }}-cargo-bin-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-bin-
- name: Cache cargo registry index
uses: actions/cache@v4
with:
path: ~/.cargo/registry/index/
key: ${{ runner.os }}-cargo-registry-index-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-index-
- name: Cache cargo registry cache
uses: actions/cache@v4
with:
path: ~/.cargo/registry/cache/
key: ${{ runner.os }}-cargo-registry-cache-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-cache-
- name: Cache cargo git db
uses: actions/cache@v4
with:
path: ~/.cargo/git/db/
key: ${{ runner.os }}-cargo-git-db-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-git-db-
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-
- name: Cache cargo git
uses: actions/cache@v4
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-git-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-git-
- name: Cache build
uses: actions/cache@v4
with:
path: target
key: ${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-target-
- name: Run cargo test regular features
run: cargo test -p karlsen-miner
- name: Run cargo test release no asm
run: cargo test -p karlsen-miner --features=no-asm --release
- name: Run cargo test release no parking_lot
run: cargo test -p karlsen-miner --no-default-features --release
- name: Run cargo test release shuttle
run: cargo test -p karlsen-miner --no-default-features --features=shuttle --release
lints:
name: Lints
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install protoc
uses: taiki-e/install-action@v2
with:
tool: protoc
- name: Install toolchain
id: rust-toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Install cuda
uses: Jimver/[email protected]
with:
cuda: '12.5.0'
method: 'network'
sub-packages: '["nvcc", "cudart"]'
- name: Cache cargo bin
uses: actions/cache@v4
with:
path: ~/.cargo/bin/
key: ${{ runner.os }}-cargo-bin-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-bin-
- name: Cache cargo registry index
uses: actions/cache@v4
with:
path: ~/.cargo/registry/index/
key: ${{ runner.os }}-cargo-registry-index-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-index-
- name: Cache cargo registry cache
uses: actions/cache@v4
with:
path: ~/.cargo/registry/cache/
key: ${{ runner.os }}-cargo-registry-cache-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-cache-
- name: Cache cargo git db
uses: actions/cache@v4
with:
path: ~/.cargo/git/db/
key: ${{ runner.os }}-cargo-git-db-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-git-db-
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-
- name: Cache cargo git
uses: actions/cache@v4
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-git-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-git-
- name: Cache build
uses: actions/cache@v4
with:
path: target
key: ${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-target-
- name: Run cargo fmt
run: cargo fmt --all -- --check
- name: Run cargo clippy
run: cargo clippy --tests -- -D warnings