v1.0.2 CropOptions #118
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: CI | |
on: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
merge_group: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
env: | |
CLICOLOR_FORCE: 1 | |
jobs: | |
ci: | |
name: CI | |
strategy: | |
matrix: | |
platform: [ubuntu-latest, windows-latest, macos-latest] | |
fail-fast: true | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: 1.74.0 | |
profile: default | |
override: true | |
- uses: davidB/rust-cargo-make@v1 | |
- name: CI | |
if: matrix.platform == 'ubuntu-latest' | |
uses: actions-rs/cargo@v1 | |
with: | |
command: make | |
args: ci | |
- name: Build | |
if: matrix.platform != 'ubuntu-latest' | |
uses: actions-rs/cargo@v1 | |
with: | |
command: make | |
args: build | |
- name: Build a windows binary | |
if: matrix.platform == 'windows-latest' | |
run: cargo build --bin ratatui-image --features crossterm | |
ensure-readme: | |
name: Ensure readme is up-to-date | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: 1.74.0 | |
profile: default | |
override: true | |
- uses: davidB/rust-cargo-make@v1 | |
- name: Make readme | |
run: cargo make readme | |
- name: Ensure no changes | |
run: git diff --exit-code . | |
xvfb: | |
name: Xvfb | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: 1.74.0 | |
profile: default | |
override: true | |
- uses: davidB/rust-cargo-make@v1 | |
- name: Install terminals and tools | |
# xwd is in x11-apps, convert seems to be installed | |
run: sudo apt-get install -y x11-apps xterm | |
- name: Screenshot | |
run: cargo make screenshot-xvfb | |
- name: Upload screenshot | |
uses: actions/upload-artifact@v4 | |
with: | |
name: screenshot.png | |
path: target/**/screenshot_*.png | |
if-no-files-found: error | |
- name: Diff | |
run: | | |
cargo install dify | |
cargo make screenshot-diff | |
- name: Upload diff | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: diff.png | |
path: target/**/diff_*.png |