fix: don't group floating windows unless they fully overlap (#2527) #4
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 and Test | |
permissions: | |
checks: write | |
contents: read | |
on: | |
# Allow manual triggering | |
workflow_dispatch: | |
# Always run on pull requests | |
pull_request: | |
# And on master when manually pushed or after merges | |
paths-ignore: | |
- "website/**" | |
- ".vscode/**" | |
- "**.md" | |
push: | |
branches: | |
main | |
paths-ignore: | |
- "website/**" | |
- ".vscode/**" | |
- "**.md" | |
env: | |
CARGO_TERM_COLOR: always | |
defaults: | |
run: | |
shell: bash # necessary for windows | |
jobs: | |
lint: | |
uses: ./.github/workflows/lint-app.yml | |
test: | |
needs: lint | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-latest, macOS-12, ubuntu-latest] | |
toolchain: [stable, nightly] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
components: clippy | |
- name: Show toolchain info | |
run: cargo --version --verbose | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ matrix.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Install neovim | |
uses: rhysd/action-setup-vim@v1 | |
with: | |
neovim: true | |
- name: Install Cargo Binstall | |
uses: cargo-bins/cargo-binstall@main | |
- name: Install cargo-nextest | |
run: cargo binstall -y cargo-nextest | |
- name: Test | |
env: | |
RUST_BACKTRACE: full | |
run: | | |
cargo nextest run --profile ci | |
mv target/nextest/ci/results.xml target/nextest/ci/results-${{ matrix.os }}.xml | |
- name: Prepare test results | |
run: | | |
mkdir -p test-results-${{ matrix.os }}-${{ matrix.toolchain }} | |
mv target/nextest/ci/results-*.xml test-results-${{ matrix.os }}-${{ matrix.toolchain }}/ | |
- name: Upload test results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-results-${{ matrix.os }}-${{ matrix.toolchain }} | |
path: | | |
test-results-${{ matrix.os }}-${{ matrix.toolchain }} | |
- name: Install Sarif | |
run: cargo binstall -y clippy-sarif sarif-fmt | |
- name: Setup Reviewdog | |
uses: reviewdog/action-setup@v1 | |
with: | |
reviewdog_version: latest | |
- name: Run Clippy | |
run: cargo clippy --all-targets --message-format=json | clippy-sarif | tee clippy.sarif | sarif-fmt | |
continue-on-error: true | |
- name: Run Clippy Reviewdog | |
run: cat clippy.sarif | reviewdog -f=sarif -name=clippy -reporter=github-check -filter-mode=file -fail-on-error=true -level=warning | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
event-upload: | |
needs: test | |
name: Upload Test Event | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: test-event | |
path: ${{ github.event_path }} | |
build-deploy: | |
needs: test | |
strategy: | |
fail-fast: false | |
matrix: | |
# NOTE: Should use the oldest available Ubuntu release, for maximum compatibility | |
os: [windows-latest, macOS-12, ubuntu-20.04] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ matrix.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Install dependencies | |
run: | | |
if [[ $RUNNER_OS == "Windows" ]]; then | |
if ! which cargo-wix; then cargo install cargo-wix; fi | |
elif [[ $RUNNER_OS == "macOS" ]]; then | |
rustup target add x86_64-apple-darwin | |
rustup target add aarch64-apple-darwin | |
if ! which cargo-bundle; then cargo install cargo-bundle; fi | |
elif [[ $RUNNER_OS == "Linux" ]]; then | |
sudo apt-get update | |
sudo apt-get -qq install -y \ | |
curl gnupg ca-certificates git gcc-multilib g++-multilib cmake \ | |
libssl-dev pkg-config libfreetype6-dev libasound2-dev \ | |
libexpat1-dev libxcb-composite0-dev libbz2-dev freeglut3-dev \ | |
libxi-dev libfuse2 appstream | |
fi | |
- name: Install neovim | |
uses: rhysd/action-setup-vim@v1 | |
with: | |
neovim: true | |
- name: Build | |
run: | | |
if [[ $RUNNER_OS == "Windows" ]]; then | |
cargo wix --output target/release/neovide.msi --package neovide | |
elif [[ $RUNNER_OS == "macOS" ]]; then | |
echo "MACOSX_DEPLOYMENT_TARGET=10.11" >> $GITHUB_ENV | |
# x86 | |
cargo build --locked --release --target=x86_64-apple-darwin | |
cargo bundle --release --target=x86_64-apple-darwin | |
# arch | |
cargo build --locked --release --target=aarch64-apple-darwin | |
cargo bundle --release --target=aarch64-apple-darwin | |
elif [[ $RUNNER_OS == "Linux" ]]; then | |
cargo build --locked --release | |
fi | |
- name: Prepare Artifacts | |
run: | | |
cd target/release | |
if [[ $RUNNER_OS == "Windows" ]]; then | |
echo "ARTIFACT=neovide.exe" >> $GITHUB_ENV | |
echo "ARTIFACT2=neovide.msi" >> $GITHUB_ENV | |
elif [[ $RUNNER_OS == "macOS" ]]; then | |
# merge builds | |
mkdir -p bundle/osx | |
rm -rf bundle/osx/neovide.app || true | |
cp -R ../x86_64-apple-darwin/release/bundle/osx/neovide.app \ | |
bundle/osx/neovide.app | |
rm bundle/osx/neovide.app/Contents/MacOS/neovide | |
lipo ../x86_64-apple-darwin/release/bundle/osx/neovide.app/Contents/MacOS/neovide \ | |
../aarch64-apple-darwin/release/bundle/osx/neovide.app/Contents/MacOS/neovide \ | |
-create -output \ | |
bundle/osx/neovide.app/Contents/MacOS/neovide | |
codesign --force --deep -s - bundle/osx/neovide.app | |
# create .dmg | |
hdiutil create neovide-uncompressed.dmg -volname "neovide" -srcfolder bundle/osx | |
hdiutil convert neovide-uncompressed.dmg -format UDZO -o neovide.dmg | |
echo "ARTIFACT=neovide.dmg" >> $GITHUB_ENV | |
elif [[ $RUNNER_OS == "Linux" ]]; then | |
# archive artifact | |
strip neovide | |
tar czvf neovide-linux-x86_64.tar.gz neovide | |
# create appimage | |
curl -Lo linuxdeploy https://github.com/linuxdeploy/linuxdeploy/releases/latest/download/linuxdeploy-x86_64.AppImage | |
chmod +x linuxdeploy | |
curl -Lo linuxdeploy-plugin-appimage https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/latest/download/linuxdeploy-plugin-appimage-x86_64.AppImage | |
chmod +x linuxdeploy-plugin-appimage | |
export LDAI_OUTPUT=neovide.AppImage | |
export LDAI_UPDATE_INFORMATION="gh-releases-zsync|neovide|neovide|latest|neovide.AppImage.zsync" | |
./linuxdeploy \ | |
--executable=neovide \ | |
--desktop-file=../../assets/neovide.desktop \ | |
--appdir=AppDir \ | |
--icon-file=../../assets/neovide.svg \ | |
--output=appimage | |
echo "ARTIFACT=neovide-linux-x86_64.tar.gz" >> $GITHUB_ENV | |
echo "ARTIFACT2=neovide.AppImage" >> $GITHUB_ENV | |
echo "ARTIFACT3=neovide.AppImage.zsync" >> $GITHUB_ENV | |
fi | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ env.ARTIFACT }} | |
path: target/release/${{ env.ARTIFACT }} | |
- if: env.ARTIFACT2 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ env.ARTIFACT2 }} | |
path: target/release/${{ env.ARTIFACT2 }} | |
- if: env.ARTIFACT3 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ env.ARTIFACT3 }} | |
path: target/release/${{ env.ARTIFACT3 }} |