-
Notifications
You must be signed in to change notification settings - Fork 38k
ci: Run "macOS native x86_64" job on GitHub Actions #28187
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
hebasto marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# Copyright (c) 2023 The Bitcoin Core developers | ||
# Distributed under the MIT software license, see the accompanying | ||
# file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||
|
||
name: CI | ||
on: | ||
# See: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request. | ||
pull_request: | ||
# See: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#push. | ||
push: | ||
branches: | ||
- '**' | ||
tags-ignore: | ||
- '**' | ||
|
||
env: | ||
DANGER_RUN_CI_ON_HOST: 1 | ||
TEST_RUNNER_TIMEOUT_FACTOR: 40 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Forgot Edit: Done in #28278 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, Edit: Not yet done. |
||
|
||
jobs: | ||
macos-native-x86_64: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe add a comment linking to github/roadmap#528 to say that this should be used, when available? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done in #28278 |
||
name: macOS 13 native, x86_64 [no depends, sqlite only, gui] | ||
# Use latest image, but hardcode version to avoid silent upgrades (and breaks). | ||
# See: https://github.com/actions/runner-images#available-images. | ||
runs-on: macos-13 | ||
hebasto marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
# No need to run on the read-only mirror, unless it is a PR. | ||
if: github.repository != 'bitcoin-core/gui' || github.event_name == 'pull_request' | ||
|
||
timeout-minutes: 120 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should also abort on a force push, to avoid wasting CPU, no? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. GHActions have no such a feature by default. It should be a separated workflow that processes There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So if someone (honestly) pushes to a pull request a few times in a few minutes, it will block CI progress on all other pulls, assuming a few more tasks are run on GHA and the "free" limit is reached? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Done in #28282. |
||
|
||
env: | ||
MAKEJOBS: '-j4' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any reason to reduce this to 4 when it previously was 10? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in #28278 |
||
CI_USE_APT_INSTALL: 'no' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. unrelated: Maybe remove this and replace it with a check on CI_OS_NAME? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in #28278 |
||
PACKAGE_MANAGER_INSTALL: 'echo' # Nothing to do | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: I think this can be removed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in #28278 |
||
FILE_ENV: './ci/test/00_setup_env_mac_native.sh' | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Clang version | ||
run: clang --version | ||
|
||
- name: Install Homebrew packages | ||
run: brew install boost libevent qt@5 miniupnpc libnatpmp ccache zeromq qrencode libtool automake gnu-getopt | ||
|
||
- name: Set Ccache directory | ||
run: echo "CCACHE_DIR=${RUNNER_TEMP}/ccache_dir" >> "$GITHUB_ENV" | ||
|
||
- name: Ccache cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ env.CCACHE_DIR }} | ||
key: ${{ github.job }}-ccache-cache-${{ github.run_id }} | ||
restore-keys: ${{ github.job }}-ccache-cache | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like each pull request will rewrite the ccache and thus the hit rate will be ~0% overall? Would be better to get the cache from the own pull only, or master. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yea, looks like caching doesn't work at all here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If it doesn't work, why was any of this added to the CI template? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it works when there are no pull requests. It should be possible to fix this in a follow-up. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How is this related. This is the "macOS native", not "macOS-cross" task. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
My bad. Sorry for the noise. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
It works.
Yes, pull requests should not create their own caches. Going to address this issue shortly. |
||
|
||
- name: CI script | ||
run: ./ci/test_run_all.sh |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Copyright (c) 2019-2022 The Bitcoin Core developers | ||
# Copyright (c) 2019-present The Bitcoin Core developers | ||
# Distributed under the MIT software license, see the accompanying | ||
# file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||
|
||
export LC_ALL=C.UTF-8 | ||
|
||
export HOST=arm64-apple-darwin | ||
export HOST=x86_64-apple-darwin | ||
export PIP_PACKAGES="zmq" | ||
export GOAL="install" | ||
export BITCOIN_CONFIG="--with-gui --with-miniupnpc --with-natpmp --enable-reduce-exports" | ||
export CI_OS_NAME="macos" | ||
export NO_DEPENDS=1 | ||
export OSX_SDK="" | ||
export CCACHE_MAXSIZE=300M | ||
export CCACHE_MAXSIZE=400M | ||
export RUN_FUZZ_TESTS=true | ||
export FUZZ_TESTS_CONFIG="--exclude banman" # https://github.com/bitcoin/bitcoin/issues/27924 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: if there is any opinion on the pr/commit title not being sufficient, you could make it something like the following (and add a body):