History

Install jj in CI

Julius Marminge committed 6 months ago

Commit 8d0ef791 parent 96bd5ce3 files · +55 −0Browse files

Showing the changes to .github (3 of 3 files). Show all

Unified · Split

3 files
  1. .github/actions/setup-jj/action.yml +49 −0
  2. .github/workflows/ci.yml +3 −0
  3. .github/workflows/release.yml +3 −0
.github/actions/setup-jj/action.yml+49−0
@@ -0,0 +1,49 @@
1name: Setup Jujutsu
2description: Install the jj CLI from the official jj-vcs release artifacts.
3
4inputs:
5 version:
6 description: Jujutsu release tag to install.
7 required: false
8 default: v0.40.0
9
10runs:
11 using: composite
12 steps:
13 - name: Install jj
14 shell: bash
15 env:
16 JJ_VERSION: ${{ inputs.version }}
17 run: |
18 set -euo pipefail
19
20 case "${RUNNER_OS}-${RUNNER_ARCH}" in
21 Linux-X64)
22 asset="jj-${JJ_VERSION}-x86_64-unknown-linux-musl.tar.gz"
23 ;;
24 Linux-ARM64)
25 asset="jj-${JJ_VERSION}-aarch64-unknown-linux-musl.tar.gz"
26 ;;
27 macOS-X64)
28 asset="jj-${JJ_VERSION}-x86_64-apple-darwin.tar.gz"
29 ;;
30 macOS-ARM64)
31 asset="jj-${JJ_VERSION}-aarch64-apple-darwin.tar.gz"
32 ;;
33 *)
34 echo "Unsupported runner for jj install: ${RUNNER_OS}-${RUNNER_ARCH}" >&2
35 exit 1
36 ;;
37 esac
38
39 install_dir="${RUNNER_TEMP}/jj-${JJ_VERSION}"
40 mkdir -p "$install_dir"
41
42 curl -fsSL \
43 "https://github.com/jj-vcs/jj/releases/download/${JJ_VERSION}/${asset}" \
44 -o "${RUNNER_TEMP}/${asset}"
45 tar -xzf "${RUNNER_TEMP}/${asset}" -C "$install_dir"
46
47 chmod +x "${install_dir}/jj"
48 echo "$install_dir" >> "$GITHUB_PATH"
49 "${install_dir}/jj" --version
.github/workflows/ci.yml+3−0
@@ -25,6 +25,9 @@ jobs: · 24 unmodified lines
25 with:25 with:
26 node-version-file: package.json26 node-version-file: package.json
27 27
28 - name: Setup Jujutsu
29 uses: ./.github/actions/setup-jj
30
28 - name: Cache Bun and Turbo31 - name: Cache Bun and Turbo
29 uses: actions/cache@v532 uses: actions/cache@v5
30 with:33 with:
.github/workflows/release.yml+3−0
@@ -95,6 +95,9 @@ jobs: · 94 unmodified lines
95 with:95 with:
96 node-version-file: package.json96 node-version-file: package.json
97 97
98 - name: Setup Jujutsu
99 uses: ./.github/actions/setup-jj
100
98 - name: Install dependencies101 - name: Install dependencies
99 run: bun install --frozen-lockfile102 run: bun install --frozen-lockfile
100 103