Skip to content

Commit 3173c6d

Browse files
authored
V0.0.1 (#84)
2 parents e90fab0 + 863726f commit 3173c6d

File tree

180 files changed

+1283
-9483
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

180 files changed

+1283
-9483
lines changed

.github/dependabot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ updates:
2929
schedule:
3030
interval: daily
3131
- package-ecosystem: cargo
32-
directory: /tensor
32+
directory: /math
3333
schedule:
34-
interval: daily
34+
interval: daily

.github/workflows/clippy.yml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
1-
name: Clippy
1+
name: clippy
22

33
concurrency:
44
group: ${{ github.workflow }}-${{ github.ref }}
55
cancel-in-progress: false
66

77
on:
88
pull_request:
9-
branches: [ main ]
9+
branches: [ main, master ]
10+
types: [ opened, reopened ]
1011
push:
11-
branches: [ main ]
12-
tags: [ nightly*, v*.*.* ]
12+
branches: [ main, master ]
13+
tags: [ v*, "*-nightly" ]
1314
release:
1415
types: [ created ]
1516
repository_dispatch:
1617
types: [ clippy ]
17-
schedule:
18-
- cron: 30 21 * * 0 # Every Sunday at 9:30PM UTC
1918
workflow_dispatch:
2019

2120
permissions:
@@ -29,22 +28,24 @@ jobs:
2928
runs-on: ubuntu-latest
3029
steps:
3130
- uses: actions/checkout@v4
32-
- name: Setup the toolchain
33-
uses: actions-rs/toolchain@v1
31+
-
32+
name: setup rust-toolchain
33+
uses: actions-rust-lang/setup-rust-toolchain@v1
3434
with:
35-
profile: minimal
36-
toolchain: stable
37-
components: clippy
38-
override: true
39-
- name: Installation
35+
cache-workspaces: true
36+
components: clippy, rustfmt
37+
-
38+
name: setup cargo
4039
run: cargo install clippy-sarif sarif-fmt
41-
- name: Analyze
40+
-
41+
name: Run rust-clippy
4242
run:
4343
cargo clippy
4444
--all-features
4545
--message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt
4646
continue-on-error: true
47-
- name: Upload analysis
47+
-
48+
name: Upload analysis
4849
uses: github/codeql-action/upload-sarif@v3
4950
with:
5051
sarif_file: rust-clippy-results.sarif

.github/workflows/crates.yml

Lines changed: 38 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,71 @@
1-
name: Crates
1+
name: crates.io
22

33
concurrency:
44
group: ${{ github.workflow }}-${{ github.ref }}
55
cancel-in-progress: false
66

77
env:
8-
BASENAME: ${{ github.event.repository.name }}
8+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
99
CARGO_TERM_COLOR: always
1010

1111
on:
1212
release:
13-
types: [ created ]
13+
types: [ published ]
1414
repository_dispatch:
1515
types: [ publish ]
1616
workflow_dispatch:
1717

1818
jobs:
1919
core:
20-
name: Publish (core)
2120
runs-on: ubuntu-latest
21+
strategy:
22+
matrix:
23+
features: [ core ]
2224
env:
23-
CARGO_PACKAGE_NAME: ${{ github.event.repository.name }}-core
25+
PACKAGE: ${{ github.event.repository.name }}-${{ matrix.features }}
2426
steps:
2527
- uses: actions/checkout@v4
26-
- name: Publish (${{ env.CARGO_PACKAGE_NAME }})
27-
run: cargo publish --all-features -v -p ${{ env.CARGO_PACKAGE_NAME }} --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
28+
-
29+
name: rustup
30+
uses: actions-rust-lang/setup-rust-toolchain@v1
31+
with:
32+
cache-key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
33+
cache-workspaces: true
34+
-
35+
name: publish (${{ env.PACKAGE }})
36+
run: cargo publish --all-features -v -p ${{ env.PACKAGE }}
2837
features:
29-
name: Publish Features
3038
needs: core
3139
runs-on: ubuntu-latest
3240
strategy:
3341
matrix:
34-
features: [ derive, graphs, macros, tensor ]
42+
features: [ derive, graphs, macros, math ]
3543
env:
36-
CARGO_PACKAGE_NAME: ${{ github.event.repository.name }}-${{ matrix.features }}
44+
PACKAGE: ${{ github.event.repository.name }}-${{ matrix.features }}
3745
steps:
3846
- uses: actions/checkout@v4
39-
- name: Publish (${{ env.CARGO_PACKAGE_NAME }})
40-
run: cargo publish --all-features -v -p ${{ env.CARGO_PACKAGE_NAME }} --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
47+
-
48+
name: rustup
49+
uses: actions-rust-lang/setup-rust-toolchain@v1
50+
with:
51+
cache-key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
52+
cache-workspaces: true
53+
-
54+
name: publish (${{ env.PACKAGE }})
55+
run: cargo publish --all-features -v -p ${{ env.PACKAGE }}
4156
publish:
4257
env:
43-
CARGO_PACKAGE_NAME: ${{ github.event.repository.name }}
44-
name: Publish SDK
45-
needs: features
58+
PACKAGE: ${{ github.event.repository.name }}
59+
needs: [ core, features ]
4660
runs-on: ubuntu-latest
4761
steps:
4862
- uses: actions/checkout@v4
49-
- name: Publish (${{ env.CARGO_PACKAGE_NAME }})
50-
run: cargo publish --all-features -v -p ${{ env.CARGO_PACKAGE_NAME }} --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
63+
-
64+
name: rustup
65+
uses: actions-rust-lang/setup-rust-toolchain@v1
66+
with:
67+
cache-key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
68+
cache-workspaces: true
69+
-
70+
name: publish (${{ env.PACKAGE }})
71+
run: cargo publish --all-features -v -p ${{ env.PACKAGE }}

.github/workflows/rust.yml

Lines changed: 36 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,62 @@
1-
name: Rust
1+
name: rust
22

3-
concurrency:
4-
group: ${{ github.workflow }}-${{ github.ref }}
3+
concurrency:
54
cancel-in-progress: false
5+
group: ${{ github.workflow }}-${{ github.ref }}
66

77
env:
88
CARGO_TERM_COLOR: always
99

1010
on:
11+
pull_request:
12+
branches: [ main, master, ]
13+
types: [ opened, synchronize, reopened ]
1114
push:
12-
branches: [ main ]
13-
release:
14-
types: [ created ]
15+
tags: [ v*, "*-nightly" ]
1516
repository_dispatch:
1617
types: [ rust ]
17-
schedule:
18-
- cron: 30 21 * * 0 # Every Sunday at 9:30pm UTC
1918
workflow_dispatch:
2019

21-
jobs:
22-
builder:
20+
permissions: write-all
2321

24-
name: Build
22+
jobs:
23+
workspace:
2524
strategy:
2625
matrix:
27-
platform: [ macos-latest, ubuntu-latest, windows-latest ]
26+
platform: [ ubuntu-latest ]
27+
target: [ x86_64-unknown-linux-gnu ]
2828
toolchain: [ stable, nightly ]
2929
runs-on: ${{ matrix.platform }}
3030
steps:
3131
- uses: actions/checkout@v4
32-
- name: setup (langspace)
33-
run: |
34-
rustup default ${{ matrix.toolchain }}
35-
rustup update
36-
- name: Build
37-
if: matrix.toolchain == 'stable'
32+
-
33+
name: rustup
34+
uses: actions-rust-lang/setup-rust-toolchain@v1
35+
with:
36+
cache-key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
37+
cache-workspaces: true
38+
target: ${{ matrix.target }}
39+
toolchain: ${{ matrix.toolchain }}
40+
-
41+
name: build
3842
run: cargo build --all-features -r -v --workspace
39-
- name: Build (nightly)
40-
continue-on-error: true
43+
-
44+
name: test
45+
run: cargo test --all-features -r -v --workspace
46+
-
47+
name: bench
4148
if: matrix.toolchain == 'nightly'
42-
run: cargo build --all-features -r -v --workspace
43-
- name: Cache build
44-
id: cache-build
49+
run: cargo bench -F full -v --workspace
50+
-
51+
name: cache
4552
uses: actions/cache@v4
4653
with:
54+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
4755
path: |
4856
~/.cargo/registry
4957
~/.cargo/git
50-
target/release
51-
key: ${{ matrix.toolchain }}-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
52-
test:
53-
name: Test
54-
needs: [ builder ]
55-
strategy:
56-
matrix:
57-
toolchain: [ stable, nightly ]
58-
runs-on: ubuntu-latest
59-
steps:
60-
- uses: actions/checkout@v4
61-
- name: setup (langspace)
62-
run: |
63-
rustup default ${{ matrix.toolchain }}
64-
rustup update
65-
- name: Test
66-
run: cargo test --all-features -v --workspace
67-
bench:
68-
continue-on-error: true
69-
name: Benchmark
70-
needs: [ builder ]
71-
runs-on: ubuntu-latest
72-
steps:
73-
- uses: actions/checkout@v4
74-
- name: setup (langspace)
75-
run: |
76-
rustup default nightly
77-
rustup update
78-
- name: Bench
79-
run: cargo bench --all --features full -v
58+
target
59+
restore-keys: |
60+
${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
61+
${{ runner.os }}-cargo-
62+
${{ runner.os }}-

.gitpod.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# This configuration file was automatically generated by Gitpod.
2+
# Please adjust to your needs (see https://www.gitpod.io/docs/introduction/learn-gitpod/gitpod-yaml)
3+
# and commit this file to your remote git repository to share the goodness with others.
4+
5+
# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart
6+
7+
tasks:
8+
- init: cargo build
9+
command: cargo watch -x run
10+
11+

Cargo.toml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
11
[workspace.package]
2-
authors = ["FL03 <jo3mccain@icloud.com> (https://github.com/FL03)"]
2+
authors = ["FL03 <jo3mccain@icloud.com>"]
33
categories = ["mathematics", "science"]
4-
description = "Acme aims to provide a solid foundation for developing robust machine-learning systems in Rust."
4+
description = "rsdiff aims to provide a solid foundation for developing robust machine-learning systems in Rust."
55
edition = "2021"
6-
homepage = "https://github.com/FL03/acme/wikis"
6+
homepage = "https://github.com/FL03/rsdiff/wikis"
77
keywords = ["acme", "autodiff", "mathematics", "tensor"]
88
license = "Apache-2.0"
9-
repository = "https://github.com/FL03/acme"
9+
repository = "https://github.com/FL03/rsdiff"
1010
readme = "README.md"
11-
version = "0.3.1"
12-
# version = "0.3.1-nightly"
11+
version = "0.0.1"
12+
# version = "0.3.2-nightly"
1313

1414
[workspace]
1515
default-members = [
16-
"acme"
16+
"rsdiff"
1717
]
1818

1919
exclude = [
20-
"exp/container",
2120
]
2221

2322
members = [
24-
"acme",
23+
"rsdiff",
2524
"core",
2625
"derive",
2726
"graphs",
28-
"macros",
29-
"tensor",
27+
"macros",
28+
"math",
3029

3130
]
3231
resolver = "2"
3332

3433
[workspace.dependencies]
3534
paste = "1"
35+
scsys = "0.2.1"
3636
strum = { features = ["derive"], version = "0.26" }
3737
smart-default = "0.7"
3838

0 commit comments

Comments
 (0)