Skip to content

Commit

Permalink
New backend (#12)
Browse files Browse the repository at this point in the history
* Switch out backend

* Fix up deny and add changelog entry

* Remove overflow checks from lto profile

* Don't use mold since it complicates CI

* Run test on 'core'

* Add clippy to toolchain file

* Clippy update, fix previously weird build cfg

* Clean up all new clippy lints
  • Loading branch information
MarcusGrass authored Nov 29, 2022
1 parent 447dfd2 commit 3b799e1
Show file tree
Hide file tree
Showing 65 changed files with 2,206 additions and 1,325 deletions.
8 changes: 6 additions & 2 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
[profile.dev]
panic = "abort" # No std requirement

[profile.release]
overflow-checks = true # I prefer panics over wraps
panic = "abort" # No std requirement

[profile.lto]
panic = "abort" # No std requirement
codegen-units = 1 # Better optimization
debug = false # Inherits from release so should actually do nothing but whatever
inherits = "release"
lto = true # link time optimization
strip = true # smaller binary
strip = true # smaller binary
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Run clippy on all feature permutations
run: cargo hack clippy --feature-powerset -- -D warnings
run: cargo hack clippy -p pgwm-app --feature-powerset -- -D warnings
deny:
runs-on: ubuntu-latest
container: marcusgrass/pgwm-check:latest
Expand All @@ -29,11 +29,11 @@ jobs:
- name: Run tests on core with all feature permutations
run: cargo hack test -p pgwm-core --feature-powerset
- name: Run tests on project with default features
run: cargo test
run: cargo test --all-features -p pgwm-core
makefile:
runs-on: ubuntu-latest
container: marcusgrass/pgwm-check:latest
steps:
- uses: actions/checkout@v3
- name: Run makefile tests
run: ./.local/check_make.sh
run: ./.local/make_check.sh
4 changes: 2 additions & 2 deletions .local/check_make.sh → .local/make_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ check_clean() {
}

check_build() {
if [ ! -f "target/$1/pgwm" ]; then
echo "Build did not produce a binary at expected location target/$1/pgwm"
if [ ! -f "target/x86_64-unknown-linux-gnu/$1/pgwm" ]; then
echo "Build did not produce a binary at expected location target/x86_64-unknown-linux-gnu/$1/pgwm"
exit 1
fi
}
Expand Down
5 changes: 2 additions & 3 deletions .local/check.sh → .local/wm_check.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#!/bin/bash
set -ex
# Deny all warnings here, becomes a pain to scroll back otherwise
cargo hack clippy --feature-powerset -- -D warnings
cargo hack clippy -p pgwm-app --feature-powerset -- -D warnings
# Running all modules like this causes a lot of rebuilds which take a lot of time
cargo hack test -p pgwm-core --feature-powerset
# Test all modules with default features as well
cargo test
cargo test -p pgwm-app --all-features
# Make sure dependencies don't have any advisories or weird licensing
cargo deny --all-features --frozen --locked check
Loading

0 comments on commit 3b799e1

Please sign in to comment.