Skip to content

Commit

Permalink
Update ci to use devcontainer
Browse files Browse the repository at this point in the history
  • Loading branch information
tarrencev committed Dec 18, 2023
1 parent e1ba4a6 commit 44e3ee0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 52 deletions.
1 change: 0 additions & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
69 changes: 18 additions & 51 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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

0 comments on commit 44e3ee0

Please sign in to comment.