test ci #35
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 Load Balancer CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Cache Cargo target dir | |
uses: actions/cache@v2 | |
with: | |
path: target | |
key: ${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.lock') }} | |
- 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 | |
- name: Install sccache | |
run: cargo install sccache | |
- name: Setup sccache | |
run: | | |
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV | |
echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
- 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 |