Skip to content

Commit b264cb8

Browse files
authored
chore(mise): add lockfile with multi-platform support and version pin (#946)
1 parent c890f0e commit b264cb8

8 files changed

Lines changed: 254 additions & 15 deletions

File tree

.github/workflows/branch-checks.yml

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,37 @@ permissions:
1313
packages: read
1414

1515
jobs:
16+
mise-lockfile:
17+
name: mise Lockfile
18+
runs-on: build-amd64
19+
container:
20+
image: ghcr.io/nvidia/openshell/ci:latest
21+
credentials:
22+
username: ${{ github.actor }}
23+
password: ${{ secrets.GITHUB_TOKEN }}
24+
steps:
25+
- uses: actions/checkout@v4
26+
27+
- name: Mark workspace as safe for git
28+
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
29+
30+
- name: Detect mise config changes
31+
id: changed
32+
uses: tj-actions/changed-files@aa08304bd477b800d468db44fe10f6c61f7f7b11 # v42.1.0
33+
with:
34+
files: |
35+
mise.toml
36+
mise.lock
37+
38+
- name: Verify mise.lock is in sync with mise.toml
39+
if: steps.changed.outputs.any_changed == 'true'
40+
run: |
41+
mise lock
42+
if ! git diff --exit-code mise.lock; then
43+
echo "::error::mise.lock is out of sync with mise.toml. Run 'mise lock' locally and commit the result." >&2
44+
exit 1
45+
fi
46+
1647
license-headers:
1748
name: License Headers
1849
runs-on: build-amd64
@@ -25,7 +56,7 @@ jobs:
2556
- uses: actions/checkout@v4
2657

2758
- name: Install tools
28-
run: mise install
59+
run: mise install --locked
2960

3061
- name: Check license headers
3162
run: mise run license:check
@@ -46,7 +77,7 @@ jobs:
4677
- uses: actions/checkout@v4
4778

4879
- name: Install tools
49-
run: mise install
80+
run: mise install --locked
5081

5182
- name: Configure sccache remote cache
5283
if: vars.SCCACHE_MEMCACHED_ENDPOINT != ''
@@ -90,7 +121,7 @@ jobs:
90121
- uses: actions/checkout@v4
91122

92123
- name: Install tools
93-
run: mise install
124+
run: mise install --locked
94125

95126
- name: Install dependencies
96127
run: uv sync --frozen

.github/workflows/ci-image.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
paths:
77
- 'deploy/docker/Dockerfile.ci'
88
- 'mise.toml'
9+
- 'mise.lock'
910
- 'tasks/**'
1011
- '.github/workflows/ci-image.yml'
1112
workflow_dispatch:

.github/workflows/release-dev.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ jobs:
246246
run: git fetch --tags --force
247247

248248
- name: Install tools
249-
run: mise install
249+
run: mise install --locked
250250

251251
- name: Cache Rust target and registry
252252
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
@@ -418,7 +418,7 @@ jobs:
418418
run: git fetch --tags --force
419419

420420
- name: Install tools
421-
run: mise install
421+
run: mise install --locked
422422

423423
- name: Cache Rust target and registry
424424
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
@@ -569,7 +569,7 @@ jobs:
569569
run: git fetch --tags --force
570570

571571
- name: Install tools
572-
run: mise install
572+
run: mise install --locked
573573

574574
- name: Cache Rust target and registry
575575
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2

.github/workflows/release-tag.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ jobs:
269269
run: git fetch --tags --force
270270

271271
- name: Install tools
272-
run: mise install
272+
run: mise install --locked
273273

274274
- name: Cache Rust target and registry
275275
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
@@ -443,7 +443,7 @@ jobs:
443443
run: git fetch --tags --force
444444

445445
- name: Install tools
446-
run: mise install
446+
run: mise install --locked
447447

448448
- name: Cache Rust target and registry
449449
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
@@ -528,7 +528,7 @@ jobs:
528528
run: git fetch --tags --force
529529

530530
- name: Install tools
531-
run: mise install
531+
run: mise install --locked
532532

533533
- name: Cache Rust target and registry
534534
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2

.github/workflows/release-vm-dev.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ jobs:
153153
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin
154154

155155
- name: Install tools
156-
run: mise install
156+
run: mise install --locked
157157

158158
- name: Install zstd
159159
run: apt-get update && apt-get install -y --no-install-recommends zstd && rm -rf /var/lib/apt/lists/*
@@ -222,7 +222,7 @@ jobs:
222222
run: git fetch --tags --force
223223

224224
- name: Install tools
225-
run: mise install
225+
run: mise install --locked
226226

227227
- name: Cache Rust target and registry
228228
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
@@ -459,7 +459,7 @@ jobs:
459459
run: git fetch --tags --force
460460

461461
- name: Install tools
462-
run: mise install
462+
run: mise install --locked
463463

464464
- name: Cache Rust target and registry
465465
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2

deploy/docker/Dockerfile.ci

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,19 @@ RUN case "$TARGETARCH" in \
6565
&& curl -fsSL "https://github.com/cli/cli/releases/download/v${GH_VERSION}/gh_${GH_VERSION}_linux_${gh_arch}.tar.gz" \
6666
| tar xz --strip-components=2 -C /usr/local/bin "gh_${GH_VERSION}_linux_${gh_arch}/bin/gh"
6767

68-
# Install mise
68+
# Install mise (NOTE: keep this version in sync with mise.toml)
6969
ARG MISE_VERSION=v2026.4.20
7070
RUN curl https://mise.run | MISE_VERSION=$MISE_VERSION sh
7171

7272
# Copy mise.toml and task includes, then install all tools via mise
7373
COPY mise.toml /opt/mise/mise.toml
74+
COPY mise.lock /opt/mise/mise.lock
7475
COPY tasks/ /opt/mise/tasks/
7576
WORKDIR /opt/mise
7677
RUN --mount=type=secret,id=MISE_GITHUB_TOKEN \
7778
export MISE_GITHUB_TOKEN="$(cat /run/secrets/MISE_GITHUB_TOKEN 2>/dev/null || true)" && \
7879
mise trust /opt/mise/mise.toml && \
79-
env -u RUSTC_WRAPPER mise install && \
80+
env -u RUSTC_WRAPPER mise install --locked && \
8081
mise reshim && \
8182
npm install -g "npm@${NPM_VERSION}" && \
8283
mise reshim && \

mise.lock

Lines changed: 194 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)