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 Mac CI image #3708

Merged
merged 7 commits into from
Jul 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions .github/workflows/testmac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
jobs:
testmac:
name: Test on Mac
runs-on: macos-10.15
runs-on: macos-12

steps:
- name: Use cache
Expand All @@ -26,14 +26,14 @@ jobs:
lib
include
bin
key: ${{ runner.os }}-${{ github.ref }}
key: ${{ runner.os }}-12-${{ github.ref }}
# Restore keys are a "list", but really only a multiline string is
# accepted. Also we match by prefix. And the most recent cache is
# used, not the most specific.
# See: https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows#matching-a-cache-key
restore-keys: |
${{ runner.os }}-${{ github.base_ref }}
${{ runner.os }}
${{ runner.os }}-12-${{ github.base_ref }}
${{ runner.os }}-12

- name: Checkout code without submodules
uses: actions/checkout@v2
Expand All @@ -46,9 +46,10 @@ jobs:
# We uninstall everything we don't need in order to prevent linking
# conflicts with existing/outdated packages, which we can't resolve
# because there's no way to tell Homebrew to force-link when installing
# from a Brewfile.
# from a Brewfile. We also update Protobuf to make sure we have 3.21.3+
# to avoid problems with ABI changes with/without -DNDEBUG.
# We pre-install a pinned txm to work around https://github.com/anko/txm/issues/8
run: brew bundle cleanup --force && brew bundle install && npm install -g [email protected]
run: brew bundle cleanup --force && brew bundle install && brew update && brew install protobuf && npm install -g [email protected]

- name: Run build and test
run: |
Expand Down
2 changes: 1 addition & 1 deletion src/statistics.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1018,7 +1018,7 @@ class WideningPRNG {
auto used_bits = numeric_limits<long long unsigned int>::digits - unused_bits;

// Get just that max used bit
OutType used_bit = 1 << (used_bits - 1);
OutType used_bit = OutType(1) << (used_bits - 1);

// If a generated number from the RNG has this bit flag in it, it has
// passed the largest complete power of 2 it can make and needs to be
Expand Down