diff --git a/.github/workflows/master-build.yml b/.github/workflows/master-build.yml index c7d987c..7db1fe0 100644 --- a/.github/workflows/master-build.yml +++ b/.github/workflows/master-build.yml @@ -16,16 +16,35 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Cache Cargo modules + id: cache-cargo + uses: actions/cache@v3 + env: + cache-name: cache-cargo-target-debug + with: + path: target + key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-${{ env.cache-name }}- - name: Build run: cargo build --verbose - name: Run tests run: cargo test --verbose -p schemsearch-lib + build-release: - runs-on: ubuntu-latest - steps: - uses: actions/checkout@v3 + - name: Cache Cargo modules + id: cache-cargo + uses: actions/cache@v3 + env: + cache-name: cache-cargo-target-release + with: + path: target + key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-${{ env.cache-name }}- - name: Build run: cargo build --verbose --release -p schemsearch-cli - name: Upload a Build Artifact diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml index 5aed70d..0a48337 100644 --- a/.github/workflows/release-build.yml +++ b/.github/workflows/release-build.yml @@ -19,6 +19,16 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Cache Cargo modules + id: cache-cargo + uses: actions/cache@v3 + env: + cache-name: cache-cargo-target-release + with: + path: target + key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-${{ env.cache-name }}- - name: Build run: cargo build --verbose --release -p schemsearch-cli - name: Create Tarball