ci: Use Cirrus CI dockerfile env #27340

pull maflcko wants to merge 3 commits into bitcoin:master from maflcko:2303-ci-env-🏺 changing 2 files +40 −25
  1. maflcko commented at 8:57 am on March 27, 2023: member

    Currently the CI env has many intermittent issues:

    • The Ubuntu package servers are frequently down
    • Occasionally other stuff is down, such as dnf, pip, or the android sdk
    • Installing packages is slower than downloading them, at least on Cirrus, which has a fast download speed

    Fix all issues by using the Cirrus CI dockerfile env.

  2. DrahtBot commented at 8:57 am on March 27, 2023: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK josibake

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    Conflicts

    No conflicts as of last run.

  3. DrahtBot added the label Tests on Mar 27, 2023
  4. maflcko marked this as a draft on Mar 27, 2023
  5. maflcko force-pushed on Mar 27, 2023
  6. maflcko force-pushed on Mar 27, 2023
  7. maflcko commented at 11:37 am on March 27, 2023: member

    No idea why CI fails. Seems to be related to https://superuser.com/questions/1642858/git-on-debian-10-backports-throws-fatal-unable-to-access-https-github-com-us

    https://cirrus-ci.com/task/5391244998737920:

    0git is already the newest version (1:2.30.2-1~bpo10+1).
    10 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    2if [ "$CIRRUS_PR" = "" ]; then exit 0; fi
    3git fetch --depth=1 $CIRRUS_REPO_CLONE_URL "pull/${CIRRUS_PR}/merge"
    4fatal: unable to access 'https://github.com/bitcoin/bitcoin.git/': Failed sending HTTP2 data
    
  8. DrahtBot added the label Needs rebase on Mar 28, 2023
  9. maflcko marked this as ready for review on Mar 29, 2023
  10. maflcko force-pushed on Mar 29, 2023
  11. DrahtBot removed the label Needs rebase on Mar 29, 2023
  12. maflcko force-pushed on Mar 29, 2023
  13. maflcko force-pushed on Mar 29, 2023
  14. maflcko force-pushed on Mar 29, 2023
  15. maflcko force-pushed on Mar 29, 2023
  16. maflcko force-pushed on Mar 29, 2023
  17. maflcko force-pushed on Mar 29, 2023
  18. maflcko referenced this in commit fac77c9739 on Mar 29, 2023
  19. maflcko force-pushed on Mar 29, 2023
  20. DrahtBot added the label Needs rebase on Mar 30, 2023
  21. maflcko referenced this in commit fa9606bf7e on Mar 31, 2023
  22. maflcko force-pushed on Mar 31, 2023
  23. DrahtBot removed the label Needs rebase on Mar 31, 2023
  24. DrahtBot added the label Needs rebase on Mar 31, 2023
  25. maflcko referenced this in commit fa4ef066a3 on Mar 31, 2023
  26. maflcko force-pushed on Mar 31, 2023
  27. maflcko force-pushed on Mar 31, 2023
  28. maflcko force-pushed on Mar 31, 2023
  29. DrahtBot removed the label Needs rebase on Apr 2, 2023
  30. maflcko force-pushed on Apr 5, 2023
  31. maflcko referenced this in commit fa104c560d on Apr 5, 2023
  32. maflcko force-pushed on Apr 5, 2023
  33. maflcko force-pushed on Apr 5, 2023
  34. maflcko force-pushed on Apr 5, 2023
  35. maflcko force-pushed on Apr 5, 2023
  36. DrahtBot added the label Needs rebase on Apr 6, 2023
  37. maflcko force-pushed on Apr 6, 2023
  38. maflcko force-pushed on Apr 6, 2023
  39. DrahtBot removed the label Needs rebase on Apr 6, 2023
  40. maflcko referenced this in commit fa59eb4336 on Apr 7, 2023
  41. maflcko force-pushed on Apr 7, 2023
  42. maflcko requested review from adamjonas on Apr 10, 2023
  43. maflcko removed review request from adamjonas on Apr 10, 2023
  44. ci: Use Cirrus CI dockerfile env facae3b149
  45. DrahtBot added the label Needs rebase on Apr 11, 2023
  46. ci: Use credits in more tasks
    This should give faster feedback about the CI result, while still
    keeping expenses reasonable.
    fabc7d90a9
  47. ci: Bump nowallet_libbitcoinkernel task to ubuntu:focal
    This is needed to work around
    https://github.com/bitcoin/bitcoin/pull/27340#issuecomment-1484988445
    
    The only change should be that python3.7 is bumped to 3.8, but this is
    fine because ci/test/00_setup_env_native_qt5.sh still checks for
    python3.7 compatibility.
    fa4a46de0b
  48. maflcko force-pushed on Apr 11, 2023
  49. DrahtBot removed the label Needs rebase on Apr 11, 2023
  50. fanquake requested review from josibake on Apr 11, 2023
  51. in .cirrus.yml:50 in facae3b149 outdated
    46@@ -47,6 +47,7 @@ container_depends_template: &CONTAINER_DEPENDS_TEMPLATE
    47     cpu: 2
    48     greedy: true
    49     memory: 8G  # Set to 8GB to avoid OOM. https://cirrus-ci.org/guide/linux/#linux-containers
    50+    dockerfile: ci/test_imagefile  # https://cirrus-ci.org/guide/docker-builder-vm/#dockerfile-as-a-ci-environment
    


    josibake commented at 9:57 am on April 14, 2023:
    note to self/reviewers: this file was introduced in https://github.com/bitcoin/bitcoin/pull/26976
  52. in .cirrus.yml:200 in facae3b149 outdated
    196@@ -195,6 +197,7 @@ task:
    197     image: debian:bullseye
    198     cpu: 2
    199     memory: 8G
    200+    # docker_arguments:  # Can use dockerfile after https://github.com/cirruslabs/cirrus-ci-docs/issues/1154
    


    josibake commented at 9:58 am on April 14, 2023:
    I grep for “TODO"s a lot when looking for stuff to work on, might be nice to add a todo comment here to make it easier for others to find later on

    maflcko commented at 10:51 am on April 14, 2023:
    It is not really something to work on, other than maybe subscribing to the linked issue and follow-up when it is closed?
  53. in .cirrus.yml:213 in fabc7d90a9 outdated
    209@@ -210,6 +210,7 @@ task:
    210     docker_arguments:
    211       CI_IMAGE_NAME_TAG: ubuntu:jammy
    212       FILE_ENV: "./ci/test/00_setup_env_win64.sh"
    213+  << : *CREDITS_TEMPLATE
    


    josibake commented at 10:04 am on April 14, 2023:
    this is unrelated to switching to the docker file, right? would prefer this change in it’s own PR because I have a few questions about cost (before / after, etc), but not a super big deal

    maflcko commented at 10:53 am on April 14, 2023:
    Happy to answer any questions. The cost will be displayed on every task in a badge.
  54. josibake commented at 10:30 am on April 14, 2023: member

    code review ACK https://github.com/bitcoin/bitcoin/pull/27340/commits/fa4a46de0b3c1a5895e95dba7e95278932fbfc2c

    read through the linked documentation from cirrus and this definitely makes sense. I tried to run the ci locally using cirrus run but ran into some issues (unrelated to this PR). If you have any tips on how to test this, happy to give it a go, but the code looks good otherwise.

  55. maflcko commented at 10:54 am on April 14, 2023: member

    I tried to run the ci locally using cirrus run but ran into some issues (unrelated to this PR). If you have any tips on how to test this

    I can help with running the CI locally, but not how to run Cirrus locally. I don’t think testing this is possible, other than looking at the CI tasks for this pull?

  56. josibake commented at 10:58 am on April 14, 2023: member

    I can help with running the CI locally, but not how to run Cirrus locally. I don’t think testing this is possible, other than looking at the CI tasks for this pull?

    I installed the cirrus cli tool and ran cirrus run in the directory, which then picks up the .cirrus.yml file and executes with cirrus workers, but was running into a bunch of permissions issues. Not related to this PR, so I’m not going to try and troubleshoot it further

  57. maflcko requested review from fanquake on Apr 17, 2023
  58. fanquake commented at 9:39 am on April 18, 2023: member
    Going to merge this now, so that 25.x and master will have the same CI infra.
  59. fanquake merged this on Apr 18, 2023
  60. fanquake closed this on Apr 18, 2023

  61. maflcko deleted the branch on Apr 18, 2023
  62. sidhujag referenced this in commit 50f8f23b7b on Apr 18, 2023
  63. fanquake referenced this in commit d89aca1bdb on Apr 28, 2023
  64. RandyMcMillan referenced this in commit e4a8a966de on May 27, 2023
  65. janus referenced this in commit c5b9052eac on Sep 3, 2023
  66. knst referenced this in commit 63bea741ce on Oct 19, 2023
  67. knst referenced this in commit 09b8836dc0 on Oct 19, 2023
  68. PastaPastaPasta referenced this in commit 6e7b402fe9 on Oct 23, 2023
  69. backpacker69 referenced this in commit 147a18593f on Mar 5, 2024
  70. bitcoin locked this on Apr 17, 2024

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-07-05 22:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me