improvement: await-log when reading data (#67) #143
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
name: Rust | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
strategy: | |
matrix: | |
features: | |
- "" | |
- "memory-prof" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 8 | |
distribution: 'temurin' | |
- name: Install protoc | |
uses: taiki-e/install-action@v2 | |
with: | |
tool: protoc@3.20.3 | |
- uses: actions/checkout@v3 | |
# - name: Set up cargo cache | |
# uses: actions/cache@v3 | |
# continue-on-error: false | |
# with: | |
# path: | | |
# ~/.cargo/bin/ | |
# ~/.cargo/registry/index/ | |
# ~/.cargo/registry/cache/ | |
# ~/.cargo/git/db/ | |
# target/ | |
# key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
# restore-keys: ${{ runner.os }}-cargo- | |
# - name: free_disk_space | |
# run: | | |
# # We can gain additional disk space on the Ubuntu runners thanks to these suggestions: | |
# # https://github.com/actions/runner-images/issues/2840#issuecomment-790492173 | |
# # https://github.com/actions/runner-images/issues/2606#issuecomment-772683150 | |
# sudo rm -rf /usr/share/dotnet | |
# sudo rm -rf /usr/local/lib/android | |
# sudo rm -rf /opt/ghc | |
# sudo rm -rf "/usr/local/share/boost" | |
# sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
- name: Build | |
run: cargo build --verbose | |
if: ${{ matrix.features == '' }} | |
- name: Build with memory-prof | |
run: cargo build --verbose --features memory-prof | |
if: ${{ matrix.features == 'memory-prof' }} | |
- name: Code style check | |
run: cargo fmt --check | |
if: ${{ matrix.features == '' }} | |
- name: Run tests | |
run: cargo test --verbose | |
if: ${{ matrix.features == '' }} | |
- name: Run tests with memory-prof | |
run: cargo test --verbose --features memory-prof | |
if: ${{ matrix.features == 'memory-prof' }} |