Add caching for cargo files in CI

Former-commit-id: 04839f9f3f387c7d14391e0a8440eda42ed960e2
Former-commit-id: 56de0ffa4bbca27c3a125bcb78d0195c42068f7f
This commit is contained in:
Michel Heily 2020-04-30 20:39:06 +03:00
parent 519eba45fe
commit 7df9b8f795

View file

@ -21,6 +21,22 @@ jobs:
sudo apt-get install libsdl2-dev sudo apt-get install libsdl2-dev
sudo apt-get install libsdl2-image-dev sudo apt-get install libsdl2-image-dev
- name: Cache cargo registry
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v1
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v1
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- name: Build - name: Build
run: cargo build --release --manifest-path platform/rustboyadvance-sdl2/Cargo.toml run: cargo build --release --manifest-path platform/rustboyadvance-sdl2/Cargo.toml
@ -49,6 +65,22 @@ jobs:
- run: rustup target add x86_64-pc-windows-msvc - run: rustup target add x86_64-pc-windows-msvc
- name: Cache cargo registry
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v1
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v1
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- name: Build - name: Build
run: cargo build --target x86_64-pc-windows-msvc --release --manifest-path .\platform\rustboyadvance-sdl2\Cargo.toml run: cargo build --target x86_64-pc-windows-msvc --release --manifest-path .\platform\rustboyadvance-sdl2\Cargo.toml