-
-
Notifications
You must be signed in to change notification settings - Fork 283
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ci): change cache & toolchain install (#1019)
- Loading branch information
1 parent
b062e94
commit 855bde4
Showing
1 changed file
with
3 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,10 +20,9 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v2 | ||
- name: install stable | ||
uses: actions-rs/toolchain@v1 | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: stable | ||
target: ${{ matrix.platform.target }} | ||
targets: ${{ matrix.platform.target }} | ||
|
||
- name: install webkit2gtk (ubuntu only) | ||
if: contains(matrix.platform.target, 'gnu') | ||
|
@@ -38,41 +37,7 @@ jobs: | |
Invoke-WebRequest https://go.microsoft.com/fwlink/p/?LinkId=2124703 -OutFile installwebview.exe -UseBasicParsing | ||
cmd /C start /wait installwebview.exe /silent /install | ||
- name: Get current date | ||
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV | ||
|
||
- name: Cache cargo registry | ||
uses: actions/[email protected] | ||
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/[email protected] | ||
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 | ||
restore-keys: | | ||
${{ matrix.platform }}-stable-cargo-index-${{ hashFiles('Cargo.toml') }} | ||
${{ matrix.platform }}-stable-cargo-index- | ||
- name: Cache cargo target | ||
uses: actions/cache@v2 | ||
with: | ||
path: target | ||
# Add date to the cache to keep it up to date | ||
key: ${{ matrix.platform }}-stable-cargo-core-${{ hashFiles('Cargo.toml') }}-${{ env.CURRENT_DATE }} | ||
# Restore from outdated cache for speed | ||
restore-keys: | | ||
${{ matrix.platform }}-stable-cargo-core-${{ hashFiles('Cargo.toml') }} | ||
${{ matrix.platform }}-stable-cargo-core- | ||
- uses: Swatinem/rust-cache@v2 | ||
|
||
- name: build wry | ||
run: cargo build --target ${{ matrix.platform.target }} | ||
|
@@ -95,4 +60,3 @@ jobs: | |
contains(matrix.platform.target, 'windows') || | ||
contains(matrix.platform.target, 'apple')) | ||
run: cargo build --no-default-features --features winit --target ${{ matrix.platform.target }} | ||
|