Skip to content

feat: use zaidoon1/rust-rocksdb to replcae rust-rocksdb/rust-rocksdb #788

feat: use zaidoon1/rust-rocksdb to replcae rust-rocksdb/rust-rocksdb

feat: use zaidoon1/rust-rocksdb to replcae rust-rocksdb/rust-rocksdb #788

Workflow file for this run

name: ci
on:
pull_request:
push:
branches:
- main
jobs:
license-check:
name: license header check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: check license header
uses: apache/skywalking-eyes/header@main
format:
strategy:
matrix:
include:
- os: macos-latest
- os: ubuntu-latest
- os: windows-latest
name: cargo fmt
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- name: Setup toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
- name: Run fmt
run: make fmt-check
cargo-clippy:
strategy:
matrix:
include:
- os: macos-latest
- os: ubuntu-latest
- os: windows-latest
name: cargo clippy
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- name: Setup toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
- name: Install protoc (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler
- name: Install protoc (macOS)
if: matrix.os == 'macos-latest'
run: |
brew install protobuf
- name: Install protoc (Windows)
if: matrix.os == 'windows-latest'
run: |
$protocVersion = "27.1"
$protocZip = "protoc-$protocVersion-win64.zip"
$protocUrl = "https://github.com/protocolbuffers/protobuf/releases/download/v$protocVersion/$protocZip"
$protocPath = "$env:RUNNER_TEMP\protoc"
Invoke-WebRequest -Uri $protocUrl -OutFile "$env:RUNNER_TEMP\$protocZip"
Expand-Archive -Path "$env:RUNNER_TEMP\$protocZip" -DestinationPath $protocPath
echo "$protocPath\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- run: make lint
build-and-test:
strategy:
matrix:
include:
- os: macos-latest
- os: ubuntu-latest
- os: windows-latest
name: build and test
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- name: Setup toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
- name: Install protoc (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler
- name: Install protoc (macOS)
if: matrix.os == 'macos-latest'
run: |
brew install protobuf
- name: Install protoc (Windows)
if: matrix.os == 'windows-latest'
run: |
$protocVersion = "27.1"
$protocZip = "protoc-$protocVersion-win64.zip"
$protocUrl = "https://github.com/protocolbuffers/protobuf/releases/download/v$protocVersion/$protocZip"
$protocPath = "$env:RUNNER_TEMP\protoc"
Invoke-WebRequest -Uri $protocUrl -OutFile "$env:RUNNER_TEMP\$protocZip"
Expand-Archive -Path "$env:RUNNER_TEMP\$protocZip" -DestinationPath $protocPath
echo "$protocPath\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Build
run: make build
- name: Run Unit Test
run: make test