Skip to content

Commit

Permalink
upgrade ci
Browse files Browse the repository at this point in the history
  • Loading branch information
ismoilovdevml committed Oct 16, 2023
1 parent 5e08313 commit cdfe786
Showing 1 changed file with 29 additions and 5 deletions.
34 changes: 29 additions & 5 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,43 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

# Caching target directory
- name: Cache Cargo target dir
uses: actions/cache@v2
with:
path: target
key: ${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.lock') }}

# Caching Cargo registry
- name: Cache Cargo registry
uses: actions/cache@v2
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}

- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

# Install and setup sccache
- name: Install sccache
run: cargo install sccache
- name: Setup sccache
run: |
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
# Cache sccache storage
- name: Cache sccache
uses: actions/cache@v2
with:
path: ~/.cache/sccache
key: ${{ runner.os }}-sccache-${{ hashFiles('**/Cargo.lock') }}

- name: Build
uses: actions-rs/cargo@v1
with:
command: build

# - name: Run tests
# uses: actions-rs/cargo@v1
# with:
# command: test

0 comments on commit cdfe786

Please sign in to comment.