Skip to content

Commit

Permalink
refactor: some code in GitHub Actions (#1269)
Browse files Browse the repository at this point in the history
* fix: typo for rocksdb comments

* fix: some actions use services

* fix: name in ipfs yml, install librocksdb-dev first

* fix: permission and command

* fix: ci test

* fix: back to ipfs

* fix: do not use default for rocksdb

* fix: do not run bench for fork repo
  • Loading branch information
yihong0618 authored Feb 3, 2023
1 parent ee47d96 commit c99e08b
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 13 deletions.
1 change: 1 addition & 0 deletions .github/workflows/bench.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
OPENDAL_FS_ROOT: /tmp/opendal/

- name: Store benchmark result
if: github.repository_owner == 'datafuselabs'
uses: benchmark-action/github-action-benchmark@v1
with:
name: Rust Benchmark
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
cp -r ./target/doc/* ./target/book
- name: Deploy to vercel
if: github.ref_name == 'main'
if: github.repository_owner == 'datafuselabs' && github.ref_name == 'main'
uses: amondnet/[email protected]
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
Expand All @@ -48,7 +48,7 @@ jobs:
working-directory: ./target/book

- name: Deploy to vercel (preview)
if: github.ref_name != 'main'
if: github.repository_owner == 'datafuselabs' && github.ref_name != 'main'
uses: amondnet/[email protected]
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/service_test_ipmfs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,13 @@ concurrency:
jobs:
ipmfs:
runs-on: ubuntu-latest
services:
ipfs:
image: ipfs/go-ipfs:v0.14.0
ports:
- 5001:5001
steps:
- uses: actions/checkout@v3
- name: Set up IPFS ${{ matrix.ipfs }}
uses: ibnesayeed/setup-ipfs@b9b9f7d73db5f77d462225bb37dbd51153351dd9
id: ipfs_setup
with:
ipfs_version: "v0.14.0"
run_daemon: true
- uses: Swatinem/rust-cache@v2
- name: Test
shell: bash
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/service_test_redis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ concurrency:
jobs:
redis:
runs-on: ubuntu-latest
services:
redis:
image: redis
ports:
- 6379:6379
steps:
- uses: actions/checkout@v3
- uses: shogo82148/actions-setup-redis@v1
with:
redis-version: "6.x"
- uses: Swatinem/rust-cache@v2
- name: Test
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ reqwest = { version = "0.11.13", features = [
"multipart",
"stream",
], default-features = false }
rocksdb = { version = "0.19", optional = true }
rocksdb = { version = "0.19", default-features = false, optional = true }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
suppaftp = { version = "4.5", default-features = false, features = [
Expand Down
2 changes: 1 addition & 1 deletion src/services/rocksdb/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use crate::*;
pub struct Builder {
/// The path to the rocksdb data directory.
datadir: Option<String>,
/// the working directory of the Redis service. Can be "/path/to/dir"
/// the working directory of the service. Can be "/path/to/dir"
///
/// default is "/"
root: Option<String>,
Expand Down

2 comments on commit c99e08b

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Rust Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: c99e08b Previous: ee47d96 Ratio
service_fs_read_parallel/2x256 KiB 298350 ns/iter (± 26194) 131390 ns/iter (± 9035) 2.27
service_memory_read_full/256 KiB 32410 ns/iter (± 1000) 13122 ns/iter (± 25) 2.47
service_memory_write_once/256 KiB 99833 ns/iter (± 3025) 44694 ns/iter (± 206) 2.23

This comment was automatically generated by workflow using github-action-benchmark.

CC: @Xuanwo

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for opendal ready!

✅ Preview
https://opendal-l10j9z3m6-databend.vercel.app

Built with commit c99e08b.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.