Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into long-poll-txns
Browse files Browse the repository at this point in the history
  • Loading branch information
Larkooo committed Apr 29, 2024
2 parents 47c8f10 + af9cdf6 commit 8c1326f
Show file tree
Hide file tree
Showing 355 changed files with 22,220 additions and 6,031 deletions.
5 changes: 3 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ENV LLVM_SYS_170_PREFIX=/usr/lib/llvm-17
ENV TABLEGEN_170_PREFIX=/usr/lib/llvm-17

# To allow independent workflow of the container, the rust-toolchain is explicitely given.
RUN echo "1.74.0" > rust_toolchain_version
RUN echo "1.76.0" > rust_toolchain_version

# Install cargo-binstall
RUN curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
Expand Down Expand Up @@ -60,10 +60,11 @@ RUN if [ "$TARGETPLATFORM" = "linux/arm64" ] ; then \
rustup target add x86_64-fortanix-unknown-sgx --toolchain nightly; \
fi

ARG DOJO_VERSION=stable
RUN curl -L https://install.dojoengine.org | bash
RUN curl --proto '=https' --tlsv1.2 -sSf https://docs.swmansion.com/scarb/install.sh | bash
ENV PATH=${PATH}:/root/.dojo/bin
RUN dojoup
RUN dojoup -v $DOJO_VERSION

RUN chown -R root:root /usr/local/cargo
RUN chmod -R 700 /usr/local/cargo
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:5d61184",
"image": "ghcr.io/dojoengine/dojo-dev:3153a80",
"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:5d61184
image: ghcr.io/dojoengine/dojo-dev:3153a80
steps:
- uses: actions/checkout@v3
- run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,30 @@ on:

env:
CARGO_TERM_COLOR: always
RUST_VERSION: 1.74.0
RUST_VERSION: 1.76.0

jobs:
test:
runs-on: ubuntu-latest-16-cores
container:
image: nondeterministickari/dojo-dev:cc6554da
image: ghcr.io/dojoengine/dojo-dev:3153a80
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- run: |
- run: |
cargo llvm-cov nextest --no-report --all-features --workspace --exclude katana --build-jobs 10
cargo llvm-cov nextest --no-report -p katana
cargo llvm-cov nextest --no-report -p katana --no-default-features --features sir
cargo llvm-cov report --lcov --output-path lcov.info
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info

ensure-wasm:
runs-on: ubuntu-latest
container:
image: nondeterministickari/dojo-dev:cc6554da
image: ghcr.io/dojoengine/dojo-dev:3153a80
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
Expand All @@ -43,12 +43,12 @@ jobs:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUST_VERSION }}
toolchain: ${{ env.rust_version }}
target: x86_64-pc-windows-msvc
- uses: Swatinem/rust-cache@v2
- uses: swatinem/rust-cache@v2
- uses: arduino/setup-protoc@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
repo-token: ${{ secrets.github_token }}
- run: cargo build --target x86_64-pc-windows-msvc --bins

# cairofmt:
Expand All @@ -66,7 +66,7 @@ jobs:
dojo-core-test:
runs-on: ubuntu-latest
container:
image: nondeterministickari/dojo-dev:cc6554da
image: ghcr.io/dojoengine/dojo-dev:3153a80
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
Expand All @@ -75,7 +75,7 @@ jobs:
dojo-spawn-and-move-example-test:
runs-on: ubuntu-latest
container:
image: nondeterministickari/dojo-dev:cc6554da
image: ghcr.io/dojoengine/dojo-dev:3153a80
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
Expand All @@ -84,7 +84,7 @@ jobs:
dojo-world-bindings-check:
runs-on: ubuntu-latest
container:
image: nondeterministickari/dojo-dev:cc6554da
image: ghcr.io/dojoengine/dojo-dev:3153a80
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
Expand All @@ -93,7 +93,7 @@ jobs:
clippy:
runs-on: ubuntu-latest
container:
image: nondeterministickari/dojo-dev:cc6554da
image: ghcr.io/dojoengine/dojo-dev:3153a80
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
Expand All @@ -102,7 +102,7 @@ jobs:
fmt:
runs-on: ubuntu-latest
container:
image: nondeterministickari/dojo-dev:cc6554da
image: ghcr.io/dojoengine/dojo-dev:3153a80
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
Expand All @@ -111,7 +111,7 @@ jobs:
docs:
runs-on: ubuntu-latest
container:
image: nondeterministickari/dojo-dev:cc6554da
image: ghcr.io/dojoengine/dojo-dev:3153a80
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
Expand Down
18 changes: 16 additions & 2 deletions .github/workflows/devcontainer.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
name: devcontainer

