Skip to content

Commit a9335cc

Browse files
authored
Merge branch 'main' into enable-messaging-build
2 parents 67bcc7f + ac35492 commit a9335cc

File tree

150 files changed

+2877
-2075
lines changed

Some content is hidden

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

150 files changed

+2877
-2075
lines changed

.devcontainer/Dockerfile

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,20 @@
1-
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/rust/.devcontainer/base.Dockerfile
1+
# See here for image contents: https://hub.docker.com/layers/library/rust/1.81.0-slim/images/sha256-ba4ee661bb466ab49f6ceb8c6d9e9f9784bba7c6e45225187cd3c7fb1fbc12ce
22

3-
# [Choice] Debian OS version (use bookworm on local arm64/Apple Silicon): buster, bullseye, bookworm
4-
5-
ARG VARIANT
6-
FROM mcr.microsoft.com/vscode/devcontainers/rust:${VARIANT}
7-
ARG VARIANT
3+
ARG RUST_VERSION=1.81.0
4+
FROM rust:${RUST_VERSION}-slim
5+
ARG RUST_VERSION
86

97
# Install additional packages
108
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
11-
&& apt-get -y install --no-install-recommends protobuf-compiler libprotobuf-dev libclang-dev libzstd-dev
12-
13-
RUN apt install -y gh libgmp3-dev software-properties-common
9+
&& apt-get -y install --no-install-recommends protobuf-compiler libprotobuf-dev libclang-dev libzstd-dev make pkg-config libssl-dev
1410

15-
# Install Cairo Native dependencies
16-
RUN curl -s https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc > /dev/null
17-
RUN echo "deb http://apt.llvm.org/${VARIANT}/ llvm-toolchain-${VARIANT}-17 main" | tee /etc/apt/sources.list.d/llvm.list && apt-get update
18-
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
11+
RUN apt-get install -y gh libgmp3-dev software-properties-common curl git
1912

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

