mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-12-03 05:34:32 +01:00
build(nix): build and check for macOS and Windows
A flake that builds the recorder for macOS and cross-compiles it for Windows from a Mac (xwin for the SDK, LLVM for the toolchain), with a dev shell for each, and `nix flake check` running clippy for both targets, rustfmt, taplo, cargo-deny and the tests. The sources of komorebi for Mac and komorebi for Windows are flake inputs, pinned in `flake.lock`: the recorder indexes them so that a line of komorebi's log can be traced to the statement that wrote it, and the dev shells and every derivation export where they are.
This commit is contained in:
1 parent
af3c080ace
commit
76bae0630e
7 files changed
+665
-7
No files matched your search
@@ -13,12 +13,17 @@ There are no releases yet: build it from source, below.
|
||||
|
||||
### From source
|
||||
|
||||
With a stable Rust toolchain, in a checkout:
|
||||
The repository is a Nix flake. In a checkout:
|
||||
|
||||
```sh
|
||||
nix develop # the toolchain and the pinned komorebi sources
|
||||
cargo install --path komorebi-recorder --locked
|
||||
```
|
||||
|
||||
`nix build` makes the macOS binary in `./result/bin`, and `nix build .#komorebi-recorder-windows` cross-compiles
|
||||
`komorebi-recorder.exe` and, with it, `komorebi-recorder-gui.exe` from a Mac. `nix run github:LGUG2Z/komorebi-recorder`
|
||||
runs the latest commit without a checkout.
|
||||
|
||||
## How it fits together
|
||||
|
||||
Two things vary independently: the _host_ the recorder runs on (macOS or Windows) and the _flavor_ of komorebi it
|
||||
@@ -33,7 +38,8 @@ rewritten after they are written.
|
||||
|
||||
## Checks
|
||||
|
||||
`just check` runs formatting, clippy, the tests, rustdoc with its warnings as errors, and `cargo deny`.
|
||||
`just check` runs formatting, clippy and the tests for macOS, clippy for Windows (the Windows code is type-checked
|
||||
from a Mac, not run), rustdoc with its warnings as errors for both hosts, and `cargo deny`. It needs `nix develop`.
|
||||
CI runs the same checks, builds both platforms and, for Windows, the installer.
|
||||
|
||||
## Documentation
|
||||
|
||||
Reference in new issue
Block a user