Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/zellij-org/zellij into unbi…
Browse files Browse the repository at this point in the history
…nd-default-keys
  • Loading branch information
a-kenji committed Apr 16, 2021
2 parents 1f14683 + 7bbd5e2 commit 60ad749
Show file tree
Hide file tree
Showing 52 changed files with 1,517 additions and 1,474 deletions.
52 changes: 21 additions & 31 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,48 +11,38 @@ env:

jobs:
build:
name: Build & test
name: Build & Test
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Add WASM target
run: rustup target add wasm32-wasi
- name: Install cargo-make
run: cargo install --debug cargo-make
- name: Build
run: ./build-all.sh --verbose
- name: Run tests
run: cargo test -j 1 --verbose
fmt:
name: Rustfmt
run: cargo make build
- name: Test
run: cargo make test

format:
name: Check Formatting
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- uses: actions/checkout@v2
- name: Install cargo-make
run: cargo install --debug cargo-make
- name: Check Format
run: cargo make check-format

clippy:
name: Clippy
name: Check Clippy Lints
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy
- name: Add WASM target
run: rustup target add wasm32-wasi
- name: Build
run: ./build-all.sh --verbose
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-features --all-targets
- uses: actions/checkout@v2
- name: Install cargo-make
run: cargo install --debug cargo-make
- name: Check Lints
run: cargo make clippy -D clippy::all
26 changes: 20 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,30 @@ Before contributing please read our [Code of Conduct](CODE_OF_CONDUCT.md) which
all contributors are expected to adhere to.

## Building
To work around a [Cargo bug][https://github.com/rust-lang/cargo/issues/7004], you'll need to use the included `build-all.sh` script.
To build Zellij, we're using cargo-make – you can install it by running `cargo install --force cargo-make`.

Here are some of the commands currently supported by the build system:

```sh
# An unoptimized debug build
./build-all.sh
# A fully optimized release build
./build-all.sh --release
# Format code, build, then run tests and clippy
cargo make
# You can also perform these actions individually
cargo make format
cargo make build
cargo make test
# Run Zellij (optionally with additional arguments)
cargo make run
cargo make run -- -l strider
# Run Clippy (potentially with additional options)
cargo make clippy
cargo make clippy -W clippy::pedantic
# Install Zellij to some directory
cargo make install /path/of/zellij/binary
# Publish the zellij and zellij-tile crates
cargo make publish
```

The build script has an optional dependency on `binaryen --version` > 97, for it's command `wasm-opt`.
To run `install` or `publish`, you'll need `binaryen --version` > 97, for it's command `wasm-opt`.

## Looking for something to work on?

Expand Down
Loading

0 comments on commit 60ad749

Please sign in to comment.