Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaRHristov committed Jul 28, 2024
1 parent 3d35abe commit 0f04f39
Show file tree
Hide file tree
Showing 8 changed files with 244 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .cargo/Config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[build]
target-dir = "Target"

[cargo-new]
vcs = "git"

[profile.release]
opt-level = 3
codegen-units = 1
debug = false
lto = true
panic = "abort"
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
open_collective: playform-cloud-collective
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 2
enable-beta-ecosystems: true

updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"

- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "daily"
versioning-strategy: lockfile-only
45 changes: 45 additions & 0 deletions .github/workflows/Dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Dependabot

concurrency:
group: Dependabot-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
security-events: write
contents: write
pull-requests: write

on:
workflow_dispatch:
pull_request:

jobs:
Approve:
runs-on: ubuntu-latest

if: ${{ github.actor == 'dependabot[bot]' }}

steps:
- uses: dependabot/fetch-metadata@v2.2.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

- run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

Merge:
runs-on: ubuntu-latest

if: ${{ github.actor == 'dependabot[bot]' }}

steps:
- uses: dependabot/fetch-metadata@v2.2.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

- run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
58 changes: 58 additions & 0 deletions .github/workflows/GitHub.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: GitHub

concurrency:
group: GitHub-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
issues: write
pull-requests: write

on:
issues:
types: [opened]
pull_request:
types: [opened]

jobs:
Assign:
runs-on: ubuntu-latest

env:
ADBLOCK: true
ASTRO_TELEMETRY_DISABLED: 1
AUTOMATEDLAB_TELEMETRY_OPTOUT: 1
AZURE_CORE_COLLECT_TELEMETRY: 0
CHOOSENIM_NO_ANALYTICS: 1
DIEZ_DO_NOT_TRACK: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_INTERACTIVE_CLI_TELEMETRY_OPTOUT: 1
DO_NOT_TRACK: 1
ET_NO_TELEMETRY: 1
GATSBY_TELEMETRY_DISABLED: 1
GATSBY_TELEMETRY_OPTOUT: 1
GATSBY_TELEMETRY_OPT_OUT: 1
GRIT_TELEMETRY_DISABLED: 1
HASURA_GRAPHQL_ENABLE_TELEMETRY: false
HINT_TELEMETRY: off
HOMEBREW_NO_ANALYTICS: 1
INFLUXD_REPORTING_DISABLED: true
ITERATIVE_DO_NOT_TRACK: 1
NEXT_TELEMETRY_DEBUG: 1
NEXT_TELEMETRY_DISABLED: 1
NG_CLI_ANALYTICS: false
NUXT_TELEMETRY_DISABLED: 1
PIN_DO_NOT_TRACK: 1
POWERSHELL_TELEMETRY_OPTOUT: 1
SAM_CLI_TELEMETRY: 0
STNOUPGRADE: 1
STRIPE_CLI_TELEMETRY_OPTOUT: 1
TELEMETRY_DISABLED: 1
TERRAFORM_TELEMETRY: 0

steps:
- uses: pozil/auto-assign-issue@v2.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
assignees: NikolaRHristov
numOfAssignee: 1
79 changes: 79 additions & 0 deletions .github/workflows/Rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: Rust

concurrency:
group: Rust-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
security-events: write

on:
workflow_dispatch:
push:
branches: [Current]
pull_request:
branches: [Current]
workflow_call:

jobs:
Build:
runs-on: ubuntu-latest

env:
ADBLOCK: true
ASTRO_TELEMETRY_DISABLED: 1
AUTOMATEDLAB_TELEMETRY_OPTOUT: 1
AZURE_CORE_COLLECT_TELEMETRY: 0
CHOOSENIM_NO_ANALYTICS: 1
DIEZ_DO_NOT_TRACK: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_INTERACTIVE_CLI_TELEMETRY_OPTOUT: 1
DO_NOT_TRACK: 1
ET_NO_TELEMETRY: 1
GATSBY_TELEMETRY_DISABLED: 1
GATSBY_TELEMETRY_OPTOUT: 1
GATSBY_TELEMETRY_OPT_OUT: 1
GRIT_TELEMETRY_DISABLED: 1
HASURA_GRAPHQL_ENABLE_TELEMETRY: false
HINT_TELEMETRY: off
HOMEBREW_NO_ANALYTICS: 1
INFLUXD_REPORTING_DISABLED: true
ITERATIVE_DO_NOT_TRACK: 1
NEXT_TELEMETRY_DEBUG: 1
NEXT_TELEMETRY_DISABLED: 1
NG_CLI_ANALYTICS: false
NUXT_TELEMETRY_DISABLED: 1
PIN_DO_NOT_TRACK: 1
POWERSHELL_TELEMETRY_OPTOUT: 1
SAM_CLI_TELEMETRY: 0
STNOUPGRADE: 1
STRIPE_CLI_TELEMETRY_OPTOUT: 1
TELEMETRY_DISABLED: 1
TERRAFORM_TELEMETRY: 0

strategy:
matrix:
toolchain: ["stable", "nightly"]

steps:
- uses: actions/checkout@v4.1.7

- uses: actions-rs/toolchain@v1.0.7
with:
profile: minimal
toolchain: ${{ matrix.toolchain }}

- uses: actions/cache@v4.0.2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
Target/
key: ${{ runner.os }}-cargo-${{ hashFiles('./Cargo.toml') }}
- uses: actions-rs/cargo@v1.0.3
with:
command: build
args: --release --all-features --manifest-path ./Cargo.toml
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/Target/*

!/Target/release
/Target/release/*

!/Target/release/*.deb
!/Target/release/*.exe
!/Target/release/PRun
!/Target/release/Run
26 changes: 26 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#![allow(non_snake_case)]

use serde::Deserialize;
use std::fs;

#[derive(Deserialize)]
struct Toml {
package: Package,
}

#[derive(Deserialize)]
struct Package {
version: String,
}

fn main() {
println!("cargo:rerun-if-changed=Cargo.toml");

println!(
"cargo:rustc-env=CARGO_PKG_VERSION={}",
(toml::from_str::<Toml>(&fs::read_to_string("Cargo.toml").expect("Cannot Cargo.toml."))
.expect("Cannot toml."))
.package
.version
);
}

0 comments on commit 0f04f39

Please sign in to comment.