mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-01-09 07:58:16 +01:00
commit
cbeed6396f
394 changed files with 61415 additions and 39455 deletions
57
externals/zydis/.github/workflows/doc.yml
vendored
Normal file
57
externals/zydis/.github/workflows/doc.yml
vendored
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
name: Doc
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
build-and-publish-doc:
|
||||
name: Build and publish documentation
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0 # fetch all branches and tags
|
||||
- name: Install doxygen
|
||||
run: |
|
||||
sudo apt-get install -y doxygen
|
||||
- name: Download & install zydoc
|
||||
run: |
|
||||
wget -O zydoc.tar.gz https://github.com/zyantific/zydoc/releases/download/v0.3.2/zydoc_v0.3.2_x86_64-unknown-linux-musl.tar.gz
|
||||
tar xfv zydoc.tar.gz
|
||||
mv zydoc /usr/local/bin
|
||||
- name: Clone Doxygen theme
|
||||
run: >-
|
||||
git clone
|
||||
--depth=1 --branch=v2.1.0
|
||||
https://github.com/jothepro/doxygen-awesome-css.git
|
||||
/tmp/doxy-theme
|
||||
- name: Generate documentation
|
||||
run: >-
|
||||
zydoc
|
||||
--repo .
|
||||
--output-dir doc.zydis.re
|
||||
--config-ref master
|
||||
--doxyfile ./Doxyfile
|
||||
--refs 'refs/heads/master'
|
||||
--refs 'refs/tags/.*'
|
||||
--exclude-refs 'refs/tags/v1.*'
|
||||
--extra-css /tmp/doxy-theme/doxygen-awesome.css
|
||||
--extra-css /tmp/doxy-theme/doxygen-awesome-sidebar-only.css
|
||||
- name: Publish documentation
|
||||
uses: cpina/github-action-push-to-another-repository@v1.5
|
||||
env:
|
||||
SSH_DEPLOY_KEY: ${{ secrets.DOCS_ZYDIS_RE_SSH_DEPLOY_KEY }}
|
||||
with:
|
||||
source-directory: 'doc.zydis.re'
|
||||
destination-github-username: 'zyantific'
|
||||
destination-repository-name: 'doc.zydis.re'
|
||||
user-name: zydis-doc-bot
|
||||
user-email: doc-bot@zydis.re
|
||||
target-branch: main
|
||||
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