Use proper key for Linux rust cache
This commit is contained in:
committed by
Kirill Bulatov
parent
901279a044
commit
702393af59
+32
-32
@@ -51,14 +51,14 @@ jobs:
|
|||||||
- name: Ensure fresh merge
|
- name: Ensure fresh merge
|
||||||
shell: bash -euxo pipefail {0}
|
shell: bash -euxo pipefail {0}
|
||||||
run: |
|
run: |
|
||||||
if [ -z "$GITHUB_BASE_REF" ];
|
if [ -z "$GITHUB_BASE_REF" ];
|
||||||
then
|
then
|
||||||
echo "BUF_BASE_BRANCH=$(git merge-base origin/main HEAD)" >> $GITHUB_ENV
|
echo "BUF_BASE_BRANCH=$(git merge-base origin/main HEAD)" >> $GITHUB_ENV
|
||||||
else
|
else
|
||||||
git checkout -B temp
|
git checkout -B temp
|
||||||
git merge -q origin/$GITHUB_BASE_REF -m "merge main into temp"
|
git merge -q origin/$GITHUB_BASE_REF -m "merge main into temp"
|
||||||
echo "BUF_BASE_BRANCH=$GITHUB_BASE_REF" >> $GITHUB_ENV
|
echo "BUF_BASE_BRANCH=$GITHUB_BASE_REF" >> $GITHUB_ENV
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- uses: bufbuild/buf-setup-action@v1
|
- uses: bufbuild/buf-setup-action@v1
|
||||||
- uses: bufbuild/buf-breaking-action@v1
|
- uses: bufbuild/buf-breaking-action@v1
|
||||||
@@ -96,34 +96,34 @@ jobs:
|
|||||||
name: (Linux) Run Clippy and tests
|
name: (Linux) Run Clippy and tests
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
clean: false
|
clean: false
|
||||||
submodules: "recursive"
|
submodules: "recursive"
|
||||||
|
|
||||||
- name: Restore from cache
|
- name: Restore from cache
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/bin/
|
~/.cargo/bin/
|
||||||
~/.cargo/registry/index/
|
~/.cargo/registry/index/
|
||||||
~/.cargo/registry/cache/
|
~/.cargo/registry/cache/
|
||||||
~/.cargo/git/db/
|
~/.cargo/git/db/
|
||||||
target/
|
target/
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/rust-toolchain.toml') }}-${{ hashFiles('**/Cargo.lock') }}
|
||||||
restore-keys: ${{ runner.os }}-cargo-
|
restore-keys: ${{ runner.os }}-cargo-${{ hashFiles('**/rust-toolchain.toml') }}-
|
||||||
|
|
||||||
- name: configure linux
|
- name: configure linux
|
||||||
shell: bash -euxo pipefail {0}
|
shell: bash -euxo pipefail {0}
|
||||||
run: script/linux
|
run: script/linux
|
||||||
|
|
||||||
- name: cargo clippy
|
- name: cargo clippy
|
||||||
shell: bash -euxo pipefail {0}
|
shell: bash -euxo pipefail {0}
|
||||||
run: script/clippy
|
run: script/clippy
|
||||||
|
|
||||||
- name: Build Zed
|
- name: Build Zed
|
||||||
run: cargo build -p zed
|
run: cargo build -p zed
|
||||||
bundle:
|
bundle:
|
||||||
name: Bundle app
|
name: Bundle app
|
||||||
runs-on:
|
runs-on:
|
||||||
|
|||||||
Reference in New Issue
Block a user