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

Update workflow runs in general to specific order #665

Open
Chralt98 opened this issue Jun 8, 2022 · 1 comment
Open

Update workflow runs in general to specific order #665

Chralt98 opened this issue Jun 8, 2022 · 1 comment
Labels
p:low Low priority, resolution of this issue can wait t:question The issue contains a question

Comments

@Chralt98
Copy link
Member

Chralt98 commented Jun 8, 2022

I just waited for the fuzz tests a long time, just to get a workflow error in not the fuzz tests, but in clippy.

Clippy should definitely come before the fuzz tests.

Maybe this order: Misc -> Clippy -> Standalone -> Parachain -> Fuzz

Clippy compiles the full node too. That's why it takes so long. We could save time when compiling the zeitgeist node once. Is there a way to avoid compiling the same in clippy, standalone etc.. ? If yes, this would lead to getting much earlier results of the workflows and therefore speed up development time.

@Chralt98 Chralt98 added p:low Low priority, resolution of this issue can wait t:question The issue contains a question labels Jun 8, 2022
@Chralt98
Copy link
Member Author

Chralt98 commented Jun 28, 2022

I investigated time to understand the GitHub Workflow Settings. I found, that this caches the rust crates if they were already compiled. I think about ordering the matrix in a way, that the order works as mentioned above like the following here.

      - name: Formatting
        run: ./scripts/tests/format.sh
      - name: Unit Tests
        run: ./scripts/tests/misc.sh
      - name: Standalone Checks
        run: ./scripts/tests/standalone.sh
      - name: Parachain Checks
        run: ./scripts/tests/parachain.sh

I don't know if the current matrix runs in parallel. If this is the case, then crates could be loaded multiple times, which is unnecessary, but using a specific order of execution with caching is the best choice. Especially when we can decide in which order they run.

Above it indicates, that there is a Formatting script, which is currently not present. I suggest to move the cargo fmt check from misc.sh to a new script, which runs first in each workflow. It shouldn't take too long, but results in a quick workflow fail for the unformatted code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p:low Low priority, resolution of this issue can wait t:question The issue contains a question
Projects
None yet
Development

No branches or pull requests

1 participant