Skip to content

Commit

Permalink
Update ci-cd.yml final
Browse files Browse the repository at this point in the history
  • Loading branch information
3th-Enjay authored Feb 28, 2025
1 parent 9517dae commit 73e4fdd
Showing 1 changed file with 4 additions and 26 deletions.
30 changes: 4 additions & 26 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
~/.cargo/registry
~/.cargo/git
./contracts/target/
key: ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-rust-${{ hashFiles('contracts/Cargo.lock') }}

- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
Expand All @@ -47,44 +47,22 @@ jobs:
uses: actions/cache@v4
with:
path: ~/.cargo/bin
key: ${{ runner.os }}-forge-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-forge-${{ hashFiles('contracts/Cargo.lock') }}

- name: Install forge
run: |
if ! command -v forge &> /dev/null; then
# Clone the repository
git clone https://github.com/foundry-rs/starknet-foundry.git
cd starknet-foundry
# Build the project
cargo build --release
# Check the build output
ls -l target/release
# Install the binary (replace 'forge' with the correct binary name if needed)
sudo cp target/release/snforge /usr/local/bin/forge
# Clean up
cd ..
rm -rf starknet-foundry
fi
echo "Installed forge version: $(forge --version)"
- name: Install Universal Sierra Compiler
run: |
# Install Cairo (includes the Universal Sierra Compiler)
curl -L https://github.com/franalgaba/cairo-installer/raw/main/bin/cairo-installer | bash
echo "$HOME/.cairo/target/release" >> $GITHUB_PATH
- name: Verify Universal Sierra Compiler
run: |
# Check if the Universal Sierra Compiler is installed
if ! command -v universal-sierra-compiler &> /dev/null; then
echo "Universal Sierra Compiler is not installed or not in PATH"
exit 1
fi
echo "Universal Sierra Compiler is installed: $(universal-sierra-compiler --version)"
- name: Install Universal Sierra Compiler (USC)
run: scarb install --global universal-sierra-compiler

- name: Install dependencies
run: scarb clean && scarb fetch
Expand Down

0 comments on commit 73e4fdd

Please sign in to comment.