diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 4cbbfac4ea..39ed05f851 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -39,7 +39,6 @@ RUN if [ "$TARGETPLATFORM" = "linux/arm64" ] ; 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 -C /usr/local/bin && rm hurl.tar.gz && \ rustup component add llvm-tools-preview --toolchain 1.70.0-x86_64-unknown-linux-gnu && \ - rustup toolchain install nightly && \ rustup target add x86_64-fortanix-unknown-sgx --toolchain nightly; \ fi diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0a670f3a19..b4d27a45fc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,17 +29,12 @@ jobs: ensure-wasm: runs-on: ubuntu-latest + container: + image: ghcr.io/dojoengine/dojo-dev:f6a4b8a steps: - uses: actions/checkout@v3 - - uses: dtolnay/rust-toolchain@master - with: - toolchain: ${{ env.RUST_VERSION }} - targets: wasm32-unknown-unknown - uses: Swatinem/rust-cache@v2 - - uses: arduino/setup-protoc@v2 - - name: "Ensure `torii-client` crate is WASM-able" - run: | - cargo build -r --target wasm32-unknown-unknown -p torii-client + - run: cargo build -r --target wasm32-unknown-unknown -p torii-client ensure-windows: runs-on: windows-latest @@ -51,9 +46,7 @@ jobs: target: x86_64-pc-windows-msvc - uses: Swatinem/rust-cache@v2 - uses: arduino/setup-protoc@v2 - - name: "Ensure buildable on windows" - run: | - cargo build --target x86_64-pc-windows-msvc --bins + - run: cargo build --target x86_64-pc-windows-msvc --bins # cairofmt: # runs-on: ubuntu-latest @@ -69,92 +62,66 @@ jobs: dojo-core-test: runs-on: ubuntu-latest + container: + image: ghcr.io/dojoengine/dojo-dev:f6a4b8a steps: - uses: actions/checkout@v3 - - uses: dtolnay/rust-toolchain@master - with: - toolchain: ${{ env.RUST_VERSION }} - uses: Swatinem/rust-cache@v2 - - uses: arduino/setup-protoc@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:f6a4b8a steps: - uses: actions/checkout@v3 - - uses: dtolnay/rust-toolchain@master - with: - toolchain: ${{ env.RUST_VERSION }} - uses: Swatinem/rust-cache@v2 - - uses: arduino/setup-protoc@v2 - run: cargo run --bin sozo -- --manifest-path examples/spawn-and-move/Scarb.toml test clippy: runs-on: ubuntu-latest + container: + image: ghcr.io/dojoengine/dojo-dev:f6a4b8a steps: - uses: actions/checkout@v3 with: fetch-depth: 0 - - uses: dtolnay/rust-toolchain@master - with: - toolchain: ${{ env.RUST_VERSION }} - targets: wasm32-unknown-unknown - components: clippy - uses: Swatinem/rust-cache@v2 - - uses: arduino/setup-protoc@v1 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - run: scripts/clippy.sh fmt: runs-on: ubuntu-latest + container: + image: ghcr.io/dojoengine/dojo-dev:f6a4b8a steps: - uses: actions/checkout@v3 - - uses: dtolnay/rust-toolchain@master - with: - toolchain: nightly - components: rustfmt - uses: Swatinem/rust-cache@v2 - - uses: arduino/setup-protoc@v1 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - run: scripts/rust_fmt.sh --check docs: runs-on: ubuntu-latest + container: + image: ghcr.io/dojoengine/dojo-dev:f6a4b8a steps: - uses: actions/checkout@v3 with: fetch-depth: 0 - - uses: dtolnay/rust-toolchain@master - with: - toolchain: ${{ env.RUST_VERSION }} - uses: Swatinem/rust-cache@v2 - - uses: arduino/setup-protoc@v1 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - run: > scripts/docs.sh test-hurl: runs-on: ubuntu-latest - permissions: - pull-requests: write - steps: - - name: Checkout code - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ env.RUST_VERSION }} - uses: Swatinem/rust-cache@v2 - - name: Install Hurl - run: | + - run: | curl --location --remote-name https://github.com/Orange-OpenSource/hurl/releases/download/3.0.0/hurl_3.0.0_amd64.deb sudo apt update && sudo apt install ./hurl_3.0.0_amd64.deb - - name: Build and start Katana node - run: | + - run: | cargo build --bin katana nohup target/debug/katana --accounts 2 --disable-fee & - - name: Execute Hurl Scripts - run: hurl --test examples/rpc/**/*.hurl + - run: hurl --test examples/rpc/**/*.hurl