Skip to content

Commit

Permalink
fix: Use rust-cache and fix .deb release (#2205)
Browse files Browse the repository at this point in the history
* fix: Use `rust-cache` instead of `actions/cache`

* fix: Fix `.deb` release
  • Loading branch information
chubei authored Nov 2, 2023
1 parent 914ba53 commit 43b97fc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 49 deletions.
17 changes: 2 additions & 15 deletions .github/workflows/dozer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,8 @@ jobs:
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: ⚡ Cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/.package-cache
~/.cargo/registry/
~/.cargo/git/db/
target/
key: clippy-${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
restore-keys: |
clippy-${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}
clippy-${{ runner.os }}-cargo-
- name: Rust cache
uses: swatinem/rust-cache@v2

- name: Clippy
run: |
Expand Down
44 changes: 10 additions & 34 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ jobs:
tar -czvf ${{ env.DEB_NAME }}.tar.gz ${{ env.DEB_NAME }}/
cp deb/${{ env.DEB_NAME }}.deb ${{ env.DEB_NAME }}/
cp deb/${{ env.DEB_NAME }}.deb ./
ls -l ${{ env.DEB_NAME }}
ls -l ${{ env.DEB_NAME }}*
- name: Upload the release
uses: svenstaro/upload-release-action@v2
Expand Down Expand Up @@ -187,21 +187,9 @@ jobs:
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: ⚡ Cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/.package-cache
~/.cargo/registry/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-release-${{ hashFiles('Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-release-${{ hashFiles('Cargo.lock') }}
${{ runner.os }}-cargo-release-

- name: Rust cache
uses: swatinem/rust-cache@v2

- name: Cargo build
uses: actions-rs/cargo@v1
Expand Down Expand Up @@ -286,21 +274,9 @@ jobs:
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: ⚡ Cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/.package-cache
~/.cargo/registry/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-release-${{ hashFiles('Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-release-${{ hashFiles('Cargo.lock') }}
${{ runner.os }}-cargo-release-

- name: Rust cache
uses: swatinem/rust-cache@v2

- name: Install cargo-deb
if: matrix.os == 'ubuntu-20-16-cores'
Expand Down Expand Up @@ -330,9 +306,9 @@ jobs:
tar -czvf ${{matrix.asset_name}}.tar.gz \
${{matrix.asset_name}}/
cp deb/${{matrix.asset_name}}.deb ${{matrix.asset_name}}/ 2>/dev/null || :
cp deb/${{matrix.asset_name}}.deb ./ 2>/dev/null || :
ls -l ${{matrix.asset_name}}
ls -l ${{matrix.asset_name}}*
- name: Upload the release
uses: svenstaro/upload-release-action@v2
Expand Down

0 comments on commit 43b97fc

Please sign in to comment.