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

Handle namespace for models and contracts #2023

Merged
merged 8 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from 7 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
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/rust
{
"name": "Rust",
"image": "ghcr.io/dojoengine/dojo-dev:v0.7.0",
"image": "ghcr.io/dojoengine/dojo-dev:v0.7.1",
"runArgs": [
"--cap-add=SYS_PTRACE",
"--security-opt",
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
build:
runs-on: ubuntu-latest
container:
image: ghcr.io/dojoengine/dojo-dev:v0.7.0
image: ghcr.io/dojoengine/dojo-dev:v0.7.1
steps:
- uses: actions/checkout@v3
- run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
Expand Down
62 changes: 52 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,35 @@ env:
RUST_VERSION: 1.76.0

jobs:
build:
runs-on: ubuntu-latest-4-cores
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- run: |
cargo build -r --bin katana
mkdir -p bins
cp ./target/release/katana bins/
- uses: actions/upload-artifact@v4
with:
name: katana-binary
path: bins

test:
needs: ensure-docker
runs-on: ubuntu-latest-32-cores
container:
image: ghcr.io/dojoengine/dojo-dev:v0.7.0
image: ghcr.io/dojoengine/dojo-dev:v0.7.1
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- uses: actions/download-artifact@v4
with:
name: katana-binary
path: /tmp/bins
- run: |
cargo build -r --bin katana
KATANA_RUNNER_BIN=$(pwd)/target/release/katana cargo llvm-cov nextest --no-report --all-features --workspace --exclude katana --build-jobs 20
chmod +x /tmp/bins/katana
KATANA_RUNNER_BIN=/tmp/bins/katana cargo llvm-cov nextest --no-report --all-features --workspace --exclude katana --build-jobs 20
cargo llvm-cov nextest --no-report -p katana
# TODO(kariy): uncomment this line when `sir` feature support Cairo 2.6.3
# cargo llvm-cov nextest --no-report -p katana --no-default-features --features sir
Expand All @@ -33,13 +52,14 @@ jobs:
ensure-wasm:
runs-on: ubuntu-latest
container:
image: ghcr.io/dojoengine/dojo-dev:v0.7.0
image: ghcr.io/dojoengine/dojo-dev:v0.7.1
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- run: cargo build -r --target wasm32-unknown-unknown -p torii-client

ensure-windows:
needs: ensure-docker
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -52,6 +72,28 @@ jobs:
with:
repo-token: ${{ secrets.github_token }}
- run: cargo build --target x86_64-pc-windows-msvc --bins

# This job is used to ensure the built katana image doesn't depend on any
# libraries that don't exist in the base docker image we use for distribution
ensure-docker:
needs: build
runs-on: ubuntu-latest
container:
image: debian:bookworm-slim
steps:
- uses: actions/download-artifact@v4
with:
name: katana-binary
- run: |
chmod +x ./katana
./katana &
KATANA_PID=$!
sleep 2
if ! kill -0 $KATANA_PID; then
echo "Katana exited with an error"
exit 1
fi
kill $KATANA_PID

cairofmt:
runs-on: ubuntu-latest
Expand All @@ -67,7 +109,7 @@ jobs:
dojo-core-test:
runs-on: ubuntu-latest
container:
image: ghcr.io/dojoengine/dojo-dev:v0.7.0
image: ghcr.io/dojoengine/dojo-dev:v0.7.1
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
Expand All @@ -76,7 +118,7 @@ jobs:
dojo-spawn-and-move-example-test:
runs-on: ubuntu-latest
container:
image: ghcr.io/dojoengine/dojo-dev:v0.7.0
image: ghcr.io/dojoengine/dojo-dev:v0.7.1
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
Expand All @@ -85,7 +127,7 @@ jobs:
dojo-world-bindings-check:
runs-on: ubuntu-latest
container:
image: ghcr.io/dojoengine/dojo-dev:v0.7.0
image: ghcr.io/dojoengine/dojo-dev:v0.7.1
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
Expand All @@ -94,7 +136,7 @@ jobs:
clippy:
runs-on: ubuntu-latest
container:
image: ghcr.io/dojoengine/dojo-dev:v0.7.0
image: ghcr.io/dojoengine/dojo-dev:v0.7.1
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
Expand All @@ -103,7 +145,7 @@ jobs:
fmt:
runs-on: ubuntu-latest
container:
image: ghcr.io/dojoengine/dojo-dev:v0.7.0
image: ghcr.io/dojoengine/dojo-dev:v0.7.1
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
Expand All @@ -112,7 +154,7 @@ jobs:
docs:
runs-on: ubuntu-latest
container:
image: ghcr.io/dojoengine/dojo-dev:v0.7.0
image: ghcr.io/dojoengine/dojo-dev:v0.7.1
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
contents: write
runs-on: ubuntu-latest
container:
image: ghcr.io/dojoengine/dojo-dev:v0.7.0
image: ghcr.io/dojoengine/dojo-dev:v0.7.1
env:
VERSION: ""
steps:
Expand Down
15 changes: 15 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,21 @@
"apply"
]
},
{
"name": "Sozo",
"type": "lldb",
"request": "launch",
"program": "${workspaceFolder}/target/debug/sozo",
"args": [
"--manifest-path",
"examples/spawn-and-move/Scarb.toml",
"events",
"--world",
"0x04c972a756d796d716f665a8079dbf9aff05bbba41a2b8194553073f31d7d393",
"--chunk-size",
"100"
]
},
{
"type": "lldb",
"request": "launch",
Expand Down
Loading
Loading