Skip to content

Commit

Permalink
Merge branch 'main' into theme-reset-bug
Browse files Browse the repository at this point in the history
  • Loading branch information
toadkarter committed Oct 7, 2023
2 parents 1cd2284 + 76d43cf commit 3b28ab6
Show file tree
Hide file tree
Showing 51 changed files with 2,730 additions and 1,040 deletions.
130 changes: 130 additions & 0 deletions .github/workflows/rust_ci.yml
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
85 changes: 85 additions & 0 deletions CODE_OF_CONDUCT.md
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].


2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "logicrs"
version = "0.1.1"
version = "0.1.2"
edition = "2021"
description = "An easy-to-use simulator for logical circuits"
readme = "./README.md"
Expand Down
Loading

0 comments on commit 3b28ab6

Please sign in to comment.