Skip to content

Commit

Permalink
Use cairo-toolchain-xtasks (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkaput authored Dec 13, 2024
1 parent eb6a1ae commit ab3fe5d
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 325 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cairo-update-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
run: |
CAIRO_REV=$(git ls-remote --refs "https://github.com/starkware-libs/cairo" main | awk '{print $1}')
echo "::notice::Checking Cairo commit: https://github.com/starkware-libs/cairo/commit/$CAIRO_REV"
cargo xtask set-cairo-version --rev "$CAIRO_REV"
cargo xtask upgrade cairo --rev "$CAIRO_REV"
- run: cargo test --profile=ci --no-fail-fast

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ We have a script that edits the `Cargo.toml` file to use a local checkout of the
To use this tool, run:

```shell
cargo xtask set-cairo-version --path ../path/to/cairo
cargo xtask upgrade cairo --path ../path/to/cairo
```

And then you can `cargo build` CairoLS with your custom Cairo compiler changes.
Expand Down
17 changes: 14 additions & 3 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 Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ testing = []
# all tools *always* depend on some crates.io versions of Cairo crates and Scarb uses
# [patch.crates.io] table to set final git revision for everything.
#
# To keep our Cargo.toml following this contract, always use `cargo xtask set-cairo-version`
# To keep our Cargo.toml following this contract, always use `cargo xtask upgrade`
# for manipulating these dependencies.
[dependencies]
anyhow = "1"
Expand Down
4 changes: 1 addition & 3 deletions xtask/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,5 @@ edition = "2021"

[dependencies]
anyhow = "1"
cairo-toolchain-xtasks = "1"
clap = { version = "4.5", features = ["derive"] }
semver = "1"
toml_edit = "0.22.22"
xshell = "0.2.7"
2 changes: 1 addition & 1 deletion xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ macro_rules! command {
}
}

command!(Command(set_cairo_version, set_version,));
command!(Command(sync_version, upgrade,));

#[derive(Parser)]
struct Args {
Expand Down
244 changes: 0 additions & 244 deletions xtask/src/set_cairo_version.rs

This file was deleted.

71 changes: 0 additions & 71 deletions xtask/src/set_version.rs

This file was deleted.

1 change: 1 addition & 0 deletions xtask/src/sync_version.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub use cairo_toolchain_xtasks::sync_version::{Args, main};
1 change: 1 addition & 0 deletions xtask/src/upgrade.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub use cairo_toolchain_xtasks::upgrade::{Args, main};

0 comments on commit ab3fe5d

Please sign in to comment.