dynarmic/.github/workflows/x86-64.yml

103 lines
3.3 KiB
YAML
Raw Normal View History

name: x86-64
2021-05-31 12:51:58 +02:00
2022-03-20 13:57:14 +01:00
on: [ push, pull_request ]
2021-05-31 12:51:58 +02:00
env:
BUILD_TYPE: Release
jobs:
build:
strategy:
matrix:
2022-03-20 13:57:14 +01:00
os: [ windows-latest, ubuntu-latest, macos-latest ]
cpu_detection: [ 0, 1 ]
2021-05-31 12:51:58 +02:00
fail-fast: false
runs-on: ${{matrix.os}}
steps:
2022-03-20 13:57:14 +01:00
- name: Install build dependencies
if: ${{matrix.os == 'ubuntu-latest'}}
run: sudo apt-get install llvm ninja-build
- name: Install build dependencies
if: ${{matrix.os == 'macos-latest'}}
run: |
brew install llvm ninja
echo "/usr/local/opt/llvm/bin" >> $GITHUB_PATH
- name: Checkout dynarmic repo
uses: actions/checkout@v2
- name: Checkout ext-boost repo
uses: actions/checkout@v2
with:
repository: MerryMage/ext-boost
path: externals/ext-boost
- name: Checkout unicorn repo
if: ${{matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'}}
uses: actions/checkout@v2
with:
repository: MerryMage/unicorn
path: externals/unicorn
- name: Build unicorn
if: ${{matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'}}
working-directory: externals/unicorn
run: UNICORN_ARCHS=aarch64,arm ./make.sh
- name: Configure CMake
if: ${{matrix.os == 'ubuntu-latest'}}
env:
CC: gcc-10
CXX: g++-10
CXXFLAGS: -Wp,-D_GLIBCXX_ASSERTIONS
2022-03-20 13:57:14 +01:00
run: >
cmake
-B ${{github.workspace}}/build
2022-11-22 02:42:52 +01:00
-DBOOST_INCLUDEDIR=${{github.workspace}}/externals/ext-boost
2022-03-20 13:57:14 +01:00
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-DDYNARMIC_ENABLE_CPU_FEATURE_DETECTION=${{matrix.cpu_detection}}
-DDYNARMIC_TESTS_USE_UNICORN=1
-DDYNARMIC_USE_LLVM=1
-DLIBUNICORN_INCLUDE_DIR=${{github.workspace}}/externals/unicorn/include
-DLIBUNICORN_LIBRARY=${{github.workspace}}/externals/unicorn/libunicorn.a
-G Ninja
- name: Configure CMake
if: ${{matrix.os == 'macos-latest'}}
run: >
cmake
-B ${{github.workspace}}/build
2022-11-22 02:42:52 +01:00
-DBOOST_INCLUDEDIR=${{github.workspace}}/externals/ext-boost
2022-03-20 13:57:14 +01:00
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-DDYNARMIC_ENABLE_CPU_FEATURE_DETECTION=${{matrix.cpu_detection}}
-DDYNARMIC_TESTS_USE_UNICORN=1
-DDYNARMIC_USE_LLVM=1
-DLIBUNICORN_INCLUDE_DIR=${{github.workspace}}/externals/unicorn/include
-DLIBUNICORN_LIBRARY=${{github.workspace}}/externals/unicorn/libunicorn.a
-G Ninja
- name: Configure CMake
if: ${{matrix.os == 'windows-latest'}}
run: >
cmake
-B ${{github.workspace}}/build
2022-11-22 02:42:52 +01:00
-DBOOST_INCLUDEDIR=${{github.workspace}}/externals/ext-boost
2022-03-20 13:57:14 +01:00
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-DDYNARMIC_ENABLE_CPU_FEATURE_DETECTION=${{matrix.cpu_detection}}
-G "Visual Studio 17 2022"
-A x64
- name: Build
working-directory: ${{github.workspace}}/build
run: cmake --build . --config Release
- name: Test
env:
DYLD_FALLBACK_LIBRARY_PATH: ${{github.workspace}}/externals/unicorn
working-directory: ${{github.workspace}}/build
run: ctest --extra-verbose -C ${{env.BUILD_TYPE}}