dynarmic/.github/workflows/aarch64.yml

158 lines
5.8 KiB
YAML
Raw Normal View History

2022-07-10 12:14:59 +02:00
name: AArch64
on: [ push, pull_request ]
env:
BUILD_TYPE: Release
jobs:
2022-12-29 21:58:11 +01:00
build_linux:
2022-07-10 12:14:59 +02:00
strategy:
matrix:
2022-12-26 21:49:43 +01:00
platform: [ linux, android ]
2022-07-10 12:14:59 +02:00
fail-fast: false
2022-12-26 21:49:43 +01:00
runs-on: ubuntu-latest
2022-07-10 12:14:59 +02:00
steps:
- name: Install build dependencies
run: >
2022-12-10 19:27:13 +01:00
sudo apt-get update &&
2022-07-10 12:14:59 +02:00
sudo apt-get install
gcc-10-aarch64-linux-gnu
g++-10-aarch64-linux-gnu
ninja-build
qemu-user
- name: Checkout dynarmic repo
uses: actions/checkout@v2
2022-07-24 17:18:11 +02:00
- name: Ccache
2022-12-26 21:49:43 +01:00
if: matrix.platform == 'linux'
2022-07-24 17:18:11 +02:00
uses: hendrikmuhs/ccache-action@v1.2
2022-07-10 12:14:59 +02:00
- name: Checkout ext-boost repo
uses: actions/checkout@v2
with:
repository: MerryMage/ext-boost
path: externals/ext-boost
2022-12-26 21:49:43 +01:00
- name: Configure CMake for AArch64 (Linux)
if: matrix.platform == 'linux'
2022-07-10 12:14:59 +02:00
env:
CC: aarch64-linux-gnu-gcc-10
CXX: aarch64-linux-gnu-g++-10
run: >
cmake
2022-07-24 17:18:11 +02:00
-B ${{github.workspace}}/build-arm64
2022-11-22 02:42:52 +01:00
-DBOOST_INCLUDEDIR=${{github.workspace}}/externals/ext-boost
2022-07-10 12:14:59 +02:00
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-DDYNARMIC_TESTS_USE_UNICORN=0
-DDYNARMIC_USE_LLVM=0
-G Ninja
2022-12-26 21:49:43 +01:00
- name: Configure CMake for AArch64 (Android)
if: matrix.platform == 'android'
run: >
cmake
-B ${{github.workspace}}/build-arm64
-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-DANDROID_ABI=arm64-v8a
-DANDROID_PLATFORM=29
-DBoost_INCLUDE_DIR=${{github.workspace}}/externals/ext-boost
-DDYNARMIC_TESTS_USE_UNICORN=0
-DDYNARMIC_USE_LLVM=0
-G Ninja
2022-07-10 12:14:59 +02:00
2022-07-24 17:18:11 +02:00
- name: Build AArch64
working-directory: ${{github.workspace}}/build-arm64
run: cmake --build . --config Release
- name: Configure CMake for x86_64
2022-12-26 21:49:43 +01:00
if: matrix.platform == 'linux'
2022-07-24 17:18:11 +02:00
env:
CC: gcc-10
CXX: g++-10
run: >
cmake
-B ${{github.workspace}}/build-x64
2022-11-22 02:42:52 +01:00
-DBOOST_INCLUDEDIR=${{github.workspace}}/externals/ext-boost
2022-07-24 17:18:11 +02:00
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-DCMAKE_C_COMPILER_LAUNCHER=ccache
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DDYNARMIC_TESTS_USE_UNICORN=0
-DDYNARMIC_USE_LLVM=0
-G Ninja
- name: Build x86_64
2022-12-26 21:49:43 +01:00
if: matrix.platform == 'linux'
2022-07-24 17:18:11 +02:00
working-directory: ${{github.workspace}}/build-x64
2022-07-10 12:14:59 +02:00
run: cmake --build . --config Release
2022-08-16 13:16:01 +02:00
- name: Basic tests
2022-12-26 21:49:43 +01:00
if: matrix.platform == 'linux'
2022-08-16 13:16:01 +02:00
working-directory: ${{github.workspace}}
run: qemu-aarch64 -L /usr/aarch64-linux-gnu ./build-arm64/tests/dynarmic_tests -d yes
2022-11-27 15:08:29 +01:00
- name: Test against x86_64 implementation (A32, thumb)
2022-12-26 21:49:43 +01:00
if: matrix.platform == 'linux'
2022-07-24 17:18:11 +02:00
working-directory: ${{github.workspace}}
2022-11-27 15:08:29 +01:00
run: |
diff <(qemu-aarch64 -L /usr/aarch64-linux-gnu ./build-arm64/tests/dynarmic_test_generator thumb 42 1 100000) <(./build-x64/tests/dynarmic_test_generator thumb 42 1 100000)
diff <(qemu-aarch64 -L /usr/aarch64-linux-gnu ./build-arm64/tests/dynarmic_test_generator thumb 42 10 10000) <(./build-x64/tests/dynarmic_test_generator thumb 42 10 10000)
diff <(qemu-aarch64 -L /usr/aarch64-linux-gnu ./build-arm64/tests/dynarmic_test_generator thumb 42 100 1000) <(./build-x64/tests/dynarmic_test_generator thumb 42 100 1000)
- name: Test against x86_64 implementation (A32, arm)
2022-12-26 21:49:43 +01:00
if: matrix.platform == 'linux'
2022-11-27 15:08:29 +01:00
working-directory: ${{github.workspace}}
run: |
diff <(qemu-aarch64 -L /usr/aarch64-linux-gnu ./build-arm64/tests/dynarmic_test_generator arm 42 1 100000) <(./build-x64/tests/dynarmic_test_generator arm 42 1 100000)
diff <(qemu-aarch64 -L /usr/aarch64-linux-gnu ./build-arm64/tests/dynarmic_test_generator arm 42 10 10000) <(./build-x64/tests/dynarmic_test_generator arm 42 10 10000)
diff <(qemu-aarch64 -L /usr/aarch64-linux-gnu ./build-arm64/tests/dynarmic_test_generator arm 42 100 1000) <(./build-x64/tests/dynarmic_test_generator arm 42 100 1000)
- name: Test against x86_64 implementation (A64)
2022-12-26 21:49:43 +01:00
if: matrix.platform == 'linux'
2022-11-27 15:08:29 +01:00
working-directory: ${{github.workspace}}
run: |
diff <(qemu-aarch64 -L /usr/aarch64-linux-gnu ./build-arm64/tests/dynarmic_test_generator a64 42 1 100000) <(./build-x64/tests/dynarmic_test_generator a64 42 1 100000)
diff <(qemu-aarch64 -L /usr/aarch64-linux-gnu ./build-arm64/tests/dynarmic_test_generator a64 42 10 10000) <(./build-x64/tests/dynarmic_test_generator a64 42 10 10000)
diff <(qemu-aarch64 -L /usr/aarch64-linux-gnu ./build-arm64/tests/dynarmic_test_generator a64 42 100 1000) <(./build-x64/tests/dynarmic_test_generator a64 42 100 1000)
2022-12-29 21:58:11 +01:00
build_windows:
strategy:
fail-fast: false
runs-on: windows-latest
steps:
- 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: Setup msvc-arm64 environment
uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64_arm64
- name: Configure CMake for AArch64 (Windows)
run: >
cmake
-B ${{github.workspace}}/build-arm64
-DBOOST_INCLUDEDIR=${{github.workspace}}/externals/ext-boost
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-DDYNARMIC_WARNINGS_AS_ERRORS=0
-DDYNARMIC_TESTS_USE_UNICORN=0
-DDYNARMIC_USE_LLVM=0
-G Ninja
- name: Build AArch64
working-directory: ${{github.workspace}}/build-arm64
run: cmake --build . --config Release