From ba014f3aec0418285ae66fd416c1e6a3d811e12f Mon Sep 17 00:00:00 2001 From: neon_arch Date: Fri, 5 May 2023 20:51:06 +0300 Subject: [PATCH 01/22] updating readme.md closes #11 --- README.md | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 8f51d45..f53283f 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@

Readme | - Discord | + Discord | GitHub | Documentation

@@ -118,7 +118,7 @@ # Installation and Testing 🛠️ -> For full setup instructions, see: [**Installation**]() +> For full setup instructions, see: [**Installation**](https://github.com/neon-mmd/websurfx/wiki/installation) To get started with Websurfx, clone the repository, edit the config file which is located in the `websurfx`{.verbatim} directory and install redis server by following the instructions located [here](https://redis.io/docs/getting-started/) and then run the websurfx server and redis server using the following commands: @@ -130,17 +130,6 @@ redis-server -p 8082 & ./target/debug/websurfx ``` -If you want to use the rolling/edge branch, run the following commands instead: - -``` shell -git clone https://github.com/neon-mmd/websurfx.git -cd websurfx -git checkout rolling -cargo build -redis-server -p 8082 & -./target/debug/websurfx -``` - Once you have started the server, open your preferred web browser and navigate to to start using Websurfx. > **Warning** @@ -150,7 +139,7 @@ Once you have started the server, open your preferred web browser and navigate t # Configuration 🔧 -> For full configuration instructions, see: [**Configuration**]() +> For full configuration instructions, see: [**Configuration**](https://github.com/neon-mmd/websurfx/wiki/configuration) Websurfx is configured through the config.lua file, located at `websurfx/config.lua`. @@ -158,7 +147,7 @@ Websurfx is configured through the config.lua file, located at `websurfx/config. # Theming 🎨 -> For full theming and customization instructions, see: [**Theming**]() +> For full theming and customization instructions, see: [**Theming**](https://github.com/neon-mmd/websurfx/wiki/theming) Websurfx comes with several themes and colorschemes by default which you can apply and edit through the config file. Support for custom themes and colorschemes using css and develop your own unique-looking website. From f1703dc297fc958d727dcf802b3a87cd1631cc06 Mon Sep 17 00:00:00 2001 From: neon_arch Date: Sat, 6 May 2023 19:28:59 +0300 Subject: [PATCH 02/22] add a code of conduct and closes #12 --- .github/CODE_OF_CONDUCT.md | 85 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 .github/CODE_OF_CONDUCT.md diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..059326b --- /dev/null +++ b/.github/CODE_OF_CONDUCT.md @@ -0,0 +1,85 @@ +# 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, 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 and as such we strongly believe in **give respect and take respect** policy. + +# What We Strive At + +* **Be patient.** +* **Be welcoming and be friendly**: We strive to be a community that welcomes, supports and remain friendly to people of all backgrounds and identities. This includes, but is not limited to members of any race, ethnicity, culture, national origin, colour, immigration status, social and economic class, educational level, sex, sexual orientation, gender identity and expression, age, size, family status, political belief, religion, and mental and physical ability. +* **Be considerate**: Your work will be used by other people, and you in turn will depend on the work of others. Any decision you take will affect users and colleagues, and you should take those consequences into account when making decisions. Remember that we're a world-wide community, so you might not be communicating in someone else's primary language. +* **Be respectful**: Not all of us will agree all the time, but disagreement is no excuse for poor behavior and poor manners. We might all experience some frustration now and then, but we cannot allow that frustration to turn into a personal attack. It’s important to remember that a community where people feel uncomfortable or threatened is not a productive one. +* **Be careful in the words that you choose**: we are a community of professionals, and we conduct ourselves professionally. Be kind to others. Do not insult or put down other participants. Harassment and other exclusionary behavior aren't acceptable. This includes, but is not limited to: + * Violent threats or language directed against another person. + * Discriminatory jokes and language. + * Using political talks and political orientated views. + * Posting sexually explicit or violent material. + * Posting (or threatening to post) other people's personally identifying information ("doxing"). + * Personal insults, especially those using racist or sexist terms. + * Unwelcome sexual attention. + * Advocating for, or encouraging, any of the above behavior. + * Humor is acceptable but should not be done to harass, demean or to insult others. + * Repeated harassment of others. In general, if someone asks you to stop, then stop. + * Using overtly sexual aliases or other nicknames that might detract from a friendly, safe and welcoming environment for all. + * Using bad words or cursing. +* **When we disagree, try to understand why**: Disagreements, both social and technical, happen all the time. It is important that we resolve disagreements and differing views constructively. Remember that we’re different. The strength of our community comes from its diversity, people from a wide range of backgrounds. Different people have different perspectives on issues. Being unable to understand why someone holds a viewpoint doesn’t mean that they’re wrong. Don’t forget that it is human to err and blaming each other doesn’t get us anywhere. Instead, focus on helping to resolve issues and learning from mistakes. +* **Treat everyone equally:** we are community of mature people and maturity in the way we act, behave and treat others and as such we treat others as our brothers and sisters. + +# Scope + +The scope of the conduct of code is not limited to one individual or few individuals. This code of conduct applies for all be it the maintainer, the developer or any role assigned to the project or involved in any other way to the project. This code of conduct is not to provide privelages of one over the other. Any failure to enforce, act, using the code of conduct for your benefit or to evade certain situations or findings way to evade this conduct or a failure to provide a safe environment for others under the umberalla of this code of conduct will be considered a clear act of violation. + +# Violation + +Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: + +1. **Correction** + +**Community Impact:** Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community. + +**Consequence:** A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested. + +2. **Warning** + +**Community Impact:** A violation through a single incident or series of actions. + +**Consequence:** A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban. + +3. **Temporary Ban** + +**Community Impact:** A serious violation of community standards, including sustained inappropriate behavior. + +**Consequence:** A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. + +4. **Permanent Ban** + +**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the community. + + +# Reporting Issues + +If you experience or witness unacceptable behavior—or have any other concerns—please report it by contacting the community leader via [mustafadhuleb53@gmail.com](mustafadhuleb53@gmail.com). All reports will be handled with discretion. In your report please include: + +- Your contact information. +- Names (real, nicknames, or pseudonyms) of any individuals involved. If there are additional witnesses, please +include them as well. Your account of what occurred, and if you believe the incident is ongoing. If there is a publicly available record (e.g. a mailing list archive or a public IRC logger), please include a link. +- Any additional information that may be helpful. + +Anyone asked to stop unacceptable behavior is expected to comply immediately. If an individual engages in unacceptable behavior, We will act according to the [violations rules](#violation) as stated. + +## 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, [Rust Code of Conduct](https://www.rust-lang.org/policies/code-of-conduct) and [Twitter's Code of Conduct](https://github.com/twitter/.github/blob/main/code-of-conduct.md?plain=1) + +Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at +https://www.contributor-covenant.org/translations. From d4b7cac7290d374047d03af3120e40fc1ea5c8fe Mon Sep 17 00:00:00 2001 From: neon_arch Date: Sat, 6 May 2023 16:32:16 +0000 Subject: [PATCH 03/22] Update CODE_OF_CONDUCT.md --- .github/CODE_OF_CONDUCT.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md index 059326b..1b0036b 100644 --- a/.github/CODE_OF_CONDUCT.md +++ b/.github/CODE_OF_CONDUCT.md @@ -70,7 +70,7 @@ If you experience or witness unacceptable behavior—or have any other concerns include them as well. Your account of what occurred, and if you believe the incident is ongoing. If there is a publicly available record (e.g. a mailing list archive or a public IRC logger), please include a link. - Any additional information that may be helpful. -Anyone asked to stop unacceptable behavior is expected to comply immediately. If an individual engages in unacceptable behavior, We will act according to the [violations rules](#violation) as stated. +Anyone asked to stop unacceptable behavior is expected to comply immediately. If an individual engages in unacceptable behavior, We will act according to the [violations rules](#violation) as stated above. ## Attribution From 5f2739312d2e0b40a5a38fd753174ea63ca389e0 Mon Sep 17 00:00:00 2001 From: neon_arch Date: Sun, 7 May 2023 21:35:12 +0300 Subject: [PATCH 04/22] add more badges --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index f53283f..2d21a2e 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,24 @@ src="https://img.shields.io/github/actions/workflow/status/neon-mmd/websurfx/rust.yml?style=flat-square" /> + + GitHub release (latest by date including pre-releases) + + Maintenance + + + GitHub contributors +

