ci: cache cargo registry and target between Flatpak builds
Build and Publish HeiniRemote Agent Flatpak / build (push) Failing after 6m7s
Build and Publish HeiniRemote Agent Flatpak / build (push) Failing after 6m7s
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018jkHZhr7ZzHGGuE2bJQmGa
This commit is contained in:
1 parent
da04640fdf
commit
11def894e2
1 file changed
+18
-2
@@ -106,7 +106,7 @@ jobs:
|
|||||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal
|
||||||
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
||||||
|
|
||||||
- name: Build agent from upstream source
|
- name: Fetch upstream source
|
||||||
if: steps.check.outputs.build == 'true'
|
if: steps.check.outputs.build == 'true'
|
||||||
env:
|
env:
|
||||||
TOKEN: ${{ secrets.HeiniRemoteFlatpakActionReleases }}
|
TOKEN: ${{ secrets.HeiniRemoteFlatpakActionReleases }}
|
||||||
@@ -117,7 +117,23 @@ jobs:
|
|||||||
git -C upstream remote add origin "$UPSTREAM_URL"
|
git -C upstream remote add origin "$UPSTREAM_URL"
|
||||||
git -C upstream fetch -q --depth 1 origin "${{ steps.ver.outputs.ref }}"
|
git -C upstream fetch -q --depth 1 origin "${{ steps.ver.outputs.ref }}"
|
||||||
git -C upstream checkout -q FETCH_HEAD
|
git -C upstream checkout -q FETCH_HEAD
|
||||||
cargo build --release -p heiniremote-agent --manifest-path upstream/Cargo.toml
|
|
||||||
|
# Same cache layout as the upstream workflows: without it every build
|
||||||
|
# compiled all dependencies from scratch (the bulk of the job's time).
|
||||||
|
- name: Cache cargo
|
||||||
|
if: steps.check.outputs.build == 'true'
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cargo/registry
|
||||||
|
~/.cargo/git
|
||||||
|
upstream/target
|
||||||
|
key: cargo-flatpak-${{ hashFiles('upstream/Cargo.lock') }}
|
||||||
|
restore-keys: cargo-flatpak-
|
||||||
|
|
||||||
|
- name: Build agent from upstream source
|
||||||
|
if: steps.check.outputs.build == 'true'
|
||||||
|
run: cargo build --release -p heiniremote-agent --manifest-path upstream/Cargo.toml
|
||||||
|
|
||||||
- name: Install Flatpak runtime and SDK
|
- name: Install Flatpak runtime and SDK
|
||||||
if: steps.check.outputs.build == 'true'
|
if: steps.check.outputs.build == 'true'
|
||||||
|
|||||||
Reference in new issue
Block a user