mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-03-19 07:54:04 +01:00
Following the changes I witnessed in the invisible window border size following an OS update, this commit makes the invisible border offset configurable via a new komorebic command 'invisible-borders'. When sending a new set of invisible border offset dimensions via komorebic, a full retile across all monitors will take place after the new values have been set. The default values have been set to what is currently correct for my machine, and will likely be updated again in the same way in the future if further changes occur in subsequent OS updates. This commit also updates some dependencies to their latest releases, and removes from the CI workflow a line that attempts to delete the rustup-init.exe binary after installation which has been causing builds to fail. resolve #35
102 lines
3.8 KiB
YAML
102 lines
3.8 KiB
YAML
# Adapted from https://github.com/rust-lang/rustup/blob/master/.github/workflows/windows-builds-on-master.yaml
|
|
|
|
name: Windows
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- "*"
|
|
push:
|
|
branches:
|
|
- master
|
|
- feature/*
|
|
- hotfix/*
|
|
tags:
|
|
- v*
|
|
schedule:
|
|
- cron: "30 0 * * 1" # Every Monday at half past midnight UTC
|
|
|
|
jobs:
|
|
build:
|
|
name: Build
|
|
runs-on: windows-latest
|
|
env:
|
|
RUSTFLAGS: -Ctarget-feature=+crt-static
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
target:
|
|
- x86_64-pc-windows-msvc
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Prep cargo dirs
|
|
run: |
|
|
New-Item "${env:USERPROFILE}\.cargo\registry" -ItemType Directory -Force
|
|
New-Item "${env:USERPROFILE}\.cargo\git" -ItemType Directory -Force
|
|
shell: powershell
|
|
- name: Set environment variables appropriately for the build
|
|
run: |
|
|
echo "%USERPROFILE%\.cargo\bin" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
|
|
echo "TARGET=${{ matrix.target }}" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
|
|
echo "SKIP_TESTS=" | Out-File -Append -FilePath $env:GITHUB_ENV -Encoding utf8
|
|
- name: Cache cargo registry, git trees and binaries
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
~/.cargo/bin
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
- name: Get rustc commit hash
|
|
id: cargo-target-cache
|
|
run: |
|
|
echo "::set-output name=rust_hash::$(rustc -Vv | grep commit-hash | awk '{print $2}')"
|
|
shell: bash
|
|
- name: Cache cargo build
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: target
|
|
key: ${{ github.base_ref }}-${{ github.head_ref }}-${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
|
|
restore-keys: ${{ github.base_ref }}-${{ matrix.target }}-cargo-target-dir-${{ steps.cargo-target-cache.outputs.rust_hash }}-${{ hashFiles('**/Cargo.lock') }}
|
|
- name: Install Rustup using win.rustup.rs
|
|
run: |
|
|
# Disable the download progress bar which can cause perf issues
|
|
$ProgressPreference = "SilentlyContinue"
|
|
Invoke-WebRequest https://win.rustup.rs/ -OutFile rustup-init.exe
|
|
.\rustup-init.exe -y --default-host=x86_64-pc-windows-msvc --profile=minimal
|
|
shell: powershell
|
|
- name: Ensure stable toolchain is up to date
|
|
run: rustup update stable
|
|
shell: bash
|
|
- name: Install the target
|
|
run: |
|
|
rustup target install ${{ matrix.target }}
|
|
- name: Run a full build
|
|
run: |
|
|
cargo build --locked --release --target ${{ matrix.target }}
|
|
- name: Upload the built artifacts
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: komorebi-${{ matrix.target }}
|
|
path: |
|
|
target/${{ matrix.target }}/release/komorebi.exe
|
|
target/${{ matrix.target }}/release/komorebic.exe
|
|
retention-days: 7
|
|
- name: Generate changelog
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
shell: bash
|
|
run: |
|
|
if ! type kokai >/dev/null; then cargo install --locked kokai --force; fi
|
|
kokai release --no-emoji --add-links github:commits,issues --ref "$(git tag --points-at HEAD)" >"CHANGELOG.md"
|
|
- name: Run GoReleaser
|
|
uses: goreleaser/goreleaser-action@v2
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
with:
|
|
version: latest
|
|
args: release --skip-validate --rm-dist --release-notes=CHANGELOG.md
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
SCOOP_TOKEN: ${{ secrets.SCOOP_TOKEN }}
|