|
@@ -16,6 +16,8 @@ on:
|
|
|
|
|
|
env:
|
|
|
RUST_BACKTRACE: 1
|
|
|
+ CARGO_INCREMENTAL: 0 # This is set to 0 by the https://github.com/Swatinem/rust-cache
|
|
|
+ CARGO_PROFILE_DEV_DEBUG: 0 # This would add unnecessary bloat to the target folder, decreasing cache efficiency.
|
|
|
|
|
|
jobs:
|
|
|
test-tauri-cli:
|
|
@@ -42,38 +44,36 @@ jobs:
|
|
|
if: matrix.platform == 'windows-latest'
|
|
|
run: echo "CURRENT_DATE=$(Get-Date -Format "yyyy-MM-dd")" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
|
|
|
|
|
- - name: Cache cargo registry
|
|
|
- uses: actions/cache@v2.1.4
|
|
|
- with:
|
|
|
- path: ~/.cargo/registry
|
|
|
- # Add date to the cache to keep it up to date
|
|
|
- key: ${{ matrix.platform }}-stable-cargo-registry-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
|
|
|
- # Restore from outdated cache for speed
|
|
|
- restore-keys: |
|
|
|
- ${{ matrix.platform }}-stable-cargo-registry-${{ hashFiles('**/Cargo.toml') }}
|
|
|
- ${{ matrix.platform }}-stable-cargo-registry-
|
|
|
-
|
|
|
- - name: Cache cargo index
|
|
|
- uses: actions/cache@v2.1.4
|
|
|
+ - name: Cache cargo state
|
|
|
+ uses: actions/cache@v2
|
|
|
+ env:
|
|
|
+ cache-name: cargo-state
|
|
|
with:
|
|
|
- path: ~/.cargo/git
|
|
|
- # Add date to the cache to keep it up to date
|
|
|
- key: ${{ matrix.platform }}-stable-cargo-index-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
|
|
|
- # Restore from outdated cache for speed
|
|
|
+ path: |
|
|
|
+ ~/.cargo/registry
|
|
|
+ ~/.cargo/git
|
|
|
+ ~/.cargo/bin
|
|
|
+ key: ${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
|
|
|
restore-keys: |
|
|
|
- ${{ matrix.platform }}-stable-cargo-index-${{ hashFiles('**/Cargo.toml') }}
|
|
|
- ${{ matrix.platform }}-stable-cargo-index-
|
|
|
+ ${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-
|
|
|
+ ${{ matrix.platform }}-stable-${{ env.cache-name }}-
|
|
|
+ ${{ matrix.platform }}-stable-
|
|
|
+ ${{ matrix.platform }}-
|
|
|
|
|
|
- name: Cache CLI cargo target
|
|
|
uses: actions/cache@v2
|
|
|
+ env:
|
|
|
+ cache-name: cargo-cli
|
|
|
with:
|
|
|
path: tooling/cli/target
|
|
|
# Add date to the cache to keep it up to date
|
|
|
- key: ${{ matrix.platform }}-stable-cargo-cli-${{ hashFiles('tooling/cli/Cargo.lock') }}-${{ env.CURRENT_DATE }}
|
|
|
+ key: ${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('tooling/cli/Cargo.lock') }}-${{ env.CURRENT_DATE }}
|
|
|
# Restore from outdated cache for speed
|
|
|
restore-keys: |
|
|
|
- ${{ matrix.platform }}-stable-cargo-cli-${{ hashFiles('tooling/cli/Cargo.lock') }}
|
|
|
- ${{ matrix.platform }}-stable-cargo-cli-
|
|
|
+ ${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('tooling/cli/Cargo.lock') }}
|
|
|
+ ${{ matrix.platform }}-stable-${{ env.cache-name }}-
|
|
|
+ ${{ matrix.platform }}-stable-
|
|
|
+ ${{ matrix.platform }}-
|
|
|
|
|
|
- name: build CLI
|
|
|
uses: actions-rs/cargo@v1
|
|
@@ -116,49 +116,51 @@ jobs:
|
|
|
if: matrix.platform == 'windows-latest'
|
|
|
run: echo "CURRENT_DATE=$(Get-Date -Format "yyyy-MM-dd")" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
|
|
|
|
|
- - name: Cache cargo registry
|
|
|
- uses: actions/cache@v2.1.4
|
|
|
- with:
|
|
|
- path: ~/.cargo/registry
|
|
|
- # Add date to the cache to keep it up to date
|
|
|
- key: ${{ matrix.platform }}-stable-cargo-registry-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
|
|
|
- # Restore from outdated cache for speed
|
|
|
- restore-keys: |
|
|
|
- ${{ matrix.platform }}-stable-cargo-registry-${{ hashFiles('**/Cargo.toml') }}
|
|
|
- ${{ matrix.platform }}-stable-cargo-registry-
|
|
|
-
|
|
|
- - name: Cache cargo index
|
|
|
- uses: actions/cache@v2.1.4
|
|
|
+ - name: Cache cargo state
|
|
|
+ uses: actions/cache@v2
|
|
|
+ env:
|
|
|
+ cache-name: cargo-state
|
|
|
with:
|
|
|
- path: ~/.cargo/git
|
|
|
- # Add date to the cache to keep it up to date
|
|
|
- key: ${{ matrix.platform }}-stable-cargo-index-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
|
|
|
- # Restore from outdated cache for speed
|
|
|
+ path: |
|
|
|
+ ~/.cargo/registry
|
|
|
+ ~/.cargo/git
|
|
|
+ ~/.cargo/bin
|
|
|
+ key: ${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }}
|
|
|
restore-keys: |
|
|
|
- ${{ matrix.platform }}-stable-cargo-index-${{ hashFiles('**/Cargo.toml') }}
|
|
|
- ${{ matrix.platform }}-stable-cargo-index-
|
|
|
+ ${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('**/Cargo.toml') }}-
|
|
|
+ ${{ matrix.platform }}-stable-${{ env.cache-name }}-
|
|
|
+ ${{ matrix.platform }}-stable-
|
|
|
+ ${{ matrix.platform }}-
|
|
|
|
|
|
- name: Cache CLI cargo target
|
|
|
uses: actions/cache@v2
|
|
|
+ env:
|
|
|
+ cache-name: cargo-cli
|
|
|
with:
|
|
|
path: tooling/cli/target
|
|
|
# Add date to the cache to keep it up to date
|
|
|
- key: ${{ matrix.platform }}-stable-cargo-cli-${{ hashFiles('tooling/cli/Cargo.lock') }}-${{ env.CURRENT_DATE }}
|
|
|
+ key: ${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('tooling/cli/Cargo.lock') }}-${{ env.CURRENT_DATE }}
|
|
|
# Restore from outdated cache for speed
|
|
|
restore-keys: |
|
|
|
- ${{ matrix.platform }}-stable-cargo-cli-${{ hashFiles('tooling/cli/Cargo.lock') }}
|
|
|
- ${{ matrix.platform }}-stable-cargo-cli-
|
|
|
+ ${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('tooling/cli/Cargo.lock') }}
|
|
|
+ ${{ matrix.platform }}-stable-${{ env.cache-name }}-
|
|
|
+ ${{ matrix.platform }}-stable-
|
|
|
+ ${{ matrix.platform }}-
|
|
|
|
|
|
- name: Cache template cargo target
|
|
|
uses: actions/cache@v2
|
|
|
+ env:
|
|
|
+ cache-name: cargo-template
|
|
|
with:
|
|
|
path: tooling/cli/node/test/jest/fixtures/empty/src-tauri/target
|
|
|
# Add date to the cache to keep it up to date
|
|
|
- key: ${{ matrix.platform }}-stable-template-${{ hashFiles('tooling/cli/templates/app/**') }}-${{ env.CURRENT_DATE }}
|
|
|
+ key: ${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('tooling/cli/templates/app/**') }}-${{ env.CURRENT_DATE }}
|
|
|
# Restore from outdated cache for speed
|
|
|
restore-keys: |
|
|
|
- ${{ matrix.platform }}-stable-template-${{ hashFiles('tooling/cli/templates/app/**') }}
|
|
|
- ${{ matrix.platform }}-stable-template-
|
|
|
+ ${{ matrix.platform }}-stable-${{ env.cache-name }}-${{ hashFiles('tooling/cli/templates/app/**') }}
|
|
|
+ ${{ matrix.platform }}-stable-${{ env.cache-name }}-
|
|
|
+ ${{ matrix.platform }}-stable-
|
|
|
+ ${{ matrix.platform }}-
|
|
|
|
|
|
- name: test
|
|
|
timeout-minutes: 30
|