Skip to content

Commit

Permalink
fix(ci): ensure katana runs in debian:bookworm-slim (starkware-libs#2073
Browse files Browse the repository at this point in the history
)

* Ensure katana runs in debian:bookworm-slim

* chore: switch to cartridge fork and adjust CI to 4 core to build Katana

* chore: add old prover-sdk version to check CI fail

* fix katana bin permissions

* chore: add ensure-docker as requirement for big jobs

* chore: point to http-prover using rustls-tls

* dbg

* wip

* chore: bump to artifacts v4

* fix: typo

* wip

* fix: don't use path explicitely

* wip

* fix: fix artifacts managment

* add ls

* fix: use other path with checkout

* fix: remove prints

---------

Co-authored-by: glihm <[email protected]>
  • Loading branch information
tarrencev and glihm authored Jun 17, 2024
1 parent 70ad728 commit 71e9451
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 51 deletions.
46 changes: 44 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,35 @@ env:
RUST_VERSION: 1.76.0

jobs:
build:
runs-on: ubuntu-latest-4-cores
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- run: |
cargo build -r --bin katana
mkdir -p bins
cp ./target/release/katana bins/
- uses: actions/upload-artifact@v4
with:
name: katana-binary
path: bins

test:
needs: ensure-docker
runs-on: ubuntu-latest-32-cores
container:
image: ghcr.io/dojoengine/dojo-dev:v0.7.0
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- uses: actions/download-artifact@v4
with:
name: katana-binary
path: /tmp/bins
- run: |
cargo build -r --bin katana
KATANA_RUNNER_BIN=$(pwd)/target/release/katana cargo llvm-cov nextest --no-report --all-features --workspace --exclude katana --build-jobs 20
chmod +x /tmp/bins/katana
KATANA_RUNNER_BIN=/tmp/bins/katana cargo llvm-cov nextest --no-report --all-features --workspace --exclude katana --build-jobs 20
cargo llvm-cov nextest --no-report -p katana
# TODO(kariy): uncomment this line when `sir` feature support Cairo 2.6.3
# cargo llvm-cov nextest --no-report -p katana --no-default-features --features sir
Expand All @@ -40,6 +59,7 @@ jobs:
- run: cargo build -r --target wasm32-unknown-unknown -p torii-client

ensure-windows:
needs: ensure-docker
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -52,6 +72,28 @@ jobs:
with:
repo-token: ${{ secrets.github_token }}
- run: cargo build --target x86_64-pc-windows-msvc --bins

# This job is used to ensure the built katana image doesn't depend on any
# libraries that don't exist in the base docker image we use for distribution
ensure-docker:
needs: build
runs-on: ubuntu-latest
container:
image: debian:bookworm-slim
steps:
- uses: actions/download-artifact@v4
with:
name: katana-binary
- run: |
chmod +x ./katana
./katana &
KATANA_PID=$!
sleep 2
if ! kill -0 $KATANA_PID; then
echo "Katana exited with an error"
exit 1
fi
kill $KATANA_PID
cairofmt:
runs-on: ubuntu-latest
Expand Down
54 changes: 6 additions & 48 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/saya/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ cairo-felt = "0.9.1"
num-bigint = "0.4.4"
num-traits = "0.2.18"

prover-sdk = { git = "https://github.com/neotheprogramist/http-prover", rev = "05aa9dbb7fdd5618693cead978d4ab0eebbf8f80" }
prover-sdk = { git = "https://github.com/cartridge-gg/http-prover", rev = "7d00b05" }

0 comments on commit 71e9451

Please sign in to comment.