23-
# To build Katana with 'native' feature, we need to set the following environment variables
24-
ENV MLIR_SYS_170_PREFIX=/usr/lib/llvm-17
25-
ENV LLVM_SYS_170_PREFIX=/usr/lib/llvm-17
26-
ENV TABLEGEN_170_PREFIX=/usr/lib/llvm-17
27-
2816
# To allow independent workflow of the container, the rust-toolchain is explicitely given.
29-
RUN echo "1.80.0" > rust_toolchain_version
17+
RUN echo ${RUST_VERSION} > rust_toolchain_version
3018
# Make sure to sync the nightly version with the scripts in ./scripts
3119
RUN echo "nightly-2024-08-28" > nightly_rust_toolchain_version
3220

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// https://github.com/microsoft/vscode-dev-containers/tree/v0.245.2/containers/rust
33
{
44
"name": "Rust",
5-
"image": "ghcr.io/dojoengine/dojo-dev:v1.0.12",
5+
"image": "ghcr.io/dojoengine/dojo-dev:b37b325",
66
"runArgs": [
77
"--cap-add=SYS_PTRACE",
88
"--security-opt",

.github/workflows/bench.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
bench-katana:
1515
runs-on: ubuntu-latest
1616
container:
17-
image: ghcr.io/dojoengine/dojo-dev:v1.0.12
17+
image: ghcr.io/dojoengine/dojo-dev:b37b325
1818
steps:
1919
- uses: actions/checkout@v3
2020
- run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
@@ -36,7 +36,7 @@ jobs:
3636
bench-sozo:
3737
runs-on: ubuntu-latest
3838
container:
39-
image: ghcr.io/dojoengine/dojo-dev:v1.0.12
39+
image: ghcr.io/dojoengine/dojo-dev:b37b325
4040
steps:
4141
- uses: actions/checkout@v3
4242
- run: git config --global --add safe.directory "$GITHUB_WORKSPACE"

.github/workflows/ci.yml

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@ on:
88

99
env:
1010
CARGO_TERM_COLOR: always
11-
RUST_VERSION: 1.80.0
11+
RUST_VERSION: 1.81.0
1212

1313
jobs:
1414
build:
1515
runs-on: ubuntu-latest-4-cores
1616
needs: [fmt, cairofmt]
17+
container:
18+
image: ghcr.io/dojoengine/dojo-dev:b37b325
1719
steps:
1820
- uses: actions/checkout@v3
1921
- uses: Swatinem/rust-cache@v2
@@ -32,7 +34,7 @@ jobs:
3234
needs: ensure-docker
3335
runs-on: ubuntu-latest-32-cores
3436
container:
35-
image: ghcr.io/dojoengine/dojo-dev:v1.0.12
37+
image: ghcr.io/dojoengine/dojo-dev:b37b325
3638
steps:
3739
- uses: actions/checkout@v3
3840
- uses: Swatinem/rust-cache@v2
@@ -58,7 +60,7 @@ jobs:
5860
runs-on: ubuntu-latest
5961
needs: [fmt, cairofmt]
6062
container:
61-
image: ghcr.io/dojoengine/dojo-dev:v1.0.12
63+
image: ghcr.io/dojoengine/dojo-dev:b37b325
6264
steps:
6365
- uses: actions/checkout@v3
6466
- uses: Swatinem/rust-cache@v2
@@ -92,7 +94,7 @@ jobs:
9294
needs: build
9395
runs-on: ubuntu-latest
9496
container:
95-
image: debian:bookworm-slim
97+
image: ubuntu:noble
9698
steps:
9799
- uses: actions/download-artifact@v4
98100
with:
@@ -114,7 +116,7 @@ jobs:
114116
- uses: actions/checkout@v3
115117
- uses: software-mansion/setup-scarb@v1
116118
with:
117-
scarb-version: "2.8.4"
119+
scarb-version: "2.9.2"
118120
- run: |
119121
scarb --manifest-path examples/spawn-and-move/Scarb.toml fmt --check
120122
scarb --manifest-path examples/simple/Scarb.toml fmt --check
@@ -124,9 +126,10 @@ jobs:
124126
dojo-core-test:
125127
needs: build
126128
runs-on: ubuntu-latest
127-
container:
128-
image: ghcr.io/dojoengine/dojo-dev:v1.0.12
129129
steps:
130+
- uses: software-mansion/setup-scarb@v1
131+
with:
132+
scarb-version: "2.9.2"
130133
- uses: actions/download-artifact@v4
131134
with:
132135
name: dojo-bins
@@ -137,27 +140,31 @@ jobs:
137140
/tmp/bins/sozo --manifest-path crates/dojo/core/Scarb.toml test
138141
/tmp/bins/sozo --manifest-path crates/dojo/core-cairo-test/Scarb.toml test
139142
140-
dojo-spawn-and-move-example-test:
143+
dojo-examples-test:
141144
needs: build
142145
runs-on: ubuntu-latest
143-
container:
144-
image: ghcr.io/dojoengine/dojo-dev:v1.0.12
145146
steps:
147+
- uses: software-mansion/setup-scarb@v1
148+
with:
149+
scarb-version: "2.9.2"
146150
- uses: actions/download-artifact@v4
147151
with:
148152
name: dojo-bins
149153
path: /tmp/bins
150154
- uses: actions/checkout@v3
151155
- run: |
152156
chmod +x /tmp/bins/sozo
157+
/tmp/bins/sozo --manifest-path examples/spawn-and-move/Scarb.toml build
158+
/tmp/bins/sozo --manifest-path examples/spawn-and-move/Scarb.toml inspect ns-Flatbow
159+
/tmp/bins/sozo --manifest-path examples/spawn-and-move/Scarb.toml inspect ns-RiverSkale
153160
/tmp/bins/sozo --manifest-path examples/spawn-and-move/Scarb.toml test
154161
/tmp/bins/sozo --manifest-path examples/simple/Scarb.toml test
155162
156163
clippy:
157164
runs-on: ubuntu-latest-4-cores
158165
needs: [fmt, cairofmt]
159166
container:
160-
image: ghcr.io/dojoengine/dojo-dev:v1.0.12
167+
image: ghcr.io/dojoengine/dojo-dev:b37b325
161168
steps:
162169
- uses: actions/checkout@v3
163170
- uses: Swatinem/rust-cache@v2
@@ -166,7 +173,7 @@ jobs:
166173
fmt:
167174
runs-on: ubuntu-latest
168175
container:
169-
image: ghcr.io/dojoengine/dojo-dev:v1.0.12
176+
image: ghcr.io/dojoengine/dojo-dev:b37b325
170177
steps:
171178
- uses: actions/checkout@v3
172179
- uses: Swatinem/rust-cache@v2
@@ -176,7 +183,7 @@ jobs:
176183
runs-on: ubuntu-latest
177184
needs: [fmt, cairofmt]
178185
container:
179-
image: ghcr.io/dojoengine/dojo-dev:v1.0.12
186+
image: ghcr.io/dojoengine/dojo-dev:b37b325
180187
steps:
181188
- uses: actions/checkout@v3
182189
- uses: Swatinem/rust-cache@v2

.github/workflows/devcontainer.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ jobs:
6464
- name: Build and push Docker image
6565
uses: docker/build-push-action@v2
6666
with:
67-
push: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event_name == 'release' && startsWith(github.ref, 'refs/tags/')) }}
67+
push: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event_name == 'release' && startsWith(github.ref, 'refs/tags/')) || github.event_name == 'workflow_dispatch' }}
6868
file: .devcontainer/Dockerfile
6969
tags: ghcr.io/${{ github.repository }}-dev:latest,ghcr.io/${{ github.repository }}-dev:${{ env.DOCKER_TAG }}
7070
build-args: |
71-
VARIANT=bookworm
71+
RUST_VERSION=1.81.0
7272
BUILD_TYPE=${{ github.event_name }}
7373
DOJO_VERSION=${{ github.event.release.tag_name }}
7474
platforms: linux/amd64,linux/arm64

.github/workflows/release-dispatch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
contents: write
1515
runs-on: ubuntu-latest
1616
container:
17-
image: ghcr.io/dojoengine/dojo-dev:v1.0.12
17+
image: ghcr.io/dojoengine/dojo-dev:b37b325
1818
env:
1919
VERSION: ""
2020
steps:

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
scarb 2.8.4
1+
scarb 2.9.2
22
starknet-foundry 0.30.0

0 commit comments

Comments
 (0)