Skip to content

Commit

Permalink
ci: Enable rust cache for CI (#1107)
Browse files Browse the repository at this point in the history
* ci: Enable rust cache for CI

Signed-off-by: Xuanwo <[email protected]>

* Ignore targets

Signed-off-by: Xuanwo <[email protected]>

Signed-off-by: Xuanwo <[email protected]>
  • Loading branch information
Xuanwo authored Dec 28, 2022
1 parent 9ac3845 commit bfe4d39
Show file tree
Hide file tree
Showing 18 changed files with 28 additions and 6 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ jobs:
with:
hdfs-version: "3.3.2"

- uses: Swatinem/rust-cache@v2

- uses: ./.github/actions/check
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -64,6 +66,7 @@ jobs:
rustup toolchain install ${OPENDAL_MSRV}
rustup component add clippy --toolchain ${OPENDAL_MSRV}
- uses: Swatinem/rust-cache@v2
- name: Check
run: cargo +${OPENDAL_MSRV} clippy --no-deps --all-targets --all-features -- -D warnings

Expand All @@ -75,6 +78,7 @@ jobs:
- ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build

Expand All @@ -100,6 +104,7 @@ jobs:
with:
hdfs-version: "3.3.2"

- uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build --all-features --release

Expand All @@ -125,6 +130,7 @@ jobs:
with:
hdfs-version: "3.3.2"

- uses: Swatinem/rust-cache@v2
- name: Test
run: cargo test --no-fail-fast --features compress,layers-all
env:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/service_test_azblob.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
--name test \
--connection-string "DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;"
- uses: Swatinem/rust-cache@v2
- name: Test
shell: bash
run: cargo test azblob --features compress -- --nocapture
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/service_test_azdfs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:

steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Test
shell: bash
run: cargo test azdfs --features compress -- --nocapture
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/service_test_fs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Test
shell: bash
run: cargo test fs --features compress -- --nocapture
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/service_test_ftp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
swapon --show
echo
- uses: Swatinem/rust-cache@v2
- name: Test
shell: bash
run: cargo test ftp --features compress,services-ftp -- --nocapture
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/service_test_gcs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Test
shell: bash
run: cargo test gcs --features compress -- --nocapture
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/service_test_hdfs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
with:
hdfs-version: ${{ matrix.hdfs-version }}

- uses: Swatinem/rust-cache@v2
- name: Test
shell: bash
run: cargo test hdfs --features compress,services-hdfs -- --nocapture
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/service_test_http.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ jobs:
cp -r testdata/* /tmp/static
./caddy file-server --root /tmp/static --listen 127.0.0.1:8080 --access-log &
- uses: Swatinem/rust-cache@v2
- name: Test
shell: bash
run: cargo test http --features compress -- --nocapture
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/service_test_ipfs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
run: |
ipfs add -r ./testdata --to-files /opendal-testdata
ipfs files ls /opendal-testdata -l
- uses: Swatinem/rust-cache@v2
- name: Test
shell: bash
run: cargo test ipfs --features services-ipfs -- --nocapture
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/service_test_ipmfs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
with:
ipfs_version: "v0.14.0"
run_daemon: true
- uses: Swatinem/rust-cache@v2
- name: Test
shell: bash
run: cargo test ipmfs --features compress -- --nocapture
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/service_test_memory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Test
shell: bash
run: cargo test memory --features compress -- --nocapture
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/service_test_moka.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Test
shell: bash
run: cargo test moka --features compress,services-moka -- --nocapture
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/service_test_obs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Test
shell: bash
run: cargo test obs --features compress -- --nocapture
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/service_test_oss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Test
shell: bash
run: cargo test oss --features compress -- --nocapture
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/service_test_redis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- uses: shogo82148/actions-setup-redis@v1
with:
redis-version: "6.x"

- uses: Swatinem/rust-cache@v2
- name: Test
shell: bash
run: cargo test redis --features compress,services-redis -- --nocapture
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/service_test_rocksdb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: Swatinem/rust-cache@v2
- name: Test
shell: bash
run: cargo test rocksdb --features compress,services-rocksdb -- --nocapture --test-threads=1
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/service_test_s3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Test
shell: bash
run: cargo test s3 --features compress -- --nocapture
Expand All @@ -36,6 +37,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Test
shell: bash
run: cargo test s3 --features compress -- --nocapture
Expand All @@ -54,6 +56,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Test
shell: bash
run: cargo test s3 --features compress -- --nocapture
Expand Down Expand Up @@ -91,7 +94,7 @@ jobs:
AWS_SECRET_ACCESS_KEY: "minioadmin"
AWS_EC2_METADATA_DISABLED: "true"
run: aws --endpoint-url http://127.0.0.1:9000/ s3 mb s3://test

- uses: Swatinem/rust-cache@v2
- name: Test
shell: bash
run: cargo test s3 --features compress -- --nocapture
Expand Down Expand Up @@ -126,7 +129,7 @@ jobs:
./mc alias set local http://127.0.0.1:9000/ minioadmin minioadmin
./mc mb local/test
./mc anonymous set public local/test
- uses: Swatinem/rust-cache@v2
- name: Test
shell: bash
run: cargo test s3 --features compress -- --nocapture
Expand Down
3 changes: 2 additions & 1 deletion .licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ header:
- "**/*.toml"
- "**/*.lock"
- "**/*.tldr"
- "**/target"
- "target/**"
- "**/target/**"
# Ignore test data
- "testdata"

Expand Down

1 comment on commit bfe4d39

@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-h9cecbpm4-databend.vercel.app

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

Please sign in to comment.