From fb9720d3c2590e8092818e18877a9b5db2584a11 Mon Sep 17 00:00:00 2001 From: Sasha Hilton Date: Sun, 31 Jan 2021 01:55:47 +0000 Subject: [PATCH 1/2] Cache build dependencies in Github Workflows --- .github/workflows/test.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 77e280b2..c0ccff2c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -59,6 +59,15 @@ jobs: profile: minimal toolchain: ${{ matrix.toolchain }} override: true + - name: Cache Rust dependencies + uses: actions/cache@v2 + with: + path: | + ~/.cargo/registry/index + ~/.cargo/registry/cache + ~/.cargo/git + target + key: ${{ runner.os }}-build-${{ hashFiles('**/lockfiles') }} - name: Install developer package dependencies run: sudo apt-get update && sudo apt-get install libpulse-dev portaudio19-dev libasound2-dev libsdl2-dev gstreamer1.0-dev libgstreamer-plugins-base1.0-dev - run: cargo build --locked --no-default-features @@ -94,6 +103,15 @@ jobs: target: ${{ matrix.target }} toolchain: ${{ matrix.toolchain }} override: true + - name: Cache Rust dependencies + uses: actions/cache@v2 + with: + path: | + ~/.cargo/registry/index + ~/.cargo/registry/cache + ~/.cargo/git + target + key: ${{ runner.os }}-build-${{ hashFiles('**/lockfiles') }} - name: Install cross run: cargo install cross || true - name: Build From 49789f01d7226c68a718aadf5ebd2684e61c9572 Mon Sep 17 00:00:00 2001 From: Sasha Hilton Date: Sun, 31 Jan 2021 02:02:34 +0000 Subject: [PATCH 2/2] Fix incorrect lockfiles reference --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c0ccff2c..09281ba3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -67,7 +67,7 @@ jobs: ~/.cargo/registry/cache ~/.cargo/git target - key: ${{ runner.os }}-build-${{ hashFiles('**/lockfiles') }} + key: ${{ runner.os }}-build-${{ hashFiles('**/Cargo.lock') }} - name: Install developer package dependencies run: sudo apt-get update && sudo apt-get install libpulse-dev portaudio19-dev libasound2-dev libsdl2-dev gstreamer1.0-dev libgstreamer-plugins-base1.0-dev - run: cargo build --locked --no-default-features @@ -111,7 +111,7 @@ jobs: ~/.cargo/registry/cache ~/.cargo/git target - key: ${{ runner.os }}-build-${{ hashFiles('**/lockfiles') }} + key: ${{ runner.os }}-build-${{ hashFiles('**/Cargo.lock') }} - name: Install cross run: cargo install cross || true - name: Build