x86-64.yml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. name: x86-64
  2. on: [ push, pull_request ]
  3. env:
  4. BUILD_TYPE: Release
  5. jobs:
  6. build:
  7. strategy:
  8. matrix:
  9. os: [ windows-latest, ubuntu-latest, macos-latest ]
  10. cpu_detection: [ 0, 1 ]
  11. fail-fast: false
  12. runs-on: ${{matrix.os}}
  13. steps:
  14. - name: Install build dependencies
  15. if: ${{matrix.os == 'ubuntu-latest'}}
  16. run: sudo apt-get install llvm ninja-build
  17. - name: Install build dependencies
  18. if: ${{matrix.os == 'macos-latest'}}
  19. run: |
  20. brew install llvm ninja
  21. echo "/usr/local/opt/llvm/bin" >> $GITHUB_PATH
  22. - name: Checkout dynarmic repo
  23. uses: actions/checkout@v2
  24. - name: Checkout ext-boost repo
  25. uses: actions/checkout@v2
  26. with:
  27. repository: MerryMage/ext-boost
  28. path: externals/ext-boost
  29. - name: Checkout unicorn repo
  30. if: ${{matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'}}
  31. uses: actions/checkout@v2
  32. with:
  33. repository: MerryMage/unicorn
  34. path: externals/unicorn
  35. - name: Build unicorn
  36. if: ${{matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'}}
  37. working-directory: externals/unicorn
  38. run: UNICORN_ARCHS=aarch64,arm ./make.sh
  39. - name: Configure CMake
  40. if: ${{matrix.os == 'ubuntu-latest'}}
  41. env:
  42. CC: gcc-10
  43. CXX: g++-10
  44. CXXFLAGS: -Wp,-D_GLIBCXX_ASSERTIONS
  45. run: >
  46. cmake
  47. -B ${{github.workspace}}/build
  48. -DBOOST_INCLUDEDIR=${{github.workspace}}/externals/ext-boost
  49. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
  50. -DDYNARMIC_ENABLE_CPU_FEATURE_DETECTION=${{matrix.cpu_detection}}
  51. -DDYNARMIC_TESTS_USE_UNICORN=1
  52. -DDYNARMIC_USE_LLVM=1
  53. -DLIBUNICORN_INCLUDE_DIR=${{github.workspace}}/externals/unicorn/include
  54. -DLIBUNICORN_LIBRARY=${{github.workspace}}/externals/unicorn/libunicorn.a
  55. -G Ninja
  56. - name: Configure CMake
  57. if: ${{matrix.os == 'macos-latest'}}
  58. run: >
  59. cmake
  60. -B ${{github.workspace}}/build
  61. -DBOOST_INCLUDEDIR=${{github.workspace}}/externals/ext-boost
  62. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
  63. -DDYNARMIC_ENABLE_CPU_FEATURE_DETECTION=${{matrix.cpu_detection}}
  64. -DDYNARMIC_TESTS_USE_UNICORN=1
  65. -DDYNARMIC_USE_LLVM=1
  66. -DLIBUNICORN_INCLUDE_DIR=${{github.workspace}}/externals/unicorn/include
  67. -DLIBUNICORN_LIBRARY=${{github.workspace}}/externals/unicorn/libunicorn.a
  68. -G Ninja
  69. - name: Configure CMake
  70. if: ${{matrix.os == 'windows-latest'}}
  71. run: >
  72. cmake
  73. -B ${{github.workspace}}/build
  74. -DBOOST_INCLUDEDIR=${{github.workspace}}/externals/ext-boost
  75. -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
  76. -DDYNARMIC_ENABLE_CPU_FEATURE_DETECTION=${{matrix.cpu_detection}}
  77. -G "Visual Studio 17 2022"
  78. -A x64
  79. - name: Build
  80. working-directory: ${{github.workspace}}/build
  81. run: cmake --build . --config Release
  82. - name: Test
  83. env:
  84. DYLD_FALLBACK_LIBRARY_PATH: ${{github.workspace}}/externals/unicorn
  85. working-directory: ${{github.workspace}}/build
  86. run: ctest --extra-verbose -C ${{env.BUILD_TYPE}}