Skip to content

Commit

Permalink
Update Cargo.toml (#72)
Browse files Browse the repository at this point in the history
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Added GitHub Actions workflow for automated Rust project building and
testing
- **Chores**
  - Updated project version to 0.1.1
  - Updated project description
  - Added `serde` and `rand` dependencies
  - Corrected release profile optimization level

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
josefkedwards authored Jan 31, 2025
2 parents 4e505d5 + ec33fca commit 8e0ef88
Showing 1 changed file with 124 additions and 0 deletions.
124 changes: 124 additions & 0 deletions .github/workflows/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,127 @@ rand = "0.8"
[profile.release]
# Example release build settings, if needed
opt-level = 3p
name: "Cargo PMLL Build & Test"

on:
# Run this workflow whenever a push is made to main
push:
branches: [ "main" ]
# Also run for pull requests targeting main
pull_request:
branches: [ "main" ]

jobs:
build-and-test:
runs-on: ubuntu-latest

steps:
# 1) Check out your repository code
- name: Check out code
uses: actions/checkout@v4

# 2) (Optional) install a particular Rust toolchain (stable, nightly, etc.)
# The runner may already have stable Rust, so you can skip if you want default stable.
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
# Alternatively:
# uses: actions-rs/toolchain@v1
# with:
# profile: minimal
# toolchain: stable
# override: true

# 3) Build your Rust project
- name: Cargo Build
run: cargo build --verbose
# If Cargo.toml is in a subdirectory, adjust with --manifest-path subdir/Cargo.toml

# 4) (Optional) Run tests
- name: Cargo Test
run: cargo test --verbose

# 5) (Optional) Lint or format checks
# - name: Cargo Clippy
# run: cargo clippy --all-targets --all-features -- -D warnings

# - name: Cargo Fmt Check
# run: cargo fmt --all -- --check
[package]
name = "pmll_logic_loop_knowledge_block"
version = "0.1.0"
edition = "2021"

# Author info; you can add more names or contact if needed.
authors = ["Josef Kurk Edwards (OpenAI) <josef@example.com>"]

description = "An example Rust project demonstrating cargo build"
license = "MIT"

[dependencies]
# Add your dependencies here, for example:
# serde = "1.0"
# rand = "0.8"

[package]
name = "pmll_logic_loop_knowledge_block"
version = "0.1.1"
edition = "2021"
license = "MIT"
authors = ["Josef Kurk Edwards (OpenAI) <josef@example.com>"]
description = "An upgraded Rust project demonstrating cargo build and common dependencies."

# Optional: if you're publishing to crates.io, you can also include:
# repository = "https://github.com/YOUR_USERNAME/YOUR_REPO"

[dependencies]
# Example commonly used crates:
serde = "1.0"
rand = "0.8"

# If you need additional crates, add them here (e.g. 'reqwest', 'tokio', etc.)

[profile.release]
# Example release build settings, if needed
opt-level = 3

name: "Cargo Build & Test"

on:
# Run this workflow whenever a push is made to main
push:
branches: [ "main" ]
# Also run for pull requests targeting main
pull_request:
branches: [ "main" ]

jobs:
build-and-test:
runs-on: ubuntu-latest

steps:
# 1. Check out your repository's code so we have access to Cargo.toml, src/, etc.
- name: Check out code
uses: actions/checkout@v4

# 2. (Optional) Install a particular Rust toolchain, e.g. stable, nightly, or a pinned version.
# If you want the default stable from GitHub's runner, you can skip this step.
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
# Alternatively:
# uses: actions-rs/toolchain@v1
# with:
# profile: minimal
# toolchain: stable
# override: true

# 3. Build your project in debug mode
- name: Cargo Build
run: cargo build --verbose

# 4. (Optional) Run tests
- name: Cargo Test
run: cargo test --verbose

# 5. (Optional) Run clippy or other checks
# - name: Cargo Clippy
# run: cargo clippy --all-targets --all-features -- -D warnings

0 comments on commit 8e0ef88

Please sign in to comment.