From 8d0ef79c6f9cf18e6d7d89ea43eeca315dca0408 Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Sat, 2 May 2026 09:44:44 -0700 Subject: [PATCH] Install jj in CI --- .github/actions/setup-jj/action.yml | 49 +++++++++++++++++++++++++++++ .github/workflows/ci.yml | 3 ++ .github/workflows/release.yml | 3 ++ 3 files changed, 55 insertions(+) create mode 100644 .github/actions/setup-jj/action.yml diff --git a/.github/actions/setup-jj/action.yml b/.github/actions/setup-jj/action.yml new file mode 100644 index 0000000000..d54462aa5b --- /dev/null +++ b/.github/actions/setup-jj/action.yml @@ -0,0 +1,49 @@ +name: Setup Jujutsu +description: Install the jj CLI from the official jj-vcs release artifacts. + +inputs: + version: + description: Jujutsu release tag to install. + required: false + default: v0.40.0 + +runs: + using: composite + steps: + - name: Install jj + shell: bash + env: + JJ_VERSION: ${{ inputs.version }} + run: | + set -euo pipefail + + case "${RUNNER_OS}-${RUNNER_ARCH}" in + Linux-X64) + asset="jj-${JJ_VERSION}-x86_64-unknown-linux-musl.tar.gz" + ;; + Linux-ARM64) + asset="jj-${JJ_VERSION}-aarch64-unknown-linux-musl.tar.gz" + ;; + macOS-X64) + asset="jj-${JJ_VERSION}-x86_64-apple-darwin.tar.gz" + ;; + macOS-ARM64) + asset="jj-${JJ_VERSION}-aarch64-apple-darwin.tar.gz" + ;; + *) + echo "Unsupported runner for jj install: ${RUNNER_OS}-${RUNNER_ARCH}" >&2 + exit 1 + ;; + esac + + install_dir="${RUNNER_TEMP}/jj-${JJ_VERSION}" + mkdir -p "$install_dir" + + curl -fsSL \ + "https://github.com/jj-vcs/jj/releases/download/${JJ_VERSION}/${asset}" \ + -o "${RUNNER_TEMP}/${asset}" + tar -xzf "${RUNNER_TEMP}/${asset}" -C "$install_dir" + + chmod +x "${install_dir}/jj" + echo "$install_dir" >> "$GITHUB_PATH" + "${install_dir}/jj" --version diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e3329b1dad..ef90a78be0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,6 +25,9 @@ jobs: with: node-version-file: package.json + - name: Setup Jujutsu + uses: ./.github/actions/setup-jj + - name: Cache Bun and Turbo uses: actions/cache@v5 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4409c54c8e..e06f9c3dce 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -95,6 +95,9 @@ jobs: with: node-version-file: package.json + - name: Setup Jujutsu + uses: ./.github/actions/setup-jj + - name: Install dependencies run: bun install --frozen-lockfile