Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Conditional CI execution for Stout #200

Closed
valentinfernandez1 opened this issue May 29, 2023 · 2 comments
Closed

Conditional CI execution for Stout #200

valentinfernandez1 opened this issue May 29, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@valentinfernandez1
Copy link
Contributor

valentinfernandez1 commented May 29, 2023

I've been noticing that building both trappist and stout in the CI can take a lot of time and a most of the currently ongoing changes don't really involve Stout. Would it make sense to execute this build only if the changes in a PR includes files that involve this runtime?

This paths would be ./node, ./primitives/xcm, and ./runtime/stout.

There seems to be a tool that allows the CI to filter the changes to conditionally run commands. The solution would look something like this:

jobs:
  tests:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - uses: dorny/paths-filter@v2
      id: filter
      with:
        filters: |
          node:
            - 'node/**'
          stout:
            - 'runtime/stout/**'
          primitives:
            - 'primitives/**'
            - 
    # run if changes involves stout
    - name: e2e tests
      if: steps.filter.outputs.node == 'true' || steps.filter.outputs.stout == 'true' || steps.filter.outputs.primitives == 'true'
      run: |
          SKIP_WASM_BUILD=1 cargo check --release --locked --no-default-features --features with-stout-runtime

@kalaninja, @stiiifff, @hbulgarini

@valentinfernandez1 valentinfernandez1 added the enhancement New feature or request label May 29, 2023
@kalaninja
Copy link
Contributor

I am currently looking at the latest build and stout adds just 5 seconds to the total time. I also think that the situation might improve after #177 is done.

@hbulgarini
Copy link
Contributor

I also think that the situation might improve after #177 is done.

Indeed. The node refactor will get rid of all those builds duplication and strange compilation behaviors. The PR will arrive soon ...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants