forked from Spydr06/logicrs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into theme-reset-bug
- Loading branch information
Showing
51 changed files
with
2,730 additions
and
1,040 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
# This CI (Continuous Integration) file will automatically check your Rust code for errors. | ||
# It runs using GitHub Actions: https://docs.github.com/en/actions | ||
# It will check the code compiles, run tests, run lints, and check for security issues. | ||
# CI will help you standardise your code style and to detect issues with your code easily and early. | ||
# It makes it easier to integrate different branches once they're finished. | ||
# adapted from https://github.com/actions-rs/meta/blob/master/recipes/quickstart.md and https://gist.github.com/LukeMathWalker/5ae1107432ce283310c3e601fac915f3 | ||
|
||
name: Rust CI | ||
|
||
on: | ||
push: | ||
# branches: | ||
# - main | ||
release: | ||
types: [published] | ||
pull_request: | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
check: | ||
name: Check code compiles | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install apt dependencies | ||
uses: awalsh128/cache-apt-pkgs-action@latest | ||
with: | ||
packages: build-essential gettext git libcairo2-dev libgtk-4-dev meson ninja-build sassc valac | ||
version: latest | ||
- name: Clone libadwaita git repo | ||
run: git clone https://gitlab.gnome.org/GNOME/libadwaita.git -b libadwaita-1-2 --depth=1 | ||
- name: Build libadwaita with Meson | ||
run: | | ||
cd libadwaita | ||
meson . _build -Dgtk_doc=false -Dtests=false -Dexamples=false | ||
- name: Install libadwaita with Ninja | ||
run: | | ||
cd libadwaita | ||
sudo ninja -C _build install | ||
- uses: dtolnay/rust-toolchain@nightly | ||
- name: Run cargo check | ||
run: cargo check | ||
|
||
test: | ||
name: Run tests | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install apt dependencies | ||
uses: awalsh128/cache-apt-pkgs-action@latest | ||
with: | ||
packages: build-essential gettext git libcairo2-dev libgtk-4-dev meson ninja-build sassc valac | ||
version: latest | ||
- name: Clone libadwaita git repo | ||
run: git clone https://gitlab.gnome.org/GNOME/libadwaita.git -b libadwaita-1-2 --depth=1 | ||
- name: Build libadwaita with Meson | ||
run: | | ||
cd libadwaita | ||
meson . _build -Dgtk_doc=false -Dtests=false -Dexamples=false | ||
- name: Install libadwaita with Ninja | ||
run: | | ||
cd libadwaita | ||
sudo ninja -C _build install | ||
- uses: dtolnay/rust-toolchain@nightly | ||
- name: Run cargo test | ||
run: cargo test | ||
|
||
fmt: | ||
name: Lint with rustfmt | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@nightly | ||
with: | ||
components: rustfmt | ||
- name: Run rustfmt checks | ||
run: cargo fmt --check | ||
|
||
clippy: | ||
name: Lint with clippy | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install apt dependencies | ||
uses: awalsh128/cache-apt-pkgs-action@latest | ||
with: | ||
packages: build-essential gettext git libcairo2-dev libgtk-4-dev meson ninja-build sassc valac | ||
version: latest | ||
- name: Clone libadwaita git repo | ||
run: git clone https://gitlab.gnome.org/GNOME/libadwaita.git -b libadwaita-1-2 --depth=1 | ||
- name: Build libadwaita with Meson | ||
run: | | ||
cd libadwaita | ||
meson . _build -Dgtk_doc=false -Dtests=false -Dexamples=false | ||
- name: Install libadwaita with Ninja | ||
run: | | ||
cd libadwaita | ||
sudo ninja -C _build install | ||
- uses: dtolnay/rust-toolchain@nightly | ||
with: | ||
components: clippy | ||
- name: Run cargo clippy checks | ||
run: cargo clippy -- -D warnings | ||
|
||
cargo-deny: | ||
name: Security scan with cargo deny | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Run "cargo deny" to check for vulnerabilities | ||
uses: EmbarkStudios/cargo-deny-action@v1 | ||
|
||
cargo-audit: | ||
name: Security scan with cargo audit | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@nightly | ||
- name: Install cargo audit | ||
run: cargo install cargo-audit | ||
- name: Run "cargo audit" to check for vulnerabilities | ||
run: cargo audit |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
|
||
# Contributor Covenant Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
We as members, contributors, and leaders pledge to make participation in our | ||
community a harassment-free experience for everyone, regardless of age, body | ||
size, visible or invisible disability, ethnicity, sex characteristics, gender | ||
identity and expression, level of experience, education, socio-economic status, | ||
nationality, personal appearance, race, caste, color, religion, or sexual identity | ||
and orientation. | ||
|
||
We pledge to act and interact in ways that contribute to an open, welcoming, | ||
diverse, inclusive, and healthy community. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to a positive environment for our | ||
community include: | ||
|
||
* Demonstrating empathy and kindness toward other people | ||
* Being respectful of differing opinions, viewpoints, and experiences | ||
* Giving and gracefully accepting constructive feedback | ||
* Accepting responsibility and apologizing to those affected by our mistakes, | ||
and learning from the experience | ||
* Focusing on what is best not just for us as individuals, but for the | ||
overall community | ||
|
||
Examples of unacceptable behavior include: | ||
|
||
* The use of sexualized language or imagery, and sexual attention or | ||
advances of any kind | ||
* Trolling, insulting or derogatory comments, and personal or political attacks | ||
* Public or private harassment | ||
* Publishing others' private information, such as a physical or email | ||
address, without their explicit permission | ||
* Other conduct which could reasonably be considered inappropriate in a | ||
professional setting | ||
|
||
## Enforcement Responsibilities | ||
|
||
Community leaders are responsible for clarifying and enforcing our standards of | ||
acceptable behavior and will take appropriate and fair corrective action in | ||
response to any behavior that they deem inappropriate, threatening, offensive, | ||
or harmful. | ||
|
||
Community leaders have the right and responsibility to remove, edit, or reject | ||
comments, commits, code, wiki edits, issues, and other contributions that are | ||
not aligned to this Code of Conduct, and will communicate reasons for moderation | ||
decisions when appropriate. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies within all community spaces, and also applies when | ||
an individual is officially representing the community in public spaces. | ||
Examples of representing our community include using an official e-mail address, | ||
posting via an official social media account, or acting as an appointed | ||
representative at an online or offline event. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be | ||
reported to the community leaders responsible for enforcement at [@Spydr_06](@Spydr_06). | ||
All complaints will be reviewed and investigated promptly and fairly. | ||
|
||
All community leaders are obligated to respect the privacy and security of the | ||
reporter of any incident. | ||
|
||
## Enforcement Guidelines | ||
|
||
Community leaders will follow these Community Impact Guidelines in determining | ||
the consequences for any action they deem in violation of this Code of Conduct: | ||
|
||
### Correction | ||
|
||
**Community Impact**: Use of inappropriate language or other behavior deemed | ||
unprofessional or unwelcome in the community. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], | ||
version 2.0, available at | ||
[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0]. | ||
|
||
|
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
Oops, something went wrong.