feat: use zaidoon1/rust-rocksdb to replcae rust-rocksdb/rust-rocksdb … #792
This file contains hidden or 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: 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 |