Skip to content

ci: reorganise workflows (second try)#5399

Merged
0x009922 merged 47 commits intohyperledger-iroha:mainfrom
0x009922:workflows-try-2
May 2, 2025
Merged

ci: reorganise workflows (second try)#5399
0x009922 merged 47 commits intohyperledger-iroha:mainfrom
0x009922:workflows-try-2

Conversation

@0x009922
Copy link
Contributor

@0x009922 0x009922 commented Apr 17, 2025

Changes

  • Rename files and workflows, no I2::Tests::Dev::PR nonsence anymore
  • Merge most jobs into the primary ci.yaml that runs for all PRs and pushes to main
  • Separate and parallelize jobs
  • Use Rust cache wherever possible (and it could be improved further)
  • Separate Docker Compose tests from pytests.
    • Run Docker Compose tests only when defaults changed (i.e. docker compose files). This job is heavy and bulky.
    • Pytests do not need docker compose. We have a great test_env.py which does the same and much faster.
  • In Dockerfile, build only used binaries (irohad, iroha, kagami)

Result: main CI runs 16 minutes instead of 42 minutes.

Closes #5398

Postponed


Try 1: #5125

@0x009922
Copy link
Contributor Author

It mostly works quite well!

CI completes in 16 minutes (when cache hits), which most checks parallelised as much as possible.

image

Need to fix SonarQube job (waiting for assistance of @BAStos525). Or maybe remove it entirely.

Also, for some reason pytests sometimes start on Amazon Linux and not on Ubuntu, which causes Python installation job to fail.

Things to improve:

  • No clippy report for SonarQube
  • Improve Rust caches further, specifically of wasm builds but maybe not only
  • Add cache for Pytests
  • Figure out why Pytests' CLI tests are so slow, they don't need to be this way (maybe just set a faster block commit time in test_env.py)

@0x009922
Copy link
Contributor Author

For reference: currently the main workflow takes around 42 minutes!

https://github.com/hyperledger-iroha/iroha/actions/runs/14396113296

image

@0x009922 0x009922 marked this pull request as ready for review April 18, 2025 07:32
@0x009922 0x009922 requested a review from aoyako April 18, 2025 07:33
@0x009922 0x009922 added the Optimization Something isn't working as well as it should label Apr 18, 2025
@0x009922 0x009922 requested a review from BAStos525 April 18, 2025 07:38
@s8sato s8sato self-assigned this Apr 28, 2025
aoyako
aoyako previously approved these changes Apr 28, 2025
@aoyako
Copy link
Contributor

aoyako commented Apr 28, 2025

Also, for some reason pytests sometimes start on Amazon Linux and not on Ubuntu, which causes Python installation job to fail.

Are there any error logs showing the issue?

@0x009922
Copy link
Contributor Author

0x009922 commented Apr 28, 2025

Are there any error logs showing the issue?

@aoyako Logs are no longer available: https://github.com/hyperledger-iroha/iroha/actions/runs/14530346551?pr=5399

@0x009922 0x009922 enabled auto-merge (squash) April 28, 2025 04:12
@0x009922
Copy link
Contributor Author

Changes:

  • Do not run PR jobs (tests) on push to main; only in PRs
  • Return publishing of iroha:dev image (publish_dev.yml). Only publish the image, without artifacts containing binaries and schema
    • Why no artifacts: first, packaging binaries is pointless as they are target-specific. If they are built in a docker image doesn't mean they will execute by themselves everywhere. As for schema, it is already committed in git. If needed - we can publish. What is actually useful is publishing of built WASMs, but they are already built as another artifact in the same job.
  • Remove publish_nightly.yml manual job (unused as it seems)

@0x009922
Copy link
Contributor Author

@aoyako @BAStos525 it happened again: pytests ran on Amazon Linux despite runs-on: ubuntu-latest.

https://github.com/hyperledger-iroha/iroha/actions/runs/14746025718/job/41393653249?pr=5399

image

@0x009922
Copy link
Contributor Author

0x009922 added 20 commits May 2, 2025 10:13
Signed-off-by: 0x009922 <43530070+0x009922@users.noreply.github.com>
Signed-off-by: 0x009922 <43530070+0x009922@users.noreply.github.com>
Signed-off-by: 0x009922 <43530070+0x009922@users.noreply.github.com>
Signed-off-by: 0x009922 <43530070+0x009922@users.noreply.github.com>
Signed-off-by: 0x009922 <43530070+0x009922@users.noreply.github.com>
Signed-off-by: 0x009922 <43530070+0x009922@users.noreply.github.com>
Signed-off-by: 0x009922 <43530070+0x009922@users.noreply.github.com>
Signed-off-by: 0x009922 <43530070+0x009922@users.noreply.github.com>
Signed-off-by: 0x009922 <43530070+0x009922@users.noreply.github.com>
Signed-off-by: 0x009922 <43530070+0x009922@users.noreply.github.com>
Signed-off-by: 0x009922 <43530070+0x009922@users.noreply.github.com>
Signed-off-by: 0x009922 <43530070+0x009922@users.noreply.github.com>
Signed-off-by: 0x009922 <43530070+0x009922@users.noreply.github.com>
Signed-off-by: 0x009922 <43530070+0x009922@users.noreply.github.com>
Signed-off-by: 0x009922 <43530070+0x009922@users.noreply.github.com>
Signed-off-by: 0x009922 <43530070+0x009922@users.noreply.github.com>
Signed-off-by: 0x009922 <43530070+0x009922@users.noreply.github.com>
Signed-off-by: 0x009922 <43530070+0x009922@users.noreply.github.com>
Signed-off-by: 0x009922 <43530070+0x009922@users.noreply.github.com>
Signed-off-by: 0x009922 <43530070+0x009922@users.noreply.github.com>
@0x009922 0x009922 force-pushed the workflows-try-2 branch from da07947 to d9966b6 Compare May 2, 2025 01:13
Signed-off-by: 0x009922 <43530070+0x009922@users.noreply.github.com>
0x009922 added 2 commits May 2, 2025 13:24
Signed-off-by: 0x009922 <43530070+0x009922@users.noreply.github.com>
Signed-off-by: 0x009922 <43530070+0x009922@users.noreply.github.com>
@0x009922 0x009922 enabled auto-merge (squash) May 2, 2025 04:28
@0x009922 0x009922 merged commit 4bc0146 into hyperledger-iroha:main May 2, 2025
12 checks passed
@0x009922
Copy link
Contributor Author

0x009922 commented May 2, 2025

For reference - publish_dev.yml worked as expected: iroha:dev

https://github.com/hyperledger-iroha/iroha/actions/runs/14788689301

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Optimization Something isn't working as well as it should

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docker CI no longer works due to GHA Cache being shut down

4 participants