From ba2230cf764583c9eb5656b2821bb8db624db324 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Thu, 18 Jan 2024 22:28:54 +0100 Subject: [PATCH] Initial commit --- .gitea/workflows/cargo.yaml | 44 +++++++++++++++++++++++++++++++++++++ .gitignore | 21 ++++++++++++++++++ Cargo.toml | 16 ++++++++++++++ LICENSE | 9 ++++++++ README.md | 3 +++ src/main.rs | 3 +++ 6 files changed, 96 insertions(+) create mode 100644 .gitea/workflows/cargo.yaml create mode 100644 .gitignore create mode 100644 Cargo.toml create mode 100644 LICENSE create mode 100644 README.md create mode 100644 src/main.rs diff --git a/.gitea/workflows/cargo.yaml b/.gitea/workflows/cargo.yaml new file mode 100644 index 0000000..017d21c --- /dev/null +++ b/.gitea/workflows/cargo.yaml @@ -0,0 +1,44 @@ +name: cargo devel CI +on: + push: + branches: + - '**' + # - '!master' + +jobs: + format: + name: cargo CI + permissions: + # Give the default GITHUB_TOKEN write permission to commit and push the + # added or changed files to the repository. + contents: write + steps: + - name: get repo + uses: actions/checkout@v4 + - name: install rust + uses: dtolnay/rust-toolchain@stable + - name: install additional rust things + run: rustup component add rustfmt + - name: config custom registry + run: | + mkdir -p ~/.cargo/ + echo "" > ~/.cargo/config.toml + echo "[registry]" >> ~/.cargo/config.toml + echo 'cscherr = "cscherr"' >> ~/.cargo/config.toml + echo '[registries.cscherr]' >> ~/.cargo/config.toml + echo 'index = "https://git.cscherr.de/PlexSheep/_cargo-index.git"' >> ~/.cargo/config.toml + cat ~/.cargo/config.toml + - name: cargo check + run: cargo check --all-features --all-targets + - name: cargo fix + run: cargo fix --all-features --all-targets + - name: cargo fmt + run: cargo fmt --all + - name: cargo test + run: cargo test --all-features --all-targets + - name: commit back to repository + uses: stefanzweifel/git-auto-commit-action@v5 + with: + # Optional. Commit message for the created commit. + # Defaults to "Apply automatic changes" + commit_message: automatic cargo CI changes diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..193d30e --- /dev/null +++ b/.gitignore @@ -0,0 +1,21 @@ +# ---> Rust +# Generated by Cargo +# will have compiled files and executables +debug/ +target/ + +# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries +# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html +Cargo.lock + +# These are backup files generated by rustfmt +**/*.rs.bk + +# MSVC Windows builds of rustc generate these, which store debugging information +*.pdb + + + +# Added by cargo + +/target diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..0543e1f --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,16 @@ +[package] +name = "template" +version = "0.1.0" +edition = "2021" +publish = false +authors = ["Christoph J. Scherr "] +license = "MIT" +description = "No description yet" +readme = "README.md" +homepage = "https://git.cscherr.de/PlexSheep/rs-base" +repository = "https://git.cscherr.de/PlexSheep/rs-base" +keywords = ["template"] + + +[dependencies] + diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..b8a4560 --- /dev/null +++ b/LICENSE @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) 2024 PlexSheep + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..a27185f --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# rs-base + +Base repository for rust projects \ No newline at end of file diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +}