Skip to content

Commit

Permalink
Merge pull request #1 from Bal7hazar/main
Browse files Browse the repository at this point in the history
🎉  Kick start the project
  • Loading branch information
ponderingdemocritus authored Nov 3, 2023
2 parents 07edfd8 + 2bfe516 commit f0cac62
Show file tree
Hide file tree
Showing 28 changed files with 2,156 additions and 1 deletion.
15 changes: 15 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: 'Setup'
description: 'Setup tooling'
runs:
using: "composite"
steps:
- name: Install dojoup
run: curl -L https://install.dojoengine.org | bash
shell: bash

- name: Install dojo
run: |
/home/runner/.config/.dojo/bin/dojoup --version ${{ env.DOJO_VERSION }}
sudo mv /home/runner/.config/.dojo/bin/katana /usr/local/bin/
sudo mv /home/runner/.config/.dojo/bin/sozo /usr/local/bin/
shell: bash
67 changes: 67 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Test

on: [push, pull_request]

env:
DOJO_VERSION: v0.3.3

jobs:
check:
runs-on: ubuntu-latest
name: Check format
steps:
- uses: actions/checkout@v4
- uses: software-mansion/setup-scarb@v1
- name: Format
run: scarb fmt --package random --check
shell: bash

build:
runs-on: ubuntu-latest
name: Build package
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- name: Build
run: sozo build
shell: bash

algebra:
runs-on: ubuntu-latest
name: Test algebra crate
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- name: Test
run: sozo test -f algebra
shell: bash

defi:
runs-on: ubuntu-latest
name: Test defi crate
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- name: Test
run: sozo test -f defi
shell: bash

random:
runs-on: ubuntu-latest
name: Test random crate
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- name: Test
run: sozo test -f random
shell: bash

security:
runs-on: ubuntu-latest
name: Test security crate
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- name: Test
run: sozo test -f security
shell: bash
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.vscode
target
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# origami
# Origami
47 changes: 47 additions & 0 deletions Scarb.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Code generated by scarb DO NOT EDIT.
version = 1

[[package]]
name = "algebra"
version = "0.0.0"
dependencies = [
"cubit",
]

[[package]]
name = "cubit"
version = "1.2.0"
source = "git+https://github.com/influenceth/cubit?rev=b459053#b4590530d5aeae9aabd36740cc2a3d9e6adc5fde"

[[package]]
name = "defi"
version = "0.0.0"
dependencies = [
"cubit",
]

[[package]]
name = "dojo"
version = "0.3.3"
source = "git+https://github.com/dojoengine/dojo.git?tag=v0.3.3#3c9f109e667ca5d12739e6553fdb8261378f4ecf"
dependencies = [
"dojo_plugin",
]

[[package]]
name = "dojo_plugin"
version = "0.3.3"

[[package]]
name = "random"
version = "0.0.0"
dependencies = [
"dojo",
]

[[package]]
name = "security"
version = "0.0.0"
dependencies = [
"dojo",
]
14 changes: 14 additions & 0 deletions Scarb.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[workspace]
name = "origami"
version = "0.0.0"
description = "Community-maintained libraries for Cairo"
homepage = "https://github.com/dojoengine/origami"
members = [
"crates/algebra",
"crates/defi",
"crates/random",
"crates/security",
]

[workspace.dependencies]
dojo = { git = "https://github.com/dojoengine/dojo.git", tag = "v0.3.3" }
1 change: 1 addition & 0 deletions crates/algebra/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
target
14 changes: 14 additions & 0 deletions crates/algebra/Scarb.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Code generated by scarb DO NOT EDIT.
version = 1

[[package]]
name = "cubit"
version = "1.2.0"
source = "git+https://github.com/influenceth/cubit?rev=b459053#b4590530d5aeae9aabd36740cc2a3d9e6adc5fde"

[[package]]
name = "physics"
version = "0.0.0"
dependencies = [
"cubit",
]
8 changes: 8 additions & 0 deletions crates/algebra/Scarb.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[package]
name = "algebra"
version = "0.0.0"
description = "Implementations of a algebra library."
homepage = "https://github.com/dojoengine/origami/tree/crates/algebra"

[dependencies]
cubit = { git = "https://github.com/influenceth/cubit", rev = "b459053" }
3 changes: 3 additions & 0 deletions crates/algebra/src/lib.cairo
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mod vec2;
mod vector;
mod matrix;
Loading

0 comments on commit f0cac62

Please sign in to comment.