Skip to content

Commit

Permalink
docs: Add dependencies list for all packages (#3743)
Browse files Browse the repository at this point in the history
Signed-off-by: Xuanwo <[email protected]>
Co-authored-by: tison <[email protected]>
  • Loading branch information
Xuanwo and tisonkun authored Dec 13, 2023
1 parent 8182d04 commit f725eb1
Show file tree
Hide file tree
Showing 46 changed files with 4,466 additions and 13 deletions.
17 changes: 17 additions & 0 deletions .github/actions/setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ inputs:
description: "This setup needs nextest or not"
need-protoc:
description: "This setup needs protoc or not"
need-deny:
description: "This setup needs cargo-deny or not"
github-token:
description: "Github Token"
default: ""
Expand Down Expand Up @@ -76,6 +78,21 @@ runs:
shell: bash
run: cargo install [email protected] --locked

- name: Cache cargo-deny on linux
id: cache-deny
uses: actions/cache@v3
if: inputs.need-deny == 'true'
with:
path: |
~/.cargo/bin/cargo-deny
~/.cargo/bin/cargo-deny.exe
key: r0-${{runner.os}}-deny-0.14.3

- name: Build cargo-deny if not cached
if: steps.cache-deny.outputs.cache-hit != 'true' && inputs.need-deny == 'true'
shell: bash
run: cargo install [email protected] --locked

- name: Setup rust on linux
if: runner.os == 'Linux' && inputs.need-rocksdb == 'true'
shell: bash
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,48 @@ jobs:
- name: Check diff
run: git diff --exit-code

check_dependencies:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Rust toolchain
uses: ./.github/actions/setup
with:
need-deny: true

- name: Check dependencies
run: python3 ./scripts/dependencies.py check

check_website_dependencies:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v2
with:
version: 8

- uses: actions/setup-node@v4
with:
node-version: '18'
cache: pnpm
cache-dependency-path: "website/pnpm-lock.yaml"

- name: Corepack
working-directory: website
run: corepack enable

- name: Install Dependencies
working-directory: website
run: pnpm install --frozen-lockfile

- name: Check dependencies
working-directory: website
run: |
npx license-checker --producation --excludePrivatePackages --csv > DEPENDENCIES.node.csv
git diff --exit-code
check_docs:
runs-on: ubuntu-latest
steps:
Expand Down
20 changes: 10 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions DEPENDENCIES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# OpenDAL Dependencies

Please visit every package's `DEPENDENCIES.md` for a full list of dependencies.

## Check

To check and generate dependencies list of any package of opendal, please run:

```bash
python3 ./scripts/dependencies.py check
```

## Generate

To update the dependencies list of every package, please run:

```bash
python3 ./scripts/dependencies.py generate
```
3 changes: 3 additions & 0 deletions bin/oay/DEPENDENCIES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Dependencies

Refer to [DEPENDENCIES.rust.tsv](DEPENDENCIES.rust.tsv) for full list.
Loading

0 comments on commit f725eb1

Please sign in to comment.