From a301be7cdb68374191f733a23ca38c1b5ac1a48a Mon Sep 17 00:00:00 2001 From: neon_arch Date: Fri, 12 May 2023 14:22:25 +0000 Subject: [PATCH 05/22] Create releases.yml --- .github/workflows/releases.yml | 74 ++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 .github/workflows/releases.yml diff --git a/.github/workflows/releases.yml b/.github/workflows/releases.yml new file mode 100644 index 0000000..a379d3c --- /dev/null +++ b/.github/workflows/releases.yml @@ -0,0 +1,74 @@ +name: Releases +on: + push: + branches: + - rolling + +concurrency: + group: "main-branch" + +jobs: + changelog: + if: github.repository == 'neon-mmd/websurfx ' + runs-on: ubuntu-latest + + steps: + # Create a temporary, uniquely named branch to push release info to + - name: create temporary branch + uses: peterjgrainger/action-create-branch@v2.3.0 + id: create-branch + with: + branch: "release-from-${{ github.sha }}" + sha: "${{ github.sha }}" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + # check out the repository afterwards + - uses: actions/checkout@v3 + + # fetch branches and switch to the temporary branch + - name: switch to new branch + run: git fetch --all && git checkout --track origin/release-from-${{ github.sha }} + + # update app config with version + - name: get-npm-version + id: package-version + uses: martinbeentjes/npm-get-version-action@master + - name: update app config + run: sed -i 's/0.0.0/${{ steps.package-version.outputs.current-version}}/g' config/app.json + + # create release info and push it upstream + - name: conventional Changelog Action + id: changelog + uses: TriPSs/conventional-changelog-action@v3 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + version-file: "./package.json,./package-lock.json,./config/app.json" + git-branch: "release-from-${{ github.sha }}" + skip-on-empty: false + skip-git-pull: true + + # create PR using GitHub CLI + - name: create PR with release info + id: create-pr + run: gh pr create --base main --head release-from-${{ github.sha }} --title 'Merge new release into main' --body 'Created by Github action' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + # merge PR using GitHub CLI + - name: merge PR with release info + id: merge-pr + run: gh pr merge --admin --merge --subject 'Merge release info' --delete-branch + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + # release info is now in main so we can continue as before + - name: create release with last commit + uses: actions/create-release@v1 + if: steps.changelog.outputs.skipped == 'false' + env: + GITHUB_TOKEN: ${{ secrets.CHANGELOG_RELEASE }} + with: + tag_name: ${{ steps.changelog.outputs.tag }} + release_name: ${{ steps.changelog.outputs.tag }} + body: ${{ steps.changelog.outputs.clean_changelog }} From 15b0e38e3460352e261baa28967a3caa7591fa4f Mon Sep 17 00:00:00 2001 From: neon_arch Date: Fri, 12 May 2023 17:16:37 +0000 Subject: [PATCH 06/22] Update releases.yml --- .github/workflows/releases.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/releases.yml b/.github/workflows/releases.yml index a379d3c..88c78fb 100644 --- a/.github/workflows/releases.yml +++ b/.github/workflows/releases.yml @@ -5,11 +5,11 @@ on: - rolling concurrency: - group: "main-branch" + group: "rolling-branch" jobs: changelog: - if: github.repository == 'neon-mmd/websurfx ' + if: github.repository == 'neon-mmd/websurfx' runs-on: ubuntu-latest steps: @@ -43,7 +43,7 @@ jobs: uses: TriPSs/conventional-changelog-action@v3 with: github-token: ${{ secrets.GITHUB_TOKEN }} - version-file: "./package.json,./package-lock.json,./config/app.json" + version-file: "./Cargo.toml" git-branch: "release-from-${{ github.sha }}" skip-on-empty: false skip-git-pull: true @@ -51,7 +51,7 @@ jobs: # create PR using GitHub CLI - name: create PR with release info id: create-pr - run: gh pr create --base main --head release-from-${{ github.sha }} --title 'Merge new release into main' --body 'Created by Github action' + run: gh pr create --base main --head release-from-${{ github.sha }} --title 'Merge new release into rolling' --body 'Created by Github action' env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From d80d4c180d1f62b044f922829bae867dbb88f276 Mon Sep 17 00:00:00 2001 From: neon_arch Date: Sat, 13 May 2023 10:50:53 +0300 Subject: [PATCH 07/22] fix(README.md): fix styling and formatting --- README.md | 51 +++++++++++++++++++++++++-------------------------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 2d21a2e..c2e101b 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,5 @@

