Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up CI #9

Closed
oskarth opened this issue Oct 23, 2023 · 3 comments · Fixed by #190
Closed

Speed up CI #9

oskarth opened this issue Oct 23, 2023 · 3 comments · Fixed by #190
Labels

Comments

@oskarth
Copy link
Collaborator

oskarth commented Oct 23, 2023

Problem

Right now it takes around 40-50m: https://github.com/oskarth/mopro/actions

Very roughly:

  • Install 5m
  • Prepare 5m
  • Build 25m
  • FFI Tests 5m

We want to get this down to <10m before we can use CI to block PRs from merging at this stage.

Acceptance criteria

CI runs faster, and ideally in <10m

@oskarth
Copy link
Collaborator Author

oskarth commented Dec 7, 2023

Circom binary cache sketch:

jobs:
  # ... other jobs ...

  setup:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [macos-latest, ubuntu-latest]
    steps:
      - uses: actions/checkout@v3

      - name: Cache circom
        uses: actions/cache@v2
        with:
          path: circom-install  # Directory where we will install circom
          key: circom-binary-${{ hashFiles('**/Cargo.lock') }}  # Assuming Cargo.lock file is in the root of your repository

      - name: Install circom
        if: steps.cache-circom.outputs.cache-hit != 'true'
        run: |
          git clone https://github.com/iden3/circom.git
          cd circom
          cargo build --release
          mkdir -p ${{ github.workspace }}/circom-install
          cargo install --path circom --root ${{ github.workspace }}/circom-install

      - name: Prepare CI
        run: ./scripts/prepare_ci.sh

  # ... rest of your jobs ...

@oskarth
Copy link
Collaborator Author

oskarth commented Feb 24, 2024

With workspaces #80 we can probably reduce core/ffi build time so we don't build it twice. This is because we are sharing the target directory.

@oskarth
Copy link
Collaborator Author

oskarth commented Feb 28, 2024

With recent improvements #76 and #82 CI is much faster.

Currently it takes 17m total (test-ios) / 20m (test-android) total, which is much better! https://github.com/oskarth/mopro/actions/runs/8058892793/job/22012399580

Probably some more things can be improved when preparing/building to get total down to ~10m, but it OK now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant