Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 16 additions & 10 deletions .github/workflows/build-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,27 @@ jobs:
with:
fetch-depth: 0

- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update -qq
sudo apt-get install -y upx-ucl libjemalloc-dev libjemalloc2 libbz2-dev

- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: brew install jemalloc

- name: Record the Jemalloc library path
run: pkg-config --variable=libdir jemalloc > .jemalloc-libdir

- name: Set up Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v6.0.0
with:
go-version-file: go.mod
cache: true
cache-dependency-path: |
go.mod
.jemalloc-libdir
Comment on lines +50 to +52

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting cache-dependency-path explicitly replaces actions/setup-go's default glob (**/go.sum) rather than adding to it. This list only hashes go.mod and .jemalloc-libdirgo.sum is no longer part of the Go module cache key, so a dependency bump that only touches go.sum (e.g. a new indirect requirement's checksum, or a go mod tidy that doesn't change go.mod's content) won't bust the module cache.

Since the goal here is cache resilience, this looks like it should include go.sum too:

cache-dependency-path: |
  go.mod
  go.sum
  .jemalloc-libdir

Fix this →


- name: Set up Rust
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
Expand All @@ -56,16 +72,6 @@ jobs:
OS_NAME=$([ "${{ runner.os }}" == "macOS" ] && echo "darwin" || echo "linux")
echo "ARTIFACT_NAME=juno-${{ env.TAG }}-${OS_NAME}-${{ matrix.arch }}" >> $GITHUB_ENV

- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update -qq
sudo apt-get install -y upx-ucl libjemalloc-dev libjemalloc2 libbz2-dev

- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: brew install jemalloc

- name: Build binary
run: make juno

Expand Down
22 changes: 14 additions & 8 deletions .github/workflows/juno-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,24 @@ jobs:
- 'go.sum'
- '.github/workflows/juno-test.yml'

- name: Install Jemalloc (Linux)
if: runner.os == 'Linux'
run: sudo apt-get update -qq && sudo apt-get install -y libjemalloc-dev libjemalloc2 libbz2-dev

- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: brew install jemalloc

- name: Record the Jemalloc library path
run: pkg-config --variable=libdir jemalloc > .jemalloc-libdir

- name: Set up go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v6.0.0
with:
go-version-file: go.mod
cache-dependency-path: |
go.mod
.jemalloc-libdir
Comment on lines +60 to +62

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue as in build-binaries.yml: this cache-dependency-path overrides actions/setup-go's default **/go.sum glob instead of extending it, so go.sum is dropped from the module cache key here too. Recommend adding it back:

cache-dependency-path: |
  go.mod
  go.sum
  .jemalloc-libdir

- uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
with:
toolchain: "1.94.1"
Expand All @@ -60,14 +74,6 @@ jobs:
- name: Install deps
run: make install-deps

- name: Install Jemalloc (Linux)
if: runner.os == 'Linux'
run: sudo apt-get update -qq && sudo apt-get install -y libjemalloc-dev libjemalloc2 libbz2-dev

- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: brew install jemalloc

- name: Tests (Coverage)
if: matrix.os == 'ubuntu-latest'
env:
Expand Down
Loading