on:
workflow_dispatch:
inputs:
docker_tag:
description: Descriptive name of the devcontainer for the Docker tag
required: true
type: string
push:
paths:
- ".devcontainer/**"
- ".github/workflows/devcontainer.yml"
- "!.devcontainer/devcontainer.json"
release:
types: [created]

jobs:
build-and-push:
Expand Down Expand Up @@ -43,6 +51,11 @@ jobs:
SHORT_SHA=$(echo "${{ github.sha }}" | cut -c 1-7)
echo "DOCKER_TAG=$SHORT_SHA" >> $GITHUB_ENV
- name: Set Docker tag for workflow_dispatch event
if: github.event_name == 'workflow_dispatch'
run: |
echo "DOCKER_TAG=${{ inputs.docker_tag }}" >> $GITHUB_ENV
- name: Set outputs
id: release_info
run: |
Expand All @@ -56,6 +69,7 @@ jobs:
tags: ghcr.io/${{ github.repository }}-dev:latest,ghcr.io/${{ github.repository }}-dev:${{ env.DOCKER_TAG }}
build-args: |
VARIANT=bookworm
DOJO_VERSION=${{ github.event_name == 'release' && github.event.release.tag_name || 'stable' }}
platforms: linux/amd64,linux/arm64
cache-from: type=registry,ref=ghcr.io/${{ github.repository }}-dev:latest

Expand Down Expand Up @@ -85,8 +99,8 @@ jobs:
with:
# We have to use a PAT in order to trigger ci
token: ${{ secrets.CREATE_PR_TOKEN }}
title: "Update devcontainer image hash: ${{ needs.build-and-push.outputs.tag_name }}"
commit-message: "Update devcontainer image hash: ${{ needs.build-and-push.outputs.tag_name }}"
title: "Update devcontainer image: ${{ needs.build-and-push.outputs.tag_name }}"
commit-message: "Update devcontainer image: ${{ needs.build-and-push.outputs.tag_name }}"
branch: bump-devcontainer
base: main
delete-branch: true
9 changes: 7 additions & 2 deletions .github/workflows/release-dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,17 @@ jobs:
contents: write
runs-on: ubuntu-latest
container:
image: ghcr.io/dojoengine/dojo-dev:5d61184
image: ghcr.io/dojoengine/dojo-dev:3153a80
env:
VERSION: ""
steps:
# Workaround described here: https://github.com/actions/checkout/issues/760
- uses: actions/checkout@v3
- run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- run: cargo release version ${{ inputs.version }} --execute --no-confirm && cargo release replace --execute --no-confirm
- run: |
VERSION=${{ inputs.version }}
VERSION=${VERSION#v}
cargo release version $VERSION --execute --no-confirm && cargo release replace --execute --no-confirm
- id: version_info
run: |
cargo install cargo-get
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

env:
CARGO_TERM_COLOR: always
RUST_VERSION: 1.74.0
RUST_VERSION: 1.76.0
REGISTRY_IMAGE: ghcr.io/${{ github.repository }}

jobs:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ output.txt
crates/benches/bench_results.txt
**/generated
.vscode
bindings
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "crates/katana/primitives/contracts/messaging/solidity/lib/forge-std"]
path = crates/katana/primitives/contracts/messaging/solidity/lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "crates/katana/contracts/messaging/solidity/lib/forge-std"]
path = crates/katana/contracts/messaging/solidity/lib/forge-std
url = https://github.com/foundry-rs/forge-std
Loading

0 comments on commit 8c1326f

Please sign in to comment.