Skip to content

Commit d677735

Browse files
committed
ci: use rust stable, switch from unmaintained actions-rs/toolchain to dtolnay/rust-toolchain
1 parent 85bce09 commit d677735

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,11 @@ jobs:
5252
echo "ANDROID_NDK_HOME=$ANDROID_NDK_HOME" >> $GITHUB_ENV
5353
5454
# Rust
55-
- name: Set up Rust nightly
56-
uses: actions-rs/toolchain@v1
55+
- name: Set up Rust
56+
id: toolchain
57+
uses: dtolnay/rust-toolchain@stable
5758
if: steps.cache-jniLibs.outputs.cache-hit != 'true'
58-
with:
59-
profile: minimal
60-
toolchain: nightly
61-
override: true
59+
6260
- name: Set up Rust toolchain for Android NDK
6361
if: steps.cache-jniLibs.outputs.cache-hit != 'true'
6462
run: |
@@ -71,7 +69,10 @@ jobs:
7169
cache-name: cargo-build-target
7270
with:
7371
path: aw-server-rust/target
74-
key: ${{ env.cache-name }}-release-${{ env.RELEASE }}-${{ hashFiles('**/Cargo.lock') }}
72+
# key needs to contain cachekey due to https://github.com/ActivityWatch/aw-server-rust/issues/180
73+
key: ${{ env.cache-name }}-${{ runner.os }}-release-${{ env.RELEASE }}-${{ steps.toolchain.outputs.cachekey }}-${{ hashFiles('**/Cargo.lock') }}
74+
restore-keys: |
75+
${{ env.cache-name }}-${{ runner.os }}-release-${{ env.RELEASE }}-${{ steps.toolchain.outputs.cachekey }}-
7576
7677
- name: Build aw-server-rust
7778
if: steps.cache-jniLibs.outputs.cache-hit != 'true'

0 commit comments

Comments
 (0)