README: Update note about git-meld-index #362
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: build | |
on: | |
push: | |
branches: | |
- main | |
- release | |
- release-candidate | |
- ci | |
pull_request: | |
permissions: read-all | |
env: | |
CARGO_INCREMENTAL: 0 | |
CARGO_PROFILE_DEV_DEBUG: 0 | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
# macos-13 is x86; macos-14 is ARM | |
os: [ubuntu-latest, macos-13, macos-14, windows-latest] | |
cargo_flags: [""] | |
include: | |
- os: ubuntu-latest | |
cargo_flags: "--all-features" | |
runs-on: ${{ matrix.os }} | |
# TODO FIXME (aseipp): keep the timeout limit to ~15 minutes. this is long | |
# enough to give us runway for the future, but also once we hit it, we're at | |
# the "builds are taking too long" stage and we should start looking at ways | |
# to optimize the CI. | |
# | |
# at the same time, this avoids some issues where some flaky, bugged tests | |
# seem to be causing multi-hour runs on Windows (GPG signing issues), which | |
# is a problem we should fix. in the mean time, this will make these flakes | |
# less harmful, as it won't cause builds to spin for multiple hours, requiring | |
# manual cancellation. | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@1482605bfc5719782e1267fd0c0cc350fe7646b8 | |
with: | |
toolchain: 1.76 | |
- name: Build diffedit3-web (but not Tauri diffedit3-gui, which has "gdk-3.0" runtime dependecy ) | |
run: cargo build -p diffedit3 --all-targets --verbose ${{ matrix.cargo_flags }} | |
- name: Test | |
run: cargo test -p diffedit3 --all-targets --verbose ${{ matrix.cargo_flags }} | |
env: | |
RUST_BACKTRACE: 1 | |
check-formatting-and-dist-up-to-date: | |
name: Check that webapp was compiled | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 21 | |
- name: Remove old version of comiled and bundled JS | |
shell: bash | |
run: rm -rv webapp/dist | |
- name: install frontend dependencies | |
run: npm clean-install | |
- name: build | |
run: npm run build # Also runs `npm run format` | |
- name: Check for uncommitted changes | |
shell: bash | |
run: | | |
git add -N . # `git diff` ignores added files without this | |
if git diff --stat --exit-code; then | |
echo "OK, building and reformatting the webapp did not cause any changes." | |
else | |
echo | |
echo 'Updates to the webapp were not bundled to webapp/dist/' | |
echo 'or `prettier` was not run to reformat webapp files.' | |
echo | |
echo 'Please run:' | |
echo ' npm clean-install && npm run build' | |
exit 1 | |
fi | |
clippy: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@1482605bfc5719782e1267fd0c0cc350fe7646b8 | |
with: | |
toolchain: 1.76 | |
components: clippy | |
- name: install dependencies (ubuntu + Tauri only) | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf | |
- name: Clippy | |
run: cargo clippy --workspace --all-targets --verbose | |
rustfmt: | |
name: Check formatting | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 | |
- uses: dtolnay/rust-toolchain@1482605bfc5719782e1267fd0c0cc350fe7646b8 | |
with: | |
toolchain: nightly | |
components: rustfmt | |
- run: cargo +nightly fmt --all -- --check |