Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change cache action from default to Swatinem/rust-cache@v1 #278

Merged
merged 5 commits into from
Sep 7, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 32 additions & 45 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,16 @@ jobs:
dirs: ${{ fromJSON(needs.changes.outputs.dirs) }}
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
- name: Cache youki
uses: Swatinem/rust-cache@v1
- name: Cache cgroups
uses: Swatinem/rust-cache@v1
with:
working-directory: ./cgroups
- run: rustup component add rustfmt clippy
- run: sudo apt-get -y update
- run: sudo apt-get install -y pkg-config libsystemd-dev libdbus-glib-1-dev libelf-dev
Expand All @@ -59,19 +56,16 @@ jobs:
rust: [1.54.0]
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
- name: Cache youki
uses: Swatinem/rust-cache@v1
- name: Cache cgroups
uses: Swatinem/rust-cache@v1
with:
working-directory: ./cgroups
- run: sudo apt-get -y update
- run: sudo apt-get install -y pkg-config libsystemd-dev libdbus-glib-1-dev libelf-dev
- name: Run tests
Expand All @@ -86,32 +80,29 @@ jobs:
name: Run test coverage
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
- name: Toolchain setup
uses: actions-rs/toolchain@v1
with:
path: |
~/.cargo/bin/
~/.cargo/registry
~/.cargo/git
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
continue-on-error: true
toolchain: nightly
override: true
profile: minimal
components: llvm-tools-preview
- name: Cache youki
uses: Swatinem/rust-cache@v1
- name: Cache cgroups
uses: Swatinem/rust-cache@v1
with:
working-directory: ./cgroups
- name: install cargo-llvm-cov
env:
CARGO_LLVM_COV_VERSION: 0.1.5
run: |
wget https://github.com/taiki-e/cargo-llvm-cov/releases/download/v${CARGO_LLVM_COV_VERSION}/cargo-llvm-cov-x86_64-unknown-linux-gnu.tar.gz -qO- | tar -xzvf -
mv cargo-llvm-cov ~/.cargo/bin
env:
CARGO_LLVM_COV_VERSION: 0.1.5
- name: Update System Libraries
run: sudo apt-get -y update
- name: Install System Libraries
run: sudo apt-get install -y pkg-config libsystemd-dev libdbus-glib-1-dev libelf-dev
- name: Toolchain setup
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
profile: minimal
components: llvm-tools-preview
- name: Run Test Coverage for youki
run: |
cargo llvm-cov clean --workspace
Expand Down Expand Up @@ -140,19 +131,15 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions/cache@v2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
integration_test/src/github.com/opencontainers/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
- name: Cache youki
uses: Swatinem/rust-cache@v1
- name: Cache cgroups
uses: Swatinem/rust-cache@v1
with:
working-directory: ./cgroups
- run: sudo apt-get -y update
- run: sudo apt-get install -y pkg-config libsystemd-dev libdbus-glib-1-dev libelf-dev
- name: Build
Expand Down