Websurfx

- - A modern-looking, lightning-fast, privacy-respecting, secure - meta search engine - (pronounced as websurface or web-surface /wɛbˈsɜːrfəs/.) written in Rust. It - provides a fast and secure search experience while respecting user - privacy. -
-
- -
-
Readme | Discord | GitHub | @@ -79,6 +65,17 @@ src="https://img.shields.io/github/contributors-anon/neon-mmd/websurfx?style=flat-square" /> +
+
+ + A modern-looking, lightning-fast, privacy-respecting, secure + meta search engine + (pronounced as websurface or web-surface /wɛbˈsɜːrfəs/.) written in Rust. It + provides a fast and secure search experience while respecting user + privacy.

@@ -86,8 +83,8 @@

- **Getting Started** - - [🌈 Features](#features-) - [🔭 Preview](#preview-) + - [🌈 Features](#features-) - [🛠️ Installation and Testing](#installation-and-testing-) - [🔧 Configuration](#configuration-) - **Feature Overview** @@ -107,17 +104,6 @@

-# Features 🌈 - -- ⛔ Proper NSFW blocking -- 🎨 High level customizability with 9 colorchemes provided by default with a simple theme, also supporting creation of your custom themes and colorschemes very quickly and easily -- 🔍 Advanced image search -- 🔐 Fast, private and secure -- 🆓 100% free and open source -- 🌈 and lots more... - -**[⬆️ Back to Top](#websurfx)** - # Preview 🔭 ## Main Page @@ -134,6 +120,19 @@ **[⬆️ Back to Top](#websurfx)** +# Features 🌈 + +- 🎨 High level customizability with 9 colorchemes provided by default with a simple theme, also supporting creation of your custom themes and colorschemes very quickly and easily +- 🔐 Fast, private and secure +- 🆓 100% free and open source +- 🧹 Ad free and clean results +- 🧠 AI integration (coming soon) +- ⛔ Proper NSFW blocking (coming soon) +- 🔍 Advanced image search (coming soon) +- 🌈 and lots more... + +**[⬆️ Back to Top](#websurfx)** + # Installation and Testing 🛠️ > For full setup instructions, see: [**Installation**](https://github.com/neon-mmd/websurfx/wiki/installation) From 58a3527a696df9ccf845a58d74b121a93aaf7bf6 Mon Sep 17 00:00:00 2001 From: neon_arch Date: Sat, 13 May 2023 13:27:32 +0300 Subject: [PATCH 08/22] fix(README.md): fix discord invite link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c2e101b..bbd9c19 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@

Websurfx

Readme | - Discord | + Discord | GitHub | Documentation

From 3be13d0ab61bcbe8352e493542eafadfe89743db Mon Sep 17 00:00:00 2001 From: neon_arch Date: Sat, 13 May 2023 19:16:15 +0300 Subject: [PATCH 09/22] ci: add rust specific ci and auto-gen oss standard labels --- .github/workflows/clippy.yml | 16 ++++++++++++++++ .github/workflows/labels.yml | 21 +++++++++++++++++++++ .github/workflows/releases.yml | 2 +- .github/workflows/rust_cache.yml | 8 ++++++++ .github/workflows/rustfmt.yml | 15 +++++++++++++++ .github/workflows/stale.yml | 27 +++++++++++++++++++++++++++ README.md | 5 +---- 7 files changed, 89 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/clippy.yml create mode 100644 .github/workflows/labels.yml create mode 100644 .github/workflows/rust_cache.yml create mode 100644 .github/workflows/rustfmt.yml create mode 100644 .github/workflows/stale.yml diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml new file mode 100644 index 0000000..aa387aa --- /dev/null +++ b/.github/workflows/clippy.yml @@ -0,0 +1,16 @@ +name: Clippy check +on: + push: + branches: + - rolling + +jobs: + clippy_check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - run: rustup component add clippy + - uses: actions-rs/clippy-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + args: --all-features diff --git a/.github/workflows/labels.yml b/.github/workflows/labels.yml new file mode 100644 index 0000000..ce60759 --- /dev/null +++ b/.github/workflows/labels.yml @@ -0,0 +1,21 @@ +name: Import open source standard labels + +on: + push: + branches: [ main ] + +jobs: + labels: + + runs-on: ubuntu-latest + + steps: + - uses: actions/setup-node@v2 + with: + node-version: '14' + - uses: EddieHubCommunity/gh-action-open-source-labels@main + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + owner-name: ${{ github.repository_owner }} + repository-name: ${{ github.event.repository.name }} + force: true # optional to clear existing labels, default to true diff --git a/.github/workflows/releases.yml b/.github/workflows/releases.yml index 88c78fb..446ee9b 100644 --- a/.github/workflows/releases.yml +++ b/.github/workflows/releases.yml @@ -67,7 +67,7 @@ jobs: uses: actions/create-release@v1 if: steps.changelog.outputs.skipped == 'false' env: - GITHUB_TOKEN: ${{ secrets.CHANGELOG_RELEASE }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: tag_name: ${{ steps.changelog.outputs.tag }} release_name: ${{ steps.changelog.outputs.tag }} diff --git a/.github/workflows/rust_cache.yml b/.github/workflows/rust_cache.yml new file mode 100644 index 0000000..ff3c06f --- /dev/null +++ b/.github/workflows/rust_cache.yml @@ -0,0 +1,8 @@ +- name: Cache Rust compilation + uses: metalbear-co/sccache-action@v1 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + # Optional, default is `sccache-` + cache-from: sccache-${{ runner.os }}- + # Optional, default is `sccache-latest` + cache-to: sccache-${{ runner.os }}-${{ github.sha }} diff --git a/.github/workflows/rustfmt.yml b/.github/workflows/rustfmt.yml new file mode 100644 index 0000000..eb4e5c0 --- /dev/null +++ b/.github/workflows/rustfmt.yml @@ -0,0 +1,15 @@ +name: Rustfmt +on: + push: + branches: + - rolling + +jobs: + format: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@stable + - uses: mbrobbel/rustfmt-check@master + with: + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000..1e1e6f0 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,27 @@ +# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time. +# +# You can adjust the behavior by modifying this file. +# For more information, see: +# https://github.com/actions/stale +name: Mark stale issues and pull requests + +on: + schedule: + - cron: '30 1 * * *' + +jobs: + stale: + + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + + steps: + - uses: actions/stale@v5 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: 'Stale issue message' + stale-pr-message: 'Stale pull request message' + stale-issue-label: 'no-issue-activity' + stale-pr-label: 'no-pr-activity' diff --git a/README.md b/README.md index bbd9c19..feda1ae 100644 --- a/README.md +++ b/README.md @@ -126,9 +126,6 @@ - 🔐 Fast, private and secure - 🆓 100% free and open source - 🧹 Ad free and clean results -- 🧠 AI integration (coming soon) -- ⛔ Proper NSFW blocking (coming soon) -- 🔍 Advanced image search (coming soon) - 🌈 and lots more... **[⬆️ Back to Top](#websurfx)** @@ -209,7 +206,7 @@ We are looking for more willing contributors to help grow this project.For more > For full details and other ways you can help out, see: [**Contributing**]() -If you're using Dashy and would like to help support its development, then that would be awesome! Contributions of any type, any size, are always very much appreciated, and we will appropriately credit you for your effort. +If you're using Websurfx and would like to help support its development, then that would be awesome! Contributions of any type, any size, are always very much appreciated, and we will appropriately credit you for your effort. Several areas that we need a bit of help with at the moment are: - **Better and more colorchemes** - Help fix colorchemes and add other famous colorchemes. From c2262cc38a839bb567067baa219046d99b4cd2f6 Mon Sep 17 00:00:00 2001 From: neon_arch Date: Sat, 13 May 2023 19:24:45 +0300 Subject: [PATCH 10/22] fix: fix rust.yml and add caching to it --- .github/workflows/rust.yml | 8 ++++++++ .github/workflows/rust_cache.yml | 8 -------- 2 files changed, 8 insertions(+), 8 deletions(-) delete mode 100644 .github/workflows/rust_cache.yml diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index af47bad..dd48c6d 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -20,6 +20,14 @@ jobs: - stable steps: + - name: Cache Rust compilation + uses: metalbear-co/sccache-action@v1 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + # Optional, default is `sccache-` + cache-from: sccache-${{ runner.os }}- + # Optional, default is `sccache-latest` + cache-to: sccache-${{ runner.os }}-${{ github.sha }} - uses: actions/checkout@v3 - run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} - name: Build diff --git a/.github/workflows/rust_cache.yml b/.github/workflows/rust_cache.yml deleted file mode 100644 index ff3c06f..0000000 --- a/.github/workflows/rust_cache.yml +++ /dev/null @@ -1,8 +0,0 @@ -- name: Cache Rust compilation - uses: metalbear-co/sccache-action@v1 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - # Optional, default is `sccache-` - cache-from: sccache-${{ runner.os }}- - # Optional, default is `sccache-latest` - cache-to: sccache-${{ runner.os }}-${{ github.sha }} From ed82943702f3a93a1fa2cc381f1eb9b28f3fa299 Mon Sep 17 00:00:00 2001 From: neon_arch Date: Sat, 13 May 2023 19:31:37 +0300 Subject: [PATCH 11/22] fix: fix rust.yml caching --- .github/workflows/rust.yml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index dd48c6d..bc62ede 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -20,14 +20,20 @@ jobs: - stable steps: - - name: Cache Rust compilation - uses: metalbear-co/sccache-action@v1 + - uses: actions/checkout@v3 + - run: rustup toolchain install stable --profile minimal + - uses: Swatinem/rust-cache@v2 with: - github-token: ${{ secrets.GITHUB_TOKEN }} - # Optional, default is `sccache-` - cache-from: sccache-${{ runner.os }}- - # Optional, default is `sccache-latest` - cache-to: sccache-${{ runner.os }}-${{ github.sha }} + prefix-key: "" + shared-key: "" + key: "" + env-vars: "" + workspaces: "" + cache-directories: "" + cache-targets: "" + cache-on-failure: "" + cache-all-crates: "" + save-if: "" - uses: actions/checkout@v3 - run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} - name: Build From a569f077cb8a641c2f3dd355a6d078c5347b7d8d Mon Sep 17 00:00:00 2001 From: neon_arch Date: Sat, 13 May 2023 19:36:11 +0300 Subject: [PATCH 12/22] ci: updating github cis --- .github/workflows/clippy.yml | 5 ++++- .github/workflows/labels.yml | 3 ++- .github/workflows/rustfmt.yml | 5 ++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index aa387aa..c5e9d2e 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -2,7 +2,10 @@ name: Clippy check on: push: branches: - - rolling + - "**" + pull_request: + branches: + - "rolling" jobs: clippy_check: diff --git a/.github/workflows/labels.yml b/.github/workflows/labels.yml index ce60759..7cae050 100644 --- a/.github/workflows/labels.yml +++ b/.github/workflows/labels.yml @@ -2,7 +2,8 @@ name: Import open source standard labels on: push: - branches: [ main ] + branches: + - main jobs: labels: diff --git a/.github/workflows/rustfmt.yml b/.github/workflows/rustfmt.yml index eb4e5c0..cf605bc 100644 --- a/.github/workflows/rustfmt.yml +++ b/.github/workflows/rustfmt.yml @@ -2,7 +2,10 @@ name: Rustfmt on: push: branches: - - rolling + - "**" + pull_request: + branches: + - "rolling" jobs: format: From 36aa2f9e8699ed783368333a434418a7ad3fcb8a Mon Sep 17 00:00:00 2001 From: neon_arch Date: Sat, 13 May 2023 19:45:59 +0300 Subject: [PATCH 13/22] ci: updating github cis --- .github/workflows/labels.yml | 2 +- .github/workflows/releases.yml | 2 +- .github/workflows/rustfmt.yml | 19 ++++++++++++++----- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/.github/workflows/labels.yml b/.github/workflows/labels.yml index 7cae050..f90801a 100644 --- a/.github/workflows/labels.yml +++ b/.github/workflows/labels.yml @@ -3,7 +3,7 @@ name: Import open source standard labels on: push: branches: - - main + - master jobs: labels: diff --git a/.github/workflows/releases.yml b/.github/workflows/releases.yml index 446ee9b..e46c5aa 100644 --- a/.github/workflows/releases.yml +++ b/.github/workflows/releases.yml @@ -2,7 +2,7 @@ name: Releases on: push: branches: - - rolling + - "rolling" concurrency: group: "rolling-branch" diff --git a/.github/workflows/rustfmt.yml b/.github/workflows/rustfmt.yml index cf605bc..7570f8d 100644 --- a/.github/workflows/rustfmt.yml +++ b/.github/workflows/rustfmt.yml @@ -9,10 +9,19 @@ on: jobs: format: + name: rustfmt runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: dtolnay/rust-toolchain@stable - - uses: mbrobbel/rustfmt-check@master - with: - token: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + components: rustfmt + override: true + - uses: LoliGothick/rustfmt-check@master + with: + token: ${{ secrets.GITHUB_TOKEN }} + flags: --all + options: --manifest-path=Cargo.toml + args: --config-path=rustfmt.toml + working-directory: my_crate From b4a05bc940e9e7da1a8284d63fb5cc787f55aa69 Mon Sep 17 00:00:00 2001 From: neon_arch Date: Sat, 13 May 2023 20:03:07 +0300 Subject: [PATCH 14/22] ci: fix clippy.yml --- .github/workflows/clippy.yml | 4 ++-- .github/workflows/rustfmt.yml | 26 +++++++++++--------------- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index c5e9d2e..51b9666 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -15,5 +15,5 @@ jobs: - run: rustup component add clippy - uses: actions-rs/clippy-check@v1 with: - token: ${{ secrets.GITHUB_TOKEN }} - args: --all-features + token: ${{ secrets.GITHUB_TOKEN }} + args: --all-targets --all-features -- -D warnings diff --git a/.github/workflows/rustfmt.yml b/.github/workflows/rustfmt.yml index 7570f8d..3d43305 100644 --- a/.github/workflows/rustfmt.yml +++ b/.github/workflows/rustfmt.yml @@ -8,20 +8,16 @@ on: - "rolling" jobs: - format: - name: rustfmt + formatting: + name: cargo fmt runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: nightly - components: rustfmt - override: true - - uses: LoliGothick/rustfmt-check@master - with: - token: ${{ secrets.GITHUB_TOKEN }} - flags: --all - options: --manifest-path=Cargo.toml - args: --config-path=rustfmt.toml - working-directory: my_crate + - uses: actions/checkout@v3 + # Ensure rustfmt is installed and setup problem matcher + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + components: rustfmt + - name: Rustfmt Check + uses: Syndelis/rustfmt-action@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} From a7229b5ee4d7c29ff1ea824340963c4546779ce6 Mon Sep 17 00:00:00 2001 From: neon_arch Date: Sat, 13 May 2023 17:07:22 +0000 Subject: [PATCH 15/22] Update rustfmt.yml --- .github/workflows/rustfmt.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/rustfmt.yml b/.github/workflows/rustfmt.yml index 3d43305..7f5d33a 100644 --- a/.github/workflows/rustfmt.yml +++ b/.github/workflows/rustfmt.yml @@ -18,6 +18,4 @@ jobs: with: components: rustfmt - name: Rustfmt Check - uses: Syndelis/rustfmt-action@v1 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} + uses: actions-rust-lang/rustfmt@v1 From 0dedddf8af9353cf72b039351caf40d03ebc62be Mon Sep 17 00:00:00 2001 From: neon_arch Date: Sat, 13 May 2023 17:10:26 +0000 Subject: [PATCH 16/22] Update rustfmt.yml --- .github/workflows/rustfmt.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rustfmt.yml b/.github/workflows/rustfmt.yml index 7f5d33a..5f184a9 100644 --- a/.github/workflows/rustfmt.yml +++ b/.github/workflows/rustfmt.yml @@ -8,7 +8,7 @@ on: - "rolling" jobs: - formatting: + formatting: name: cargo fmt runs-on: ubuntu-latest steps: From 0b56a7aa630fd0d565387c401a2fd33b0677e511 Mon Sep 17 00:00:00 2001 From: neon_arch Date: Sat, 13 May 2023 20:32:33 +0300 Subject: [PATCH 17/22] ci: fix github cis --- .github/workflows/clippy.yml | 19 ------------------- .github/workflows/rust_format.yml | 26 ++++++++++++++++++++++++++ .github/workflows/rustfmt.yml | 23 ----------------------- 3 files changed, 26 insertions(+), 42 deletions(-) delete mode 100644 .github/workflows/clippy.yml create mode 100644 .github/workflows/rust_format.yml delete mode 100644 .github/workflows/rustfmt.yml diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml deleted file mode 100644 index 51b9666..0000000 --- a/.github/workflows/clippy.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Clippy check -on: - push: - branches: - - "**" - pull_request: - branches: - - "rolling" - -jobs: - clippy_check: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - run: rustup component add clippy - - uses: actions-rs/clippy-check@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - args: --all-targets --all-features -- -D warnings diff --git a/.github/workflows/rust_format.yml b/.github/workflows/rust_format.yml new file mode 100644 index 0000000..d865c8c --- /dev/null +++ b/.github/workflows/rust_format.yml @@ -0,0 +1,26 @@ +name: Rust format and clippy checks +on: + push: + branches: + - "**" + pull_request: + branches: + - "rolling" + +jobs: + check: + name: Rust project + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install minimal stable with clippy and rustfmt + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + components: rustfmt, clippy + + - name: Run cargo check + uses: actions-rs/cargo@v1 + with: + command: check diff --git a/.github/workflows/rustfmt.yml b/.github/workflows/rustfmt.yml deleted file mode 100644 index 3d43305..0000000 --- a/.github/workflows/rustfmt.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Rustfmt -on: - push: - branches: - - "**" - pull_request: - branches: - - "rolling" - -jobs: - formatting: - name: cargo fmt - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - # Ensure rustfmt is installed and setup problem matcher - - uses: actions-rust-lang/setup-rust-toolchain@v1 - with: - components: rustfmt - - name: Rustfmt Check - uses: Syndelis/rustfmt-action@v1 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} From 6b76619bf59ca57e652762e4d51c0ce10483bfd9 Mon Sep 17 00:00:00 2001 From: neon_arch Date: Sat, 13 May 2023 20:48:57 +0300 Subject: [PATCH 18/22] ci: add merge gatekeeper github ci --- .github/workflows/merge-gatekeeper.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/merge-gatekeeper.yml diff --git a/.github/workflows/merge-gatekeeper.yml b/.github/workflows/merge-gatekeeper.yml new file mode 100644 index 0000000..3596370 --- /dev/null +++ b/.github/workflows/merge-gatekeeper.yml @@ -0,0 +1,20 @@ +--- +name: Merge Gatekeeper + +on: + pull_request: + branches: + - main + - master + +jobs: + merge-gatekeeper: + runs-on: ubuntu-latest + permissions: + checks: read + statuses: read + steps: + - name: Run Merge Gatekeeper + uses: upsidr/merge-gatekeeper@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} From 29c2702467dc479cd23acfbdf02abfc3b572e4d6 Mon Sep 17 00:00:00 2001 From: neon_arch Date: Sat, 13 May 2023 17:52:33 +0000 Subject: [PATCH 19/22] Update merge-gatekeeper.yml --- .github/workflows/merge-gatekeeper.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/merge-gatekeeper.yml b/.github/workflows/merge-gatekeeper.yml index 3596370..6de750c 100644 --- a/.github/workflows/merge-gatekeeper.yml +++ b/.github/workflows/merge-gatekeeper.yml @@ -4,8 +4,7 @@ name: Merge Gatekeeper on: pull_request: branches: - - main - - master + - rolling jobs: merge-gatekeeper: From 09e4395861db37f085a6666af2be49fcf8325935 Mon Sep 17 00:00:00 2001 From: neon_arch Date: Sat, 13 May 2023 21:07:12 +0300 Subject: [PATCH 20/22] ci: remove merge gatekeeper github ci --- .github/workflows/merge-gatekeeper.yml | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 .github/workflows/merge-gatekeeper.yml diff --git a/.github/workflows/merge-gatekeeper.yml b/.github/workflows/merge-gatekeeper.yml deleted file mode 100644 index 3596370..0000000 --- a/.github/workflows/merge-gatekeeper.yml +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: Merge Gatekeeper - -on: - pull_request: - branches: - - main - - master - -jobs: - merge-gatekeeper: - runs-on: ubuntu-latest - permissions: - checks: read - statuses: read - steps: - - name: Run Merge Gatekeeper - uses: upsidr/merge-gatekeeper@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} From b0578c456795cddea5fc77838e85797a210b9942 Mon Sep 17 00:00:00 2001 From: neon_arch Date: Sun, 14 May 2023 13:24:36 +0300 Subject: [PATCH 21/22] ci: fix labels autogeneration github ci --- .github/workflows/labels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/labels.yml b/.github/workflows/labels.yml index f90801a..996862f 100644 --- a/.github/workflows/labels.yml +++ b/.github/workflows/labels.yml @@ -19,4 +19,4 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} owner-name: ${{ github.repository_owner }} repository-name: ${{ github.event.repository.name }} - force: true # optional to clear existing labels, default to true + # force: true # optional to clear existing labels, default to true From 2d218d6ebc73505c4f9b27cf7be3afdba6095b8e Mon Sep 17 00:00:00 2001 From: neon_arch Date: Sun, 14 May 2023 13:32:41 +0300 Subject: [PATCH 22/22] ci: fix labels/tags auto-generation on oss standards github ci --- .github/workflows/labels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/labels.yml b/.github/workflows/labels.yml index 996862f..f90801a 100644 --- a/.github/workflows/labels.yml +++ b/.github/workflows/labels.yml @@ -19,4 +19,4 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} owner-name: ${{ github.repository_owner }} repository-name: ${{ github.event.repository.name }} - # force: true # optional to clear existing labels, default to true + force: true # optional to clear existing labels, default to true