diff options
author | merry <[email protected]> | 2022-03-20 12:57:14 +0000 |
---|---|---|
committer | merry <[email protected]> | 2022-03-20 13:59:18 +0000 |
commit | 81536e463084553688081b36279864838b1dc184 (patch) | |
tree | 2b432a52e2422c5b92726cabd39940ed461093f8 /.github | |
parent | a4daad63364dc9e035796ea4f4327efec1ee1b0d (diff) | |
download | dynarmic-81536e463084553688081b36279864838b1dc184.tar.gz dynarmic-81536e463084553688081b36279864838b1dc184.zip |
github: Use GCC 10 on Ubuntu
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/build-and-test.yml | 153 |
1 files changed, 85 insertions, 68 deletions
diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 729bcea7..c348694b 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -1,6 +1,6 @@ name: Build and Test -on: [push, pull_request] +on: [ push, pull_request ] env: BUILD_TYPE: Release @@ -9,76 +9,93 @@ jobs: build: strategy: matrix: - os: [windows-latest, ubuntu-latest, macos-latest] - cpu_detection: [0, 1] + os: [ windows-latest, ubuntu-latest, macos-latest ] + cpu_detection: [ 0, 1 ] fail-fast: false runs-on: ${{matrix.os}} steps: - - 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' || matrix.os == 'macos-latest'}} - run: > - cmake - -B ${{github.workspace}}/build - -DBoost_INCLUDE_DIRS=${{github.workspace}}/externals/ext-boost - -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 - -DBoost_INCLUDE_DIRS=${{github.workspace}}/externals/ext-boost - -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}} + - 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 + run: > + cmake + -B ${{github.workspace}}/build + -DBoost_INCLUDE_DIRS=${{github.workspace}}/externals/ext-boost + -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 + -DBoost_INCLUDE_DIRS=${{github.workspace}}/externals/ext-boost + -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 + -DBoost_INCLUDE_DIRS=${{github.workspace}}/externals/ext-boost + -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}} |