This commit is contained in:
@@ -38,22 +38,36 @@ jobs:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Generate dependency hash
|
||||
id: deps_hash
|
||||
run: |
|
||||
# Create a hash of dependencies only (excludes package version)
|
||||
# This prevents cache invalidation on version bumps
|
||||
{
|
||||
# Get all dependencies from Cargo.toml (skip package.version)
|
||||
grep -A 9999 '^\[dependencies' Cargo.toml 2>/dev/null || true
|
||||
grep -A 9999 '^\[dev-dependencies' Cargo.toml 2>/dev/null || true
|
||||
grep -A 9999 '^\[build-dependencies' Cargo.toml 2>/dev/null || true
|
||||
# Include Cargo.lock for exact dependency versions
|
||||
cat Cargo.lock 2>/dev/null || true
|
||||
} | sha256sum | cut -d' ' -f1 > /tmp/deps_hash.txt
|
||||
echo "hash=$(cat /tmp/deps_hash.txt)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Cache Cargo Dependencies
|
||||
uses: actions/cache@v3
|
||||
uses: https://gitea.com/actions/cache@v3
|
||||
with:
|
||||
# Path to cache: The 'target' directory contains all compiled libraries
|
||||
path: |
|
||||
~/.cargo/bin/
|
||||
~/.cargo/registry/
|
||||
~/.cargo/registry/index/
|
||||
~/.cargo/registry/cache/
|
||||
~/.cargo/git/db/
|
||||
target/
|
||||
# Key: Changes if OS, Rust toolchain, or dependencies change
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-${{ matrix.target }}
|
||||
# Restore Keys: Use for finding a cache from a slightly older lock file
|
||||
# Key: Changes only when dependencies change, not when version changes
|
||||
key: ${{ runner.os }}-cargo-${{ steps.deps_hash.outputs.hash }}-${{ matrix.target }}
|
||||
# Restore Keys: Fallback to any cache for this target
|
||||
restore-keys: |
|
||||
${{ runner.os }}-cargo-${{ matrix.target }}-
|
||||
${{ runner.os }}-cargo-${{ steps.deps_hash.outputs.hash }}-
|
||||
${{ runner.os }}-cargo-
|
||||
env:
|
||||
GHA_TAR_PATH: /usr/bin/tar
|
||||
|
||||
- name: Setup cross-compilation tools
|
||||
if: matrix.setup_cmd != ''
|
||||
|
||||
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -2706,7 +2706,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rlogg"
|
||||
version = "0.3.0"
|
||||
version = "0.3.1"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"eframe",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "rlogg"
|
||||
version = "0.3.0"
|
||||
version = "0.3.1"
|
||||
edition = "2024"
|
||||
authors = ["Stanislav Pastushenko <staspast1@gmail.com>"]
|
||||
description = "A fast log file viewer with search, filtering, and highlighting capabilities"
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
FROM rust:latest
|
||||
RUN apt update && \
|
||||
apt install -y nodejs npm tar
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
nodejs \
|
||||
npm \
|
||||
tar \
|
||||
gzip \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
Reference in New Issue
Block a user