Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V0.0.1 #84

Merged
merged 17 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ updates:
schedule:
interval: daily
- package-ecosystem: cargo
directory: /tensor
directory: /math
schedule:
interval: daily
interval: daily
31 changes: 16 additions & 15 deletions .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
name: Clippy
name: clippy

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

on:
pull_request:
branches: [ main ]
branches: [ main, master ]
types: [ opened, reopened ]
push:
branches: [ main ]
tags: [ nightly*, v*.*.* ]
branches: [ main, master ]
tags: [ v*, "*-nightly" ]
release:
types: [ created ]
repository_dispatch:
types: [ clippy ]
schedule:
- cron: 30 21 * * 0 # Every Sunday at 9:30PM UTC
workflow_dispatch:

permissions:
Expand All @@ -29,22 +28,24 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup the toolchain
uses: actions-rs/toolchain@v1
-
name: setup rust-toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
profile: minimal
toolchain: stable
components: clippy
override: true
- name: Installation
cache-workspaces: true
components: clippy, rustfmt
-
name: setup cargo
run: cargo install clippy-sarif sarif-fmt
- name: Analyze
-
name: Run rust-clippy
run:
cargo clippy
--all-features
--message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt
continue-on-error: true
- name: Upload analysis
-
name: Upload analysis
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: rust-clippy-results.sarif
Expand Down
55 changes: 38 additions & 17 deletions .github/workflows/crates.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,71 @@
name: Crates
name: crates.io

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

env:
BASENAME: ${{ github.event.repository.name }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
CARGO_TERM_COLOR: always

on:
release:
types: [ created ]
types: [ published ]
repository_dispatch:
types: [ publish ]
workflow_dispatch:

jobs:
core:
name: Publish (core)
runs-on: ubuntu-latest
strategy:
matrix:
features: [ core ]
env:
CARGO_PACKAGE_NAME: ${{ github.event.repository.name }}-core
PACKAGE: ${{ github.event.repository.name }}-${{ matrix.features }}
steps:
- uses: actions/checkout@v4
- name: Publish (${{ env.CARGO_PACKAGE_NAME }})
run: cargo publish --all-features -v -p ${{ env.CARGO_PACKAGE_NAME }} --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
-
name: rustup
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache-key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
cache-workspaces: true
-
name: publish (${{ env.PACKAGE }})
run: cargo publish --all-features -v -p ${{ env.PACKAGE }}
features:
name: Publish Features
needs: core
runs-on: ubuntu-latest
strategy:
matrix:
features: [ derive, graphs, macros, tensor ]
features: [ derive, graphs, macros, math ]
env:
CARGO_PACKAGE_NAME: ${{ github.event.repository.name }}-${{ matrix.features }}
PACKAGE: ${{ github.event.repository.name }}-${{ matrix.features }}
steps:
- uses: actions/checkout@v4
- name: Publish (${{ env.CARGO_PACKAGE_NAME }})
run: cargo publish --all-features -v -p ${{ env.CARGO_PACKAGE_NAME }} --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
-
name: rustup
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache-key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
cache-workspaces: true
-
name: publish (${{ env.PACKAGE }})
run: cargo publish --all-features -v -p ${{ env.PACKAGE }}
publish:
env:
CARGO_PACKAGE_NAME: ${{ github.event.repository.name }}
name: Publish SDK
needs: features
PACKAGE: ${{ github.event.repository.name }}
needs: [ core, features ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Publish (${{ env.CARGO_PACKAGE_NAME }})
run: cargo publish --all-features -v -p ${{ env.CARGO_PACKAGE_NAME }} --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
-
name: rustup
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache-key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
cache-workspaces: true
-
name: publish (${{ env.PACKAGE }})
run: cargo publish --all-features -v -p ${{ env.PACKAGE }}
89 changes: 36 additions & 53 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,79 +1,62 @@
name: Rust
name: rust

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

env:
CARGO_TERM_COLOR: always

on:
pull_request:
branches: [ main, master, ]
types: [ opened, synchronize, reopened ]
push:
branches: [ main ]
release:
types: [ created ]
tags: [ v*, "*-nightly" ]
repository_dispatch:
types: [ rust ]
schedule:
- cron: 30 21 * * 0 # Every Sunday at 9:30pm UTC
workflow_dispatch:

jobs:
builder:
permissions: write-all

name: Build
jobs:
workspace:
strategy:
matrix:
platform: [ macos-latest, ubuntu-latest, windows-latest ]
platform: [ ubuntu-latest ]
target: [ x86_64-unknown-linux-gnu ]
toolchain: [ stable, nightly ]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- name: setup (langspace)
run: |
rustup default ${{ matrix.toolchain }}
rustup update
- name: Build
if: matrix.toolchain == 'stable'
-
name: rustup
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache-key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
cache-workspaces: true
target: ${{ matrix.target }}
toolchain: ${{ matrix.toolchain }}
-
name: build
run: cargo build --all-features -r -v --workspace
- name: Build (nightly)
continue-on-error: true
-
name: test
run: cargo test --all-features -r -v --workspace
-
name: bench
if: matrix.toolchain == 'nightly'
run: cargo build --all-features -r -v --workspace
- name: Cache build
id: cache-build
run: cargo bench -F full -v --workspace
-
name: cache
uses: actions/cache@v4
with:
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
path: |
~/.cargo/registry
~/.cargo/git
target/release
key: ${{ matrix.toolchain }}-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
test:
name: Test
needs: [ builder ]
strategy:
matrix:
toolchain: [ stable, nightly ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: setup (langspace)
run: |
rustup default ${{ matrix.toolchain }}
rustup update
- name: Test
run: cargo test --all-features -v --workspace
bench:
continue-on-error: true
name: Benchmark
needs: [ builder ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: setup (langspace)
run: |
rustup default nightly
rustup update
- name: Bench
run: cargo bench --all --features full -v
target
restore-keys: |
${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
${{ runner.os }}-cargo-
${{ runner.os }}-
11 changes: 11 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This configuration file was automatically generated by Gitpod.
# Please adjust to your needs (see https://www.gitpod.io/docs/introduction/learn-gitpod/gitpod-yaml)
# and commit this file to your remote git repository to share the goodness with others.

# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart

tasks:
- init: cargo build
command: cargo watch -x run


22 changes: 11 additions & 11 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
[workspace.package]
authors = ["FL03 <jo3mccain@icloud.com> (https://github.com/FL03)"]
authors = ["FL03 <jo3mccain@icloud.com>"]
categories = ["mathematics", "science"]
description = "Acme aims to provide a solid foundation for developing robust machine-learning systems in Rust."
description = "rsdiff aims to provide a solid foundation for developing robust machine-learning systems in Rust."
edition = "2021"
homepage = "https://github.com/FL03/acme/wikis"
homepage = "https://github.com/FL03/rsdiff/wikis"
keywords = ["acme", "autodiff", "mathematics", "tensor"]
license = "Apache-2.0"
repository = "https://github.com/FL03/acme"
repository = "https://github.com/FL03/rsdiff"
readme = "README.md"
version = "0.3.1"
# version = "0.3.1-nightly"
version = "0.0.1"
# version = "0.3.2-nightly"

[workspace]
default-members = [
"acme"
"rsdiff"
]

exclude = [
"exp/container",
]

members = [
"acme",
"rsdiff",
"core",
"derive",
"graphs",
"macros",
"tensor",
"macros",
"math",

]
resolver = "2"

[workspace.dependencies]
paste = "1"
scsys = "0.2.1"
strum = { features = ["derive"], version = "0.26" }
smart-default = "0.7"

Expand Down
Loading