mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-01-07 15:08:22 +01:00
commit
cbeed6396f
394 changed files with 61415 additions and 39455 deletions
107
externals/zydis/.github/workflows/main.yml
vendored
107
externals/zydis/.github/workflows/main.yml
vendored
|
|
@ -1,47 +1,106 @@
|
|||
name: GitHub Actions CI
|
||||
name: CI
|
||||
|
||||
on: [push, pull_request]
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: "Build Zydis (${{ matrix.image_name }}, ${{ matrix.no_libc }})"
|
||||
runs-on: "${{ matrix.image_name }}"
|
||||
cmake-build-and-tests:
|
||||
name: >-
|
||||
CMake build + tests (${{ matrix.image_name }} ${{ matrix.cmake_flags }})
|
||||
runs-on: ${{ matrix.image_name }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
image_name: ["macOS-latest", "windows-2016", "ubuntu-18.04"]
|
||||
no_libc: ["", "-DZYAN_NO_LIBC=ON"]
|
||||
include:
|
||||
- image_name: "ubuntu-16.04"
|
||||
no_libc: "-DCMAKE_BUILD_TYPE=Release"
|
||||
dev_mode: "-DZYAN_DEV_MODE=ON"
|
||||
# Do a regular and a no-libc build for each platform.
|
||||
- image_name: macOS-latest
|
||||
- image_name: macOS-latest
|
||||
cmake_flags: -DZYAN_NO_LIBC=ON
|
||||
skip_tests: yes
|
||||
- image_name: windows-2022
|
||||
- image_name: windows-2022
|
||||
cmake_flags: -DZYAN_NO_LIBC=ON
|
||||
skip_tests: yes
|
||||
- image_name: ubuntu-22.04
|
||||
- image_name: ubuntu-22.04
|
||||
cmake_flags: -DZYAN_NO_LIBC=ON
|
||||
skip_tests: yes
|
||||
|
||||
# Do a few more specialized configurations.
|
||||
- image_name: ubuntu-22.04
|
||||
cmake_flags: -DZYDIS_MINIMAL_MODE=ON -DZYDIS_FEATURE_ENCODER=OFF
|
||||
skip_tests: yes
|
||||
- image_name: windows-2022
|
||||
cmake_flags: -TClangCL
|
||||
|
||||
steps:
|
||||
- uses: "actions/checkout@v1"
|
||||
- name: "Cloning submodules"
|
||||
run: |
|
||||
git submodule update --init
|
||||
- name: "Configuring"
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with: { submodules: recursive }
|
||||
- name: Configuring
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ${{ matrix.dev_mode }} ${{ matrix.no_libc }} ..
|
||||
- name: "Building"
|
||||
cmake -DZYAN_DEV_MODE=ON ${{ matrix.cmake_flags }} ..
|
||||
- name: Building
|
||||
run: |
|
||||
cmake --build build --config Release
|
||||
- name: "Running regression tests"
|
||||
- name: Running regression tests (decoder)
|
||||
run: |
|
||||
cd tests
|
||||
python3 regression.py test ../build/ZydisInfo
|
||||
if: "!matrix.no_libc && matrix.image_name != 'windows-2016'"
|
||||
- name: "Running regression tests"
|
||||
if: "matrix.image_name != 'windows-2022' && !matrix.skip_tests"
|
||||
- name: Running regression tests (encoder)
|
||||
run: |
|
||||
cd tests
|
||||
python3 regression_encoder.py ../build/ZydisFuzzReEncoding ../build/ZydisFuzzEncoder ../build/ZydisTestEncoderAbsolute
|
||||
if: "matrix.image_name != 'windows-2022' && !matrix.skip_tests"
|
||||
- name: Running regression tests
|
||||
run: |
|
||||
cd tests
|
||||
python regression.py test ..\\build\\Release\\ZydisInfo.exe
|
||||
if: "!matrix.no_libc && matrix.image_name == 'windows-2016'"
|
||||
if: "matrix.image_name == 'windows-2022' && !matrix.skip_tests"
|
||||
|
||||
msbuild-build:
|
||||
name: MSBuild build (windows-2022)
|
||||
runs-on: windows-2022
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with: { submodules: recursive }
|
||||
- name: Add msbuild to PATH
|
||||
uses: microsoft/setup-msbuild@v1.1.3
|
||||
with: { vs-version: '[17,]' }
|
||||
- name: Build user-mode
|
||||
run: |
|
||||
cd msvc
|
||||
msbuild.exe Zydis.sln /m /t:Rebuild '/p:Configuration="Release MD";Platform=X64'
|
||||
- name: Build kernel-mode
|
||||
run: |
|
||||
cd msvc
|
||||
msbuild.exe Zydis.sln /m /t:Rebuild '/p:Configuration="Release Kernel";Platform=X64'
|
||||
|
||||
amalgamated:
|
||||
name: Amalgamated build (Ubuntu 22.04)
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with: { submodules: recursive }
|
||||
- name: Amalgamating sources
|
||||
run: |
|
||||
./assets/amalgamate.py
|
||||
- name: Compiling library
|
||||
run: |
|
||||
cd amalgamated-dist
|
||||
gcc -shared -I. -fPIC -olibzydis.so Zydis.c
|
||||
|
||||
fuzzing:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
|
|
@ -51,13 +110,13 @@ jobs:
|
|||
id: build
|
||||
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
|
||||
with:
|
||||
oss-fuzz-project-name: 'zydis'
|
||||
oss-fuzz-project-name: zydis
|
||||
dry-run: false
|
||||
sanitizer: ${{ matrix.sanitizer }}
|
||||
- name: Run Fuzzers (${{ matrix.sanitizer }})
|
||||
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
|
||||
with:
|
||||
oss-fuzz-project-name: 'zydis'
|
||||
oss-fuzz-project-name: zydis
|
||||
fuzz-seconds: 600
|
||||
dry-run: false
|
||||
sanitizer: ${{ matrix.sanitizer }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue