Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into solis
Browse files Browse the repository at this point in the history
  • Loading branch information
remiroyc committed Jan 23, 2024
2 parents 70747dc + 3620d72 commit 17616b9
Show file tree
Hide file tree
Showing 204 changed files with 5,840 additions and 2,470 deletions.
11 changes: 6 additions & 5 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \

RUN apt install -y gh libgmp3-dev

COPY rust-toolchain.toml .
# To allow independent workflow of the container, the rust-toolchain is explicitely given.
RUN echo "1.74.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

RUN rustup toolchain install $(cat rust-toolchain.toml | grep channel | cut -d\" -f2) && \
rustup default $(cat rust-toolchain.toml | grep channel | cut -d\" -f2) && \
RUN rustup toolchain install $(cat rust_toolchain_version) && \
rustup default $(cat rust_toolchain_version) && \
rustup component add clippy && \
rustup component add rustfmt

Expand All @@ -37,14 +38,14 @@ RUN if [ "$TARGETPLATFORM" = "linux/arm64" ] ; then \
mv hurl-4.1.0-aarch64-unknown-linux-gnu/hurl /usr/local/bin/ && \
rm -r hurl-4.1.0-aarch64-unknown-linux-gnu && \
rm hurl.tar.gz && \
rustup component add llvm-tools-preview --toolchain 1.70.0-aarch64-unknown-linux-gnu; \
rustup component add llvm-tools-preview --toolchain $(cat rust_toolchain_version)-aarch64-unknown-linux-gnu; \
elif [ "$TARGETPLATFORM" = "linux/amd64" ] ; then \
curl -L https://github.com/Orange-OpenSource/hurl/releases/download/4.1.0/hurl-4.1.0-x86_64-unknown-linux-gnu.tar.gz -o hurl.tar.gz && \
tar -xzf hurl.tar.gz && \
mv hurl-4.1.0-x86_64-unknown-linux-gnu/hurl /usr/local/bin/ && \
rm -r hurl-4.1.0-x86_64-unknown-linux-gnu && \
rm hurl.tar.gz && \
rustup component add llvm-tools-preview --toolchain 1.70.0-x86_64-unknown-linux-gnu && \
rustup component add llvm-tools-preview --toolchain $(cat rust_toolchain_version)-x86_64-unknown-linux-gnu && \
rustup target add x86_64-fortanix-unknown-sgx --toolchain nightly; \
fi

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:448ffda",
"image": "ghcr.io/dojoengine/dojo-dev:136a67a",
"runArgs": [
"--cap-add=SYS_PTRACE",
"--security-opt",
Expand Down
47 changes: 42 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ on:

env:
CARGO_TERM_COLOR: always
RUST_VERSION: 1.70.0
RUST_VERSION: 1.74.0

jobs:
test:
runs-on: ubuntu-latest-16-cores
container:
image: ghcr.io/dojoengine/dojo-dev:448ffda
image: ghcr.io/dojoengine/dojo-dev:136a67a
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
Expand All @@ -28,7 +28,7 @@ jobs:
ensure-wasm:
runs-on: ubuntu-latest
container:
image: ghcr.io/dojoengine/dojo-dev:448ffda
image: ghcr.io/dojoengine/dojo-dev:136a67a
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
Expand Down Expand Up @@ -58,10 +58,37 @@ jobs:
# - run: cargo install cairo-lang-formatter
# - run: scripts/cairo_fmt.sh --check

dojo-core-test:
runs-on: ubuntu-latest
container:
image: ghcr.io/dojoengine/dojo-dev:136a67a
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- run: cargo run --bin sozo -- --manifest-path crates/dojo-core/Scarb.toml test

dojo-spawn-and-move-example-test:
runs-on: ubuntu-latest
container:
image: ghcr.io/dojoengine/dojo-dev:136a67a
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- run: cargo run --bin sozo -- --manifest-path examples/spawn-and-move/Scarb.toml test

dojo-world-bindings-check:
runs-on: ubuntu-latest
container:
image: ghcr.io/dojoengine/dojo-dev:136a67a
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- run: cargo run --bin dojo-world-abigen -- --check

clippy:
runs-on: ubuntu-latest
container:
image: ghcr.io/dojoengine/dojo-dev:448ffda
image: ghcr.io/dojoengine/dojo-dev:136a67a
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
Expand All @@ -70,12 +97,22 @@ jobs:
fmt:
runs-on: ubuntu-latest
container:
image: ghcr.io/dojoengine/dojo-dev:448ffda
image: ghcr.io/dojoengine/dojo-dev:136a67a
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- run: scripts/rust_fmt.sh --check

docs:
runs-on: ubuntu-latest
container:
image: ghcr.io/dojoengine/dojo-dev:136a67a
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- run: >
scripts/docs.sh
test-hurl:
runs-on: ubuntu-latest
steps:
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:448ffda
image: ghcr.io/dojoengine/dojo-dev:136a67a
steps:
# Workaround described here: https://github.com/actions/checkout/issues/760
- uses: actions/checkout@v3
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.70.0
RUST_VERSION: 1.74.0
REGISTRY_IMAGE: ghcr.io/${{ github.repository }}

jobs:
Expand Down
Loading

0 comments on commit 17616b9

Please sign in to comment.