-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Setup Rust Builder | ||
description: 'Prepare Rust Build Environment' | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Setup rust related environment variables | ||
shell: bash | ||
run: | | ||
# Disable full debug symbol generation to speed up CI build and keep memory down | ||
# "1" means line tables only, which is useful for panic tracebacks. | ||
# About `force-frame-pointers`, here's the discussion history: https://github.com/apache/opendal/issues/3756 | ||
echo "RUSTFLAGS=-C force-frame-pointers=yes -C debuginfo=1" >> $GITHUB_ENV | ||
# Enable backtraces | ||
echo "RUST_BACKTRACE=1" >> $GITHUB_ENV | ||
# Enable logging | ||
echo "RUST_LOG=opendal=trace" >> $GITHUB_ENV | ||
# Enable sparse index | ||
echo "CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse" >> $GITHUB_ENV | ||
# Make sure rust has been setup | ||
cargo version |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Unit Test | ||
|
||
on: | ||
schedule: # execute every 24 hours | ||
- cron: "* */24 * * *" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
plan: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 'Checkout codes' | ||
uses: actions/checkout@v4 | ||
with: | ||
# fetch depth set to 0 to make sure we have correct diff result. | ||
fetch-depth: 0 | ||
|
||
- name: Setup Rust toolchain | ||
uses: ./.github/actions/setup | ||
|
||
- name: 'Run Unit tests' | ||
shell: bash | ||
run: | | ||
cargo test |