Update ui deps sync #417
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Validate Cairo Alpha Test Project | |
| on: | |
| pull_request: | |
| paths: | |
| - 'packages/core/cairo_alpha/**' | |
| push: | |
| paths: | |
| - 'packages/core/cairo_alpha/**' | |
| jobs: | |
| validate-cairo-alpha: | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: validate-cairo-alpha-${{ github.ref }} | |
| cancel-in-progress: true | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Setup node | |
| uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0 | |
| with: | |
| node-version: 20.x | |
| cache: 'yarn' | |
| - name: Install dependencies | |
| working-directory: packages/core/cairo_alpha | |
| run: yarn install --network-concurrency 1 | |
| - name: Extract Scarb version | |
| working-directory: packages/core/cairo_alpha/test_project | |
| run: | | |
| SCARB_VERSION=$(grep 'scarb-version = ' Scarb.toml | sed 's/scarb-version = "\(.*\)"/\1/') | |
| echo "SCARB_VERSION=$SCARB_VERSION" >> "$GITHUB_ENV" | |
| - name: Setup Scarb | |
| uses: software-mansion/setup-scarb@95ba816a4383938e2338cb793773d4670011b65f # v1.6.0 | |
| with: | |
| scarb-version: ${{ env.SCARB_VERSION }} | |
| - name: Generate and compile test project | |
| working-directory: packages/core/cairo_alpha/test_project | |
| run: | | |
| # Exit immediately if a command exits with a non-zero status | |
| set -e | |
| declare -a all_kinds=("ERC20" "ERC721" "ERC1155" "Account" "Multisig" "Governor" "Vesting" "Custom") | |
| declare -a all_macros_options=("none" "with_components") | |
| declare -a all_access_options=("disabled" "ownable" "roles" "roles-dar-default" "roles-dar-custom") | |
| declare -a all_royalty_options=("disabled" "enabled-default" "enabled-custom") | |
| for macros_option in "${all_macros_options[@]}"; do | |
| for kind in "${all_kinds[@]}"; do | |
| if [[ "$kind" == "ERC721" || "$kind" == "ERC1155" ]]; then | |
| for access_option in "${all_access_options[@]}"; do | |
| for royalty_option in "${all_royalty_options[@]}"; do | |
| proj_name="'$kind, macros: $macros_option, access: $access_option, royalty: $royalty_option' test project" | |
| echo "Generating $proj_name..." | |
| yarn run update_scarb_project --kind=$kind --macros=$macros_option --access=$access_option --royalty=$royalty_option | |
| echo "Compiling $proj_name..." | |
| scarb build | |
| echo "✅ Compiled $proj_name!" | |
| echo "---------------------------------" | |
| done | |
| done | |
| elif [[ "$kind" == "ERC20" || "$kind" == "Custom" ]]; then | |
| for access_option in "${all_access_options[@]}"; do | |
| proj_name="'$kind, access: $access_option' test project" | |
| echo "Generating $proj_name..." | |
| yarn run update_scarb_project --kind=$kind --access=$access_option | |
| echo "Compiling $proj_name..." | |
| scarb build | |
| echo "✅ Compiled $proj_name!" | |
| echo "---------------------------------" | |
| done | |
| else | |
| proj_name="'$kind' test project" | |
| echo "Generating $proj_name..." | |
| yarn run update_scarb_project --kind=$kind | |
| echo "Compiling $proj_name..." | |
| scarb build | |
| echo "✅ Compiled $proj_name!" | |
| echo "---------------------------------" | |
| fi | |
| done | |
| done |