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 amd64 macos workflow to use X86 arch #355

Merged
merged 3 commits into from
Aug 28, 2024

Conversation

toor1245
Copy link
Contributor

@toor1245 toor1245 commented Aug 25, 2024

Github Actions added support M1, thus macOS supports arm64 and amd64 in actions:

  • macos-latest is arm64 architecture
  • macos-13 is amd64 architecture

see details:
https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners

it looks like macos-latest-large is not supported to use amd64
https:/actions/runner-images?tab=readme-ov-file#available-images

Also, we should add CI/CD arm64 architecture support for macOS M1 CPUs in the separate patch and fix tests.
See details: https:/google/cpu_features/actions/runs/10499466482/job/29086289583

Running main() from gmock_main.cc
[==========] Running 2 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 2 tests from CpuidAarch64Test
[ RUN      ] CpuidAarch64Test.Aarch64FeaturesEnum
[       OK ] CpuidAarch64Test.Aarch64FeaturesEnum (0 ms)
[ RUN      ] CpuidAarch64Test.FromDarwinSysctlFromName
test/cpuinfo_aarch64_test.cc:341: Failure
Expected equality of these values:
  info.part
    Which is: 0
  0x1B588BB3
    Which is: 458787763
test/cpuinfo_aarch64_test.cc:342: Failure
Expected equality of these values:
  info.revision
    Which is: 0
  2
test/cpuinfo_aarch64_test.cc:345: Failure
Value of: info.features.asimd
  Actual: true
Expected: false
test/cpuinfo_aarch64_test.cc:347: Failure
Value of: info.features.aes
  Actual: true
Expected: false
test/cpuinfo_aarch64_test.cc:348: Failure
Value of: info.features.pmull
  Actual: true
Expected: false
test/cpuinfo_aarch64_test.cc:349: Failure
Value of: info.features.sha1
  Actual: true
Expected: false
test/cpuinfo_aarch64_test.cc:350: Failure
Value of: info.features.sha2
  Actual: true
Expected: false
test/cpuinfo_aarch64_test.cc:356: Failure
Value of: info.features.asimdrdm
  Actual: true
Expected: false
test/cpuinfo_aarch64_test.cc:357: Failure
Value of: info.features.jscvt
  Actual: true
Expected: false
test/cpuinfo_aarch64_test.cc:358: Failure
Value of: info.features.fcma
  Actual: true
Expected: false
test/cpuinfo_aarch64_test.cc:359: Failure
Value of: info.features.lrcpc
  Actual: true
Expected: false
test/cpuinfo_aarch64_test.cc:360: Failure
Value of: info.features.dcpop
  Actual: true
Expected: false
test/cpuinfo_aarch64_test.cc:364: Failure
Value of: info.features.asimddp
  Actual: true
Expected: false
test/cpuinfo_aarch64_test.cc:368: Failure
Value of: info.features.dit
  Actual: true
Expected: false
test/cpuinfo_aarch64_test.cc:369: Failure
Value of: info.features.uscat
  Actual: true
Expected: false
test/cpuinfo_aarch64_test.cc:371: Failure
Value of: info.features.flagm
  Actual: true
Expected: false
test/cpuinfo_aarch64_test.cc:372: Failure
Value of: info.features.ssbs
  Actual: true
Expected: false
test/cpuinfo_aarch64_test.cc:373: Failure
Value of: info.features.sb
  Actual: true
Expected: false
[  FAILED  ] CpuidAarch64Test.FromDarwinSysctlFromName (0 ms)
[----------] 2 tests from CpuidAarch64Test (0 ms total)

[----------] Global test environment tear-down
[==========] 2 tests from 1 test suite ran. (0 ms total)
[  PASSED  ] 1 test.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] CpuidAarch64Test.FromDarwinSysctlFromName

 1 FAILED TEST
================================================================================
INFO: Found [15](https:/google/cpu_features/actions/runs/10499466482/job/29086289583#step:6:16) targets and 4 test targets...
INFO: Elapsed time: 0.415s, Critical Path: 0.17s
INFO: 5 processes: 1 internal, 4 darwin-sandbox.
INFO: Build completed, 1 test FAILED, 5 total actions
//:bit_utils_test                                                        PASSED in 0.1s
//:stack_line_reader_test                                                PASSED in 0.1s
//:string_view_test                                                      PASSED in 0.1s
//:cpuinfo_test                                                          FAILED in 0.0s
  /private/var/tmp/_bazel_runner/95[28](https:/google/cpu_features/actions/runs/10499466482/job/29086289583#step:6:29)e8115d3e1528a3dc7979ba042b2f/execroot/_main/bazel-out/darwin_arm64-opt/testlogs/cpuinfo_test/test.log

Executed 4 out of 4 tests: 3 tests pass and 1 fails locally.
There were tests whose specified size is too big. Use the --test_verbose_timeout_warnings command line option to see which ones these are.

@toor1245 toor1245 marked this pull request as draft August 25, 2024 20:56
@toor1245 toor1245 marked this pull request as ready for review August 25, 2024 21:04
@toor1245
Copy link
Contributor Author

success:
amd64 macosxcode: https:/toor1245/cpu_features/actions/runs/10550071199/job/29225824643
amd64 macos bazel https:/toor1245/cpu_features/actions/runs/10550071209/job/29225824646

install failed:
amd64 macos nmake: https:/toor1245/cpu_features/actions/runs/10550071199/job/29225824753

error message:

CMake Error at cmake_install.cmake:41 (file):
  file cannot create directory: /usr/local/lib.  Maybe need administrative
  privileges.

@toor1245
Copy link
Contributor Author

@gchatelet, @Mizux, this PR is ready to review please take a look.

@@ -10,7 +10,7 @@ on:
jobs:
# Building using the github runner environement directly.
bazel:
runs-on: macos-latest
runs-on: macos-13
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add # Using x86 processors, ref: https:/actions/runner-images after macos-13 ?

@@ -10,7 +10,7 @@ on:
jobs:
# Building using the github runner environement directly.
xcode:
runs-on: macos-latest
runs-on: macos-13
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

@@ -26,7 +26,7 @@ jobs:
- name: Install
run: cmake --build build --config Release --target install -v
make:
runs-on: macos-latest
runs-on: macos-13
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

@Mizux Mizux added the bug Something isn't working label Aug 27, 2024
@gchatelet gchatelet merged commit c6bb479 into google:main Aug 28, 2024
28 checks passed
@gchatelet
Copy link
Collaborator

Thank you @toor1245 ! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants