Skip to content

fix: Timer included time of waiting for last input (#116) #249

fix: Timer included time of waiting for last input (#116)

fix: Timer included time of waiting for last input (#116) #249

Workflow file for this run

name: Test & Build
on:
push:
branches:
- main
pull_request:
permissions: read-all
env:
CARGO_INCREMENTAL: 0
CARGO_PROFILE_DEV_DEBUG: 0
jobs:
test:
name: Test
strategy:
fail-fast: false
matrix:
build: [linux-musl, macos-x86_64, macos-aarch64, win-msvc]
include:
- build: linux-musl
os: ubuntu-22.04
target: x86_64-unknown-linux-musl
- build: macos-x86_64
os: macos-13
target: x86_64-apple-darwin
- build: macos-aarch64
os: macos-14
target: aarch64-apple-darwin
- build: win-msvc
os: windows-2022
target: x86_64-pc-windows-msvc
runs-on: ${{ matrix.os }}
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@nightly
with:
target: ${{ matrix.target }}
- name: Install cargo-binstall
uses: cargo-bins/cargo-binstall@main
- name: Install jj
run: cargo binstall --no-confirm --strategies crate-meta-data jj-cli
- name: Test
run: cargo test --all-targets --verbose
env:
RUST_BACKTRACE: 1
build:
name: Build
strategy:
fail-fast: false
matrix:
build: [linux-musl, macos-x86_64, macos-aarch64, win-msvc]
include:
- build: linux-musl
os: ubuntu-24.04
target: x86_64-unknown-linux-musl
- build: macos-x86_64
os: macos-13
target: x86_64-apple-darwin
- build: macos-aarch64
os: macos-14
target: aarch64-apple-darwin
- build: win-msvc
os: windows-2022
target: x86_64-pc-windows-msvc
runs-on: ${{ matrix.os }}
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@nightly
with:
target: ${{ matrix.target }}
- name: Build lazyjj
run: cargo build --target ${{ matrix.target }} --verbose --release --locked
- name: Build archive
shell: bash
run: |
# TODO: Create a third action to combine both in one archive
short_sha=`echo ${GITHUB_SHA} | cut -c1-8`
outdir="target/${{ matrix.target }}/release"
name="lazyjj-$short_sha-${{ matrix.target }}"
cd "$outdir"
ls # Debug
if [ "${{ matrix.os }}" = "windows-2022" ]; then
7z a "../../../$name.zip" lazyjj.exe
echo "ASSET=$name.zip" >> $GITHUB_ENV
else
tar czf "../../../$name.tar.gz" lazyjj
echo "ASSET=$name.tar.gz" >> $GITHUB_ENV
fi
- name: Upload archive
uses: actions/upload-artifact@v4
with:
name: ${{ env.ASSET }}
path: ${{ env.ASSET }}
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@nightly
with:
components: clippy
- name: Clippy
run: cargo clippy --workspace --all-targets --verbose
rustfmt:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- run: cargo fmt --all -- --check