From 52e9003a9feb2ce51004a671bf40cebb199ff2bd Mon Sep 17 00:00:00 2001 From: "Omar U. Espejel" Date: Wed, 22 Nov 2023 03:51:00 +0300 Subject: [PATCH] fix: update compilation workflow --- .github/workflows/ci.yml | 23 ---------------- .../workflows/scarb-cairo-build-format.yml | 26 +++++++++++++++++++ 2 files changed, 26 insertions(+), 23 deletions(-) delete mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/scarb-cairo-build-format.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index edc1c65..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Run StarkNet compilation -on: - push: - branches: - - main - pull_request: - branches: - - main - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: '3.9' - - run: | - pip install cairo-lang asynctest pytest && \ - for cairo_file in $(find contracts/ -type f -name "*.cairo"); do - starknet-compile $cairo_file - done && \ - pytest -W ignore::DeprecationWarning diff --git a/.github/workflows/scarb-cairo-build-format.yml b/.github/workflows/scarb-cairo-build-format.yml new file mode 100644 index 0000000..958d7c0 --- /dev/null +++ b/.github/workflows/scarb-cairo-build-format.yml @@ -0,0 +1,26 @@ +name: Scarb Cairo Build and Format + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + # Install Scarb + - name: Install Scarb + run: | + curl --proto '=https' --tlsv1.2 -sSf https://docs.swmansion.com/scarb/install.sh | sh + + # Build and format all .cairo files + - name: Build and Format Cairo Files + run: | + scarb build + scarb fmt