cli: add difftastic as diff tool #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: binaries | |
on: | |
push: | |
branches: | |
- main | |
permissions: read-all | |
jobs: | |
binaries: | |
strategy: | |
fail-fast: false | |
matrix: | |
build: [linux-x86_64-musl, linux-x86_64-gnu, linux-aarch64-musl, linux-aarch64-gnu, macos-x86_64, macos-aarch64, win-x86_64] | |
include: | |
- build: linux-x86_64-musl | |
os: ubuntu-24.04 | |
target: x86_64-unknown-linux-musl | |
- build: linux-x86_64-gnu | |
os: ubuntu-24.04 | |
target: x86_64-unknown-linux-gnu | |
- build: linux-aarch64-musl | |
os: ubuntu-24.04-arm | |
target: aarch64-unknown-linux-musl | |
- build: linux-aarch64-gnu | |
os: ubuntu-24.04-arm | |
target: aarch64-unknown-linux-gnu | |
- build: macos-x86_64 | |
os: macos-13 | |
target: x86_64-apple-darwin | |
- build: macos-aarch64 | |
os: macos-14 | |
target: aarch64-apple-darwin | |
- build: win-x86_64 | |
os: windows-2022 | |
target: x86_64-pc-windows-msvc | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 15 # NOTE (aseipp): should be safe, because tests aren't run | |
name: Build binary artifacts | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- name: Install packages (Ubuntu) | |
if: startsWith(matrix.os, 'ubuntu') | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y --no-install-recommends xz-utils liblz4-tool musl-tools | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@a54c7afa936fefeb4456b2dd8068152669aa8203 | |
with: | |
toolchain: stable | |
target: ${{ matrix.target }} | |
- name: Build release binary | |
shell: bash | |
run: cargo build --target ${{ matrix.target }} --verbose --release --features packaging,vendored-openssl | |
- name: Set up artifact directory | |
shell: bash | |
run: | | |
outdir="target/${{ matrix.target }}/release" | |
BIN=$outdir/jj | |
[[ "${{ matrix.os }}" == "windows-latest" ]] && BIN+=".exe" | |
mkdir -p target/out | |
cp $BIN target/out | |
- name: Publish binary artifact | |
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 | |
with: | |
name: jj-${{ matrix.target }} | |
path: target/out |