Skip to content

Commit

Permalink
Merge branch 'dojoengine:main' into 1466_fix_non_state
Browse files Browse the repository at this point in the history
  • Loading branch information
fishseabowl authored Jun 20, 2024
2 parents ad60b12 + 06d5803 commit 1c5a537
Show file tree
Hide file tree
Showing 247 changed files with 26,043 additions and 3,465 deletions.
3 changes: 3 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ RUN curl -s https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gp
RUN echo "deb http://apt.llvm.org/${VARIANT}/ llvm-toolchain-${VARIANT}-17 main" | tee /etc/apt/sources.list.d/llvm.list && apt-get update
RUN apt-get -y install -t llvm-toolchain-${VARIANT}-17 llvm-17 llvm-17-dev llvm-17-runtime clang-17 clang-tools-17 lld-17 libpolly-17-dev libmlir-17-dev mlir-17-tools

RUN curl -L https://foundry.paradigm.xyz/ | bash && . /root/.bashrc && foundryup
ENV PATH="${PATH}:/root/.foundry/bin"

# To build Katana with 'native' feature, we need to set the following environment variables
ENV MLIR_SYS_170_PREFIX=/usr/lib/llvm-17
ENV LLVM_SYS_170_PREFIX=/usr/lib/llvm-17
Expand Down
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-alpha.4",
"image": "ghcr.io/dojoengine/dojo-dev:v0.7.2",
"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-alpha.4
image: ghcr.io/dojoengine/dojo-dev:v0.7.2
steps:
- uses: actions/checkout@v3
- run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
Expand Down
64 changes: 53 additions & 11 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:
runs-on: ubuntu-latest-16-cores
needs: ensure-docker
runs-on: ubuntu-latest-32-cores
container:
image: ghcr.io/dojoengine/dojo-dev:v0.7.0-alpha.4
image: ghcr.io/dojoengine/dojo-dev:v0.7.2
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 10
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-alpha.4
image: ghcr.io/dojoengine/dojo-dev:v0.7.2
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-alpha.4
image: ghcr.io/dojoengine/dojo-dev:v0.7.2
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-alpha.4
image: ghcr.io/dojoengine/dojo-dev:v0.7.2
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-alpha.4
image: ghcr.io/dojoengine/dojo-dev:v0.7.2
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-alpha.4
image: ghcr.io/dojoengine/dojo-dev:v0.7.2
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-alpha.4
image: ghcr.io/dojoengine/dojo-dev:v0.7.2
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-alpha.4
image: ghcr.io/dojoengine/dojo-dev:v0.7.2
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-alpha.4
image: ghcr.io/dojoengine/dojo-dev:v0.7.2
env:
VERSION: ""
steps:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
platform: linux
target: x86_64-unknown-linux-gnu
arch: amd64
- os: ubuntu-latest-8-cores
- os: ubuntu-latest-8-cores-arm64
platform: linux
target: aarch64-unknown-linux-gnu
arch: arm64
Expand Down Expand Up @@ -93,7 +93,6 @@ jobs:
run: |
sudo apt-get update -y
sudo apt-get install -y gcc-aarch64-linux-gnu libssl-dev
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
# We build jemalloc with 64KB pagesize so that it works for all linux/arm64 pagesize variants
# See: https://github.com/jemalloc/jemalloc/issues/467
echo "JEMALLOC_SYS_WITH_LG_PAGE=16" >> $GITHUB_ENV
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ crates/benches/bench_results.txt
**/generated
.vscode
bindings
justfile
Loading

0 comments on commit 1c5a537

Please sign in to comment.