mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-11 16:46:16 +00:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/actions/checkout/releases">actions/checkout's releases</a>.</em></p> <blockquote> <h2>v5.0.0</h2> <h2>What's Changed</h2> <ul> <li>Update actions checkout to use node 24 by <a href="https://github.com/salmanmkc"><code>@salmanmkc</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2226">actions/checkout#2226</a></li> <li>Prepare v5.0.0 release by <a href="https://github.com/salmanmkc"><code>@salmanmkc</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2238">actions/checkout#2238</a></li> </ul> <h2>⚠️ Minimum Compatible Runner Version</h2> <p><strong>v2.327.1</strong><br /> <a href="https://github.com/actions/runner/releases/tag/v2.327.1">Release Notes</a></p> <p>Make sure your runner is updated to this version or newer to use this release.</p> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/checkout/compare/v4...v5.0.0">https://github.com/actions/checkout/compare/v4...v5.0.0</a></p> <h2>v4.3.0</h2> <h2>What's Changed</h2> <ul> <li>docs: update README.md by <a href="https://github.com/motss"><code>@motss</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1971">actions/checkout#1971</a></li> <li>Add internal repos for checking out multiple repositories by <a href="https://github.com/mouismail"><code>@mouismail</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1977">actions/checkout#1977</a></li> <li>Documentation update - add recommended permissions to Readme by <a href="https://github.com/benwells"><code>@benwells</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2043">actions/checkout#2043</a></li> <li>Adjust positioning of user email note and permissions heading by <a href="https://github.com/joshmgross"><code>@joshmgross</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2044">actions/checkout#2044</a></li> <li>Update README.md by <a href="https://github.com/nebuk89"><code>@nebuk89</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2194">actions/checkout#2194</a></li> <li>Update CODEOWNERS for actions by <a href="https://github.com/TingluoHuang"><code>@TingluoHuang</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2224">actions/checkout#2224</a></li> <li>Update package dependencies by <a href="https://github.com/salmanmkc"><code>@salmanmkc</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2236">actions/checkout#2236</a></li> <li>Prepare release v4.3.0 by <a href="https://github.com/salmanmkc"><code>@salmanmkc</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2237">actions/checkout#2237</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/motss"><code>@motss</code></a> made their first contribution in <a href="https://redirect.github.com/actions/checkout/pull/1971">actions/checkout#1971</a></li> <li><a href="https://github.com/mouismail"><code>@mouismail</code></a> made their first contribution in <a href="https://redirect.github.com/actions/checkout/pull/1977">actions/checkout#1977</a></li> <li><a href="https://github.com/benwells"><code>@benwells</code></a> made their first contribution in <a href="https://redirect.github.com/actions/checkout/pull/2043">actions/checkout#2043</a></li> <li><a href="https://github.com/nebuk89"><code>@nebuk89</code></a> made their first contribution in <a href="https://redirect.github.com/actions/checkout/pull/2194">actions/checkout#2194</a></li> <li><a href="https://github.com/salmanmkc"><code>@salmanmkc</code></a> made their first contribution in <a href="https://redirect.github.com/actions/checkout/pull/2236">actions/checkout#2236</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/checkout/compare/v4...v4.3.0">https://github.com/actions/checkout/compare/v4...v4.3.0</a></p> <h2>v4.2.2</h2> <h2>What's Changed</h2> <ul> <li><code>url-helper.ts</code> now leverages well-known environment variables by <a href="https://github.com/jww3"><code>@jww3</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1941">actions/checkout#1941</a></li> <li>Expand unit test coverage for <code>isGhes</code> by <a href="https://github.com/jww3"><code>@jww3</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1946">actions/checkout#1946</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/checkout/compare/v4.2.1...v4.2.2">https://github.com/actions/checkout/compare/v4.2.1...v4.2.2</a></p> <h2>v4.2.1</h2> <h2>What's Changed</h2> <ul> <li>Check out other refs/* by commit if provided, fall back to ref by <a href="https://github.com/orhantoy"><code>@orhantoy</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1924">actions/checkout#1924</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/Jcambass"><code>@Jcambass</code></a> made their first contribution in <a href="https://redirect.github.com/actions/checkout/pull/1919">actions/checkout#1919</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/checkout/compare/v4.2.0...v4.2.1">https://github.com/actions/checkout/compare/v4.2.0...v4.2.1</a></p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/actions/checkout/blob/main/CHANGELOG.md">actions/checkout's changelog</a>.</em></p> <blockquote> <h1>Changelog</h1> <h2>V5.0.0</h2> <ul> <li>Update actions checkout to use node 24 by <a href="https://github.com/salmanmkc"><code>@salmanmkc</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2226">actions/checkout#2226</a></li> </ul> <h2>V4.3.0</h2> <ul> <li>docs: update README.md by <a href="https://github.com/motss"><code>@motss</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1971">actions/checkout#1971</a></li> <li>Add internal repos for checking out multiple repositories by <a href="https://github.com/mouismail"><code>@mouismail</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1977">actions/checkout#1977</a></li> <li>Documentation update - add recommended permissions to Readme by <a href="https://github.com/benwells"><code>@benwells</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2043">actions/checkout#2043</a></li> <li>Adjust positioning of user email note and permissions heading by <a href="https://github.com/joshmgross"><code>@joshmgross</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2044">actions/checkout#2044</a></li> <li>Update README.md by <a href="https://github.com/nebuk89"><code>@nebuk89</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2194">actions/checkout#2194</a></li> <li>Update CODEOWNERS for actions by <a href="https://github.com/TingluoHuang"><code>@TingluoHuang</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2224">actions/checkout#2224</a></li> <li>Update package dependencies by <a href="https://github.com/salmanmkc"><code>@salmanmkc</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/2236">actions/checkout#2236</a></li> </ul> <h2>v4.2.2</h2> <ul> <li><code>url-helper.ts</code> now leverages well-known environment variables by <a href="https://github.com/jww3"><code>@jww3</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1941">actions/checkout#1941</a></li> <li>Expand unit test coverage for <code>isGhes</code> by <a href="https://github.com/jww3"><code>@jww3</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1946">actions/checkout#1946</a></li> </ul> <h2>v4.2.1</h2> <ul> <li>Check out other refs/* by commit if provided, fall back to ref by <a href="https://github.com/orhantoy"><code>@orhantoy</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1924">actions/checkout#1924</a></li> </ul> <h2>v4.2.0</h2> <ul> <li>Add Ref and Commit outputs by <a href="https://github.com/lucacome"><code>@lucacome</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1180">actions/checkout#1180</a></li> <li>Dependency updates by <a href="https://github.com/dependabot"><code>@dependabot</code></a>- <a href="https://redirect.github.com/actions/checkout/pull/1777">actions/checkout#1777</a>, <a href="https://redirect.github.com/actions/checkout/pull/1872">actions/checkout#1872</a></li> </ul> <h2>v4.1.7</h2> <ul> <li>Bump the minor-npm-dependencies group across 1 directory with 4 updates by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1739">actions/checkout#1739</a></li> <li>Bump actions/checkout from 3 to 4 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1697">actions/checkout#1697</a></li> <li>Check out other refs/* by commit by <a href="https://github.com/orhantoy"><code>@orhantoy</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1774">actions/checkout#1774</a></li> <li>Pin actions/checkout's own workflows to a known, good, stable version. by <a href="https://github.com/jww3"><code>@jww3</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1776">actions/checkout#1776</a></li> </ul> <h2>v4.1.6</h2> <ul> <li>Check platform to set archive extension appropriately by <a href="https://github.com/cory-miller"><code>@cory-miller</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1732">actions/checkout#1732</a></li> </ul> <h2>v4.1.5</h2> <ul> <li>Update NPM dependencies by <a href="https://github.com/cory-miller"><code>@cory-miller</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1703">actions/checkout#1703</a></li> <li>Bump github/codeql-action from 2 to 3 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1694">actions/checkout#1694</a></li> <li>Bump actions/setup-node from 1 to 4 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1696">actions/checkout#1696</a></li> <li>Bump actions/upload-artifact from 2 to 4 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1695">actions/checkout#1695</a></li> <li>README: Suggest <code>user.email</code> to be <code>41898282+github-actions[bot]@users.noreply.github.com</code> by <a href="https://github.com/cory-miller"><code>@cory-miller</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1707">actions/checkout#1707</a></li> </ul> <h2>v4.1.4</h2> <ul> <li>Disable <code>extensions.worktreeConfig</code> when disabling <code>sparse-checkout</code> by <a href="https://github.com/jww3"><code>@jww3</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1692">actions/checkout#1692</a></li> <li>Add dependabot config by <a href="https://github.com/cory-miller"><code>@cory-miller</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1688">actions/checkout#1688</a></li> <li>Bump the minor-actions-dependencies group with 2 updates by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1693">actions/checkout#1693</a></li> <li>Bump word-wrap from 1.2.3 to 1.2.5 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/actions/checkout/pull/1643">actions/checkout#1643</a></li> </ul> <h2>v4.1.3</h2> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="08c6903cd8"><code>08c6903</code></a> Prepare v5.0.0 release (<a href="https://redirect.github.com/actions/checkout/issues/2238">#2238</a>)</li> <li><a href="9f265659d3"><code>9f26565</code></a> Update actions checkout to use node 24 (<a href="https://redirect.github.com/actions/checkout/issues/2226">#2226</a>)</li> <li>See full diff in <a href="https://github.com/actions/checkout/compare/v4...v5">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>
751 lines
24 KiB
YAML
751 lines
24 KiB
YAML
name: Build
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "0 0 * * *"
|
|
push:
|
|
branches:
|
|
- "**"
|
|
pull_request:
|
|
branches:
|
|
- "**"
|
|
types: [opened, synchronize, reopened]
|
|
workflow_dispatch:
|
|
inputs:
|
|
verbose:
|
|
description: "Enable verbose logging during tests"
|
|
type: choice
|
|
required: false
|
|
default: "false"
|
|
options:
|
|
- "true"
|
|
- "false"
|
|
|
|
permissions:
|
|
contents: read
|
|
actions: write
|
|
|
|
concurrency:
|
|
group: ${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
clang-tidy:
|
|
name: Run Clang Tidy
|
|
runs-on: ubuntu-24.04
|
|
env:
|
|
LLVM_VERSION: 20
|
|
steps:
|
|
- name: Checkout Source
|
|
uses: actions/checkout@v5
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Install Ninja
|
|
uses: seanmiddleditch/gha-setup-ninja@v6
|
|
|
|
- name: Install Clang
|
|
run: |
|
|
wget https://apt.llvm.org/llvm.sh
|
|
chmod +x llvm.sh
|
|
sudo ./llvm.sh ${{ env.LLVM_VERSION }}
|
|
sudo apt install -y clang-tidy-${{ env.LLVM_VERSION }}
|
|
sudo apt install -y clang-${{ env.LLVM_VERSION }} lld-${{ env.LLVM_VERSION }}
|
|
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang-${{ env.LLVM_VERSION }} 100
|
|
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-${{ env.LLVM_VERSION }} 100
|
|
sudo update-alternatives --set cc /usr/bin/clang-${{ env.LLVM_VERSION }}
|
|
sudo update-alternatives --set c++ /usr/bin/clang++-${{ env.LLVM_VERSION }}
|
|
|
|
- name: CMake Build
|
|
run: cmake --preset=release -DMOMO_ENABLE_CLANG_TIDY=On && cmake --build --preset=release
|
|
|
|
verify-formatting:
|
|
name: Verify Formatting
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: Checkout Source
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Verify Formatting
|
|
uses: jidicula/clang-format-action@v4.15.0
|
|
with:
|
|
clang-format-version: "20"
|
|
|
|
- name: Verify Page Formatting
|
|
run: cd page && npx --yes prettier . --check
|
|
|
|
build-apiset-dumper:
|
|
name: Build API Set Dumper
|
|
runs-on: windows-latest
|
|
steps:
|
|
- name: Checkout Source
|
|
uses: actions/checkout@v5
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Install Ninja
|
|
uses: seanmiddleditch/gha-setup-ninja@v6
|
|
|
|
- name: Enable Developer Command Prompt
|
|
uses: ilammy/msvc-dev-cmd@v1.13.0
|
|
|
|
- name: CMake Build
|
|
run: cmake --preset=release && cmake --build --preset=release -t dump-apiset
|
|
|
|
- name: Upload Artifacts
|
|
uses: pyTooling/upload-artifact@v4
|
|
with:
|
|
name: Temp API Set Dumper
|
|
working-directory: build/release/artifacts/
|
|
path: "*"
|
|
retention-days: 1
|
|
|
|
create-emulation-root:
|
|
name: Create Emulation Root
|
|
runs-on: ${{ matrix.runner }}
|
|
needs: [build-apiset-dumper]
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
platform:
|
|
- Windows 2025
|
|
- Windows 2022
|
|
#- Windows 2019
|
|
include:
|
|
- platform: Windows 2025
|
|
runner: windows-2025
|
|
- platform: Windows 2022
|
|
runner: windows-2022
|
|
#- platform: Windows 2019
|
|
# runner: windows-2019
|
|
steps:
|
|
- name: Checkout Source
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Download DirectX Runtime
|
|
run: curl --connect-timeout 20 --max-time 200 --retry 5 --retry-delay 2 --retry-max-time 200 -L -o directx_Jun2010_redist.exe https://download.microsoft.com/download/8/4/A/84A35BF1-DAFE-4AE8-82AF-AD2AE20B6B14/directx_Jun2010_redist.exe
|
|
|
|
- name: Extract DirectX Runtime
|
|
run: 'cmd /c "start /wait directx_Jun2010_redist.exe /Q /T:${{github.workspace}}/dxrt"'
|
|
|
|
- name: Install DirectX Runtime
|
|
run: "cmd /c \"start /wait .\\dxrt\\dxsetup.exe /silent\""
|
|
|
|
- name: Download API Set Dumper
|
|
uses: pyTooling/download-artifact@v4
|
|
with:
|
|
name: Temp API Set Dumper
|
|
path: build/release/artifacts
|
|
|
|
- name: Create Emulation Root
|
|
run: src/tools/create-root.bat
|
|
|
|
- name: Dump API Set
|
|
run: cd root && ../build/release/artifacts/dump-apiset.exe
|
|
|
|
- name: Upload Artifacts
|
|
uses: pyTooling/upload-artifact@v4
|
|
with:
|
|
name: ${{ matrix.platform }} Emulation Root
|
|
path: "*"
|
|
working-directory: root
|
|
retention-days: 1
|
|
|
|
build:
|
|
name: Build
|
|
runs-on: ${{ matrix.runner }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
platform:
|
|
- Windows x86
|
|
- Windows x86_64
|
|
- MinGW x86_64
|
|
- Linux x86_64 GCC
|
|
- Linux x86_64 GCC Sanitizer
|
|
- Linux x86_64 Clang
|
|
- macOS arm64
|
|
- macOS x86_64
|
|
- iOS arm64
|
|
- Android x86_64
|
|
- Android arm64-v8a
|
|
- Emscripten Web
|
|
- Emscripten Web Memory 64
|
|
- Emscripten Node.js
|
|
configuration:
|
|
#- Debug
|
|
- Release
|
|
include:
|
|
#- configuration: Debug
|
|
# preset: debug
|
|
- configuration: Release
|
|
preset: release
|
|
- platform: Windows x86
|
|
runner: windows-latest
|
|
devcmd_arch: x86
|
|
- platform: Windows x86_64
|
|
runner: windows-latest
|
|
devcmd_arch: x64
|
|
- platform: MinGW x86_64
|
|
runner: ubuntu-24.04
|
|
rust-target: x86_64-pc-windows-gnu
|
|
cmake-options: "-DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/cmake/toolchain/mingw-w64.cmake"
|
|
- platform: Linux x86_64 GCC Sanitizer
|
|
runner: ubuntu-24.04
|
|
cmake-options: "-DMOMO_ENABLE_SANITIZER=On"
|
|
- platform: Linux x86_64 GCC
|
|
runner: ubuntu-24.04
|
|
- platform: Linux x86_64 Clang
|
|
runner: ubuntu-24.04
|
|
clang-version: 20
|
|
- platform: iOS arm64
|
|
runner: macos-latest
|
|
rust-target: aarch64-apple-ios
|
|
cmake-options: "-DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/cmake/toolchain/ios.cmake"
|
|
- platform: macOS arm64
|
|
runner: macos-latest
|
|
- platform: macOS x86_64
|
|
runner: macos-13
|
|
- platform: Android x86_64
|
|
runner: ubuntu-24.04
|
|
abi: x86_64
|
|
rust-target: x86_64-linux-android
|
|
cmake-options: "-DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/cmake/toolchain/android-ndk.cmake"
|
|
- platform: Android arm64-v8a
|
|
runner: ubuntu-24.04
|
|
abi: arm64-v8a
|
|
rust-target: aarch64-linux-android
|
|
cmake-options: "-DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/cmake/toolchain/android-ndk.cmake"
|
|
- platform: Emscripten Web
|
|
runner: ubuntu-24.04
|
|
cmake-options: "-DMOMO_ENABLE_RUST_CODE=Off -DCMAKE_TOOLCHAIN_FILE=$(dirname $(which emcc))/cmake/Modules/Platform/Emscripten.cmake"
|
|
- platform: Emscripten Web Memory 64
|
|
runner: ubuntu-24.04
|
|
cmake-options: "-DMOMO_ENABLE_RUST_CODE=Off -DMOMO_EMSCRIPTEN_MEMORY64=On -DCMAKE_TOOLCHAIN_FILE=$(dirname $(which emcc))/cmake/Modules/Platform/Emscripten.cmake"
|
|
- platform: Emscripten Node.js
|
|
runner: ubuntu-24.04
|
|
cmake-options: "-DMOMO_EMSCRIPTEN_SUPPORT_NODEJS=On -DMOMO_ENABLE_RUST_CODE=Off -DCMAKE_TOOLCHAIN_FILE=$(dirname $(which emcc))/cmake/Modules/Platform/Emscripten.cmake"
|
|
steps:
|
|
- name: Checkout Source
|
|
uses: actions/checkout@v5
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Install Ninja
|
|
uses: seanmiddleditch/gha-setup-ninja@v6
|
|
|
|
- name: Install Rust Target
|
|
if: "${{ matrix.rust-target }}"
|
|
run: rustup target add ${{ matrix.rust-target }}
|
|
|
|
- name: Install Emscripten
|
|
if: "${{ startsWith(matrix.platform, 'Emscripten') }}"
|
|
uses: mymindstorm/setup-emsdk@v14
|
|
|
|
- name: Install Clang
|
|
if: "${{ matrix.platform == 'Linux x86_64 Clang' }}"
|
|
run: |
|
|
wget https://apt.llvm.org/llvm.sh
|
|
chmod +x llvm.sh
|
|
sudo ./llvm.sh ${{ matrix.clang-version }}
|
|
sudo apt install -y clang-${{ matrix.clang-version }} lld-${{ matrix.clang-version }}
|
|
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang-${{ matrix.clang-version }} 100
|
|
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-${{ matrix.clang-version }} 100
|
|
sudo update-alternatives --set cc /usr/bin/clang-${{ matrix.clang-version }}
|
|
sudo update-alternatives --set c++ /usr/bin/clang++-${{ matrix.clang-version }}
|
|
|
|
- name: Set up MinGW
|
|
uses: egor-tensin/setup-mingw@v2
|
|
if: "${{ startsWith(matrix.platform, 'MinGW') }}"
|
|
with:
|
|
platform: x64
|
|
|
|
- name: Enable Developer Command Prompt
|
|
uses: ilammy/msvc-dev-cmd@v1.13.0
|
|
if: ${{ startsWith(matrix.platform, 'Windows') }}
|
|
with:
|
|
arch: ${{ matrix.devcmd_arch }}
|
|
|
|
- uses: nttld/setup-ndk@v1
|
|
id: setup-ndk
|
|
if: ${{ startsWith(matrix.platform, 'Android') }}
|
|
with:
|
|
ndk-version: r26d
|
|
add-to-path: false
|
|
|
|
- name: Setup Android Environment Variables
|
|
shell: bash
|
|
if: ${{ startsWith(matrix.platform, 'Android') }}
|
|
run: |
|
|
echo "ANDROID_NDK_ROOT=${{ steps.setup-ndk.outputs.ndk-path }}" >> $GITHUB_ENV
|
|
echo "ANDROID_ABI=${{ matrix.abi }}" >> $GITHUB_ENV
|
|
|
|
- name: CMake Build
|
|
run: cmake --preset=${{matrix.preset}} ${{matrix.cmake-options}} && cmake --build --preset=${{matrix.preset}}
|
|
|
|
- name: Upload Artifacts
|
|
uses: pyTooling/upload-artifact@v4
|
|
with:
|
|
name: ${{ matrix.platform }} ${{matrix.configuration}} Artifacts
|
|
working-directory: build/${{matrix.preset}}/artifacts/
|
|
path: "*"
|
|
retention-days: 1
|
|
|
|
- name: Upload Test Configuration
|
|
uses: actions/upload-artifact@v4.6.2
|
|
with:
|
|
name: Temp ${{ matrix.platform }} ${{matrix.configuration}} Test Config
|
|
path: "build/${{matrix.preset}}/**/CTestTestfile.cmake"
|
|
retention-days: 1
|
|
|
|
# Release is the same as Release from build step
|
|
# However, that way the win tests can start without
|
|
# waiting for other platforms
|
|
build-isolate:
|
|
name: Build Isolate
|
|
runs-on: ${{ matrix.runner }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
platform:
|
|
- Windows x86_64
|
|
configuration:
|
|
- Debug
|
|
- Release
|
|
include:
|
|
- configuration: Debug
|
|
preset: debug
|
|
- configuration: Release
|
|
preset: release
|
|
- platform: Windows x86_64
|
|
runner: windows-latest
|
|
devcmd_arch: x64
|
|
steps:
|
|
- name: Checkout Source
|
|
uses: actions/checkout@v5
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Install Ninja
|
|
uses: seanmiddleditch/gha-setup-ninja@v6
|
|
|
|
- name: Enable Developer Command Prompt
|
|
uses: ilammy/msvc-dev-cmd@v1.13.0
|
|
if: ${{ startsWith(matrix.platform, 'Windows') }}
|
|
with:
|
|
arch: ${{ matrix.devcmd_arch }}
|
|
|
|
- name: CMake Build
|
|
run: cmake --preset=${{matrix.preset}} ${{matrix.cmake-options}} && cmake --build --preset=${{matrix.preset}}
|
|
|
|
- name: Upload Artifacts
|
|
uses: pyTooling/upload-artifact@v4
|
|
with:
|
|
name: Temp Isolate ${{ matrix.platform }} ${{matrix.configuration}} Artifacts
|
|
working-directory: build/${{matrix.preset}}/artifacts/
|
|
path: "*"
|
|
retention-days: 1
|
|
|
|
- name: Upload Test Configuration
|
|
uses: actions/upload-artifact@v4.6.2
|
|
with:
|
|
name: Temp Isolate ${{ matrix.platform }} ${{matrix.configuration}} Test Config
|
|
path: "build/${{matrix.preset}}/**/CTestTestfile.cmake"
|
|
retention-days: 1
|
|
|
|
test:
|
|
name: Test
|
|
runs-on: ${{ matrix.runner }}
|
|
needs: [create-emulation-root, build]
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
platform:
|
|
- Windows x86
|
|
- Windows x86_64
|
|
- Linux x86_64 GCC
|
|
- Linux x86_64 GCC Sanitizer
|
|
- Linux x86_64 Clang
|
|
- macOS arm64
|
|
- macOS x86_64
|
|
emulator:
|
|
- Unicorn
|
|
- Icicle
|
|
emulation-root:
|
|
#- Windows 2025
|
|
- Windows 2022
|
|
#- Windows 2019
|
|
configuration:
|
|
#- Debug
|
|
- Release
|
|
include:
|
|
#- configuration: Debug
|
|
# preset: debug
|
|
- configuration: Release
|
|
preset: release
|
|
- platform: Windows x86
|
|
runner: windows-latest
|
|
- platform: Windows x86_64
|
|
runner: windows-latest
|
|
- platform: Linux x86_64 GCC
|
|
runner: ubuntu-24.04
|
|
- platform: Linux x86_64 GCC Sanitizer
|
|
runner: ubuntu-24.04
|
|
- platform: Linux x86_64 Clang
|
|
runner: ubuntu-24.04
|
|
- platform: macOS arm64
|
|
runner: macos-latest
|
|
- platform: macOS x86_64
|
|
runner: macos-13
|
|
steps:
|
|
- name: Checkout Source
|
|
uses: actions/checkout@v5
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Setup Environment Variables
|
|
shell: bash
|
|
run: |
|
|
echo "RUST_BACKTRACE=1" >> $GITHUB_ENV
|
|
echo "ASAN_OPTIONS=detect_odr_violation=0" >> $GITHUB_ENV
|
|
echo "EMULATOR_ICICLE=${{ matrix.emulator == 'Icicle' }}" >> $GITHUB_ENV
|
|
|
|
- name: Download Test Configuration
|
|
uses: actions/download-artifact@v5.0.0
|
|
with:
|
|
name: Temp ${{ matrix.platform }} ${{matrix.configuration}} Test Config
|
|
path: build/${{matrix.preset}}
|
|
|
|
- name: Download Artifacts
|
|
uses: pyTooling/download-artifact@v4
|
|
with:
|
|
name: ${{ matrix.platform }} ${{matrix.configuration}} Artifacts
|
|
path: build/${{matrix.preset}}/artifacts
|
|
|
|
- name: Download Windows Artifacts
|
|
uses: pyTooling/download-artifact@v4
|
|
if: "${{ matrix.platform != 'Windows x86_64' }}"
|
|
with:
|
|
name: Windows x86_64 Release Artifacts
|
|
path: build/${{matrix.preset}}/artifacts
|
|
|
|
- name: Download Emulation Root
|
|
uses: pyTooling/download-artifact@v4
|
|
with:
|
|
name: ${{ matrix.emulation-root }} Emulation Root
|
|
path: build/${{matrix.preset}}/artifacts/root
|
|
|
|
- name: Copy Test Sample
|
|
run: cp build/${{matrix.preset}}/artifacts/test-sample.exe build/${{matrix.preset}}/artifacts/root/filesys/c/
|
|
|
|
- name: CMake Test
|
|
if: ${{ matrix.emulator != 'Icicle' || matrix.platform != 'Windows x86' }}
|
|
run: cd build/${{matrix.preset}} && ctest --verbose -j
|
|
env:
|
|
EMULATOR_ROOT: ${{github.workspace}}/build/${{matrix.preset}}/artifacts/root
|
|
EMULATOR_VERBOSE: ${{ github.event.inputs.verbose }}
|
|
ANALYSIS_SAMPLE: ${{github.workspace}}/build/${{matrix.preset}}/artifacts/test-sample.exe
|
|
|
|
win-test:
|
|
name: Windows Test
|
|
runs-on: windows-latest
|
|
needs: [create-emulation-root, build-isolate]
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
configuration:
|
|
- Debug
|
|
- Release
|
|
emulator:
|
|
- Unicorn
|
|
- Icicle
|
|
emulation-root:
|
|
- Windows 2025
|
|
- Windows 2022
|
|
#- Windows 2019
|
|
include:
|
|
- configuration: Debug
|
|
preset: debug
|
|
- configuration: Release
|
|
preset: release
|
|
steps:
|
|
- name: Checkout Source
|
|
uses: actions/checkout@v5
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Setup Environment Variables
|
|
shell: bash
|
|
run: |
|
|
echo "RUST_BACKTRACE=1" >> $GITHUB_ENV
|
|
echo "ASAN_OPTIONS=detect_odr_violation=0" >> $GITHUB_ENV
|
|
echo "EMULATOR_ICICLE=${{ matrix.emulator == 'Icicle' }}" >> $GITHUB_ENV
|
|
|
|
- name: Download Test Configuration
|
|
uses: actions/download-artifact@v5.0.0
|
|
with:
|
|
name: Temp Isolate Windows x86_64 ${{ matrix.configuration}} Test Config
|
|
path: build/${{ matrix.preset }}
|
|
|
|
- name: Download Artifacts
|
|
uses: pyTooling/download-artifact@v4
|
|
with:
|
|
name: Temp Isolate Windows x86_64 ${{ matrix.configuration}} Artifacts
|
|
path: build/${{ matrix.preset }}/artifacts
|
|
|
|
- name: Download Emulation Root
|
|
uses: pyTooling/download-artifact@v4
|
|
with:
|
|
name: ${{ matrix.emulation-root }} Emulation Root
|
|
path: build/${{ matrix.preset }}/artifacts/root
|
|
|
|
- name: Copy Test Sample
|
|
run: cp build/${{ matrix.preset }}/artifacts/test-sample.exe build/${{ matrix.preset }}/artifacts/root/filesys/c/
|
|
|
|
- name: CMake Test
|
|
run: cd build/${{ matrix.preset }} && ctest --verbose -j
|
|
env:
|
|
EMULATOR_ROOT: ${{github.workspace}}/build/${{ matrix.preset }}/artifacts/root
|
|
EMULATOR_VERBOSE: ${{ github.event.inputs.verbose }}
|
|
ANALYSIS_SAMPLE: ${{github.workspace}}/build/${{ matrix.preset }}/artifacts/test-sample.exe
|
|
|
|
smoke-test-node:
|
|
name: Smoke Test Node.js
|
|
runs-on: ubuntu-24.04
|
|
needs: [create-emulation-root, build]
|
|
steps:
|
|
- name: Download Artifacts
|
|
uses: pyTooling/download-artifact@v4
|
|
with:
|
|
name: Emscripten Node.js Release Artifacts
|
|
path: build/release/artifacts
|
|
|
|
- name: Download Windows Artifacts
|
|
uses: pyTooling/download-artifact@v4
|
|
with:
|
|
name: Windows x86_64 Release Artifacts
|
|
path: build/release/artifacts
|
|
|
|
- name: Download Emulation Root
|
|
uses: pyTooling/download-artifact@v4
|
|
with:
|
|
name: Windows 2022 Emulation Root
|
|
path: build/release/artifacts/root
|
|
|
|
- name: Copy Test Sample
|
|
run: cp build/release/artifacts/test-sample.exe build/release/artifacts/root/filesys/c/
|
|
|
|
- name: CMake Test
|
|
run: cd build/release/artifacts && node ./windows-emulator-test.js
|
|
env:
|
|
EMULATOR_ROOT: ${{github.workspace}}/build/release/artifacts/root
|
|
EMULATOR_VERBOSE: ${{ github.event.inputs.verbose }}
|
|
|
|
smoke-test-mingw:
|
|
name: Smoke Test MinGW x86_64
|
|
runs-on: windows-latest
|
|
needs: [create-emulation-root, build]
|
|
steps:
|
|
- name: Download Artifacts
|
|
uses: pyTooling/download-artifact@v4
|
|
with:
|
|
name: MinGW x86_64 Release Artifacts
|
|
path: build/release/artifacts
|
|
|
|
- name: Download Emulation Root
|
|
uses: pyTooling/download-artifact@v4
|
|
with:
|
|
name: Windows 2022 Emulation Root
|
|
path: build/release/artifacts/root
|
|
|
|
- name: Copy Test Sample
|
|
run: cp build/release/artifacts/test-sample.exe build/release/artifacts/root/filesys/c/
|
|
|
|
- name: CMake Test
|
|
run: cd build/release/artifacts && ./windows-emulator-test.exe && ./analyzer.exe -e root c:/test-sample.exe
|
|
env:
|
|
EMULATOR_ROOT: ${{github.workspace}}/build/release/artifacts/root
|
|
EMULATOR_VERBOSE: ${{ github.event.inputs.verbose }}
|
|
|
|
smoke-test-android:
|
|
name: Smoke Test Android
|
|
runs-on: ${{ matrix.runner }}
|
|
needs: [create-emulation-root, build]
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
architecture:
|
|
- x86_64
|
|
#- arm64-v8a
|
|
emulator:
|
|
- Unicorn
|
|
- Icicle
|
|
emulation-root:
|
|
#- Windows 2025
|
|
- Windows 2022
|
|
#- Windows 2019
|
|
configuration:
|
|
#- Debug
|
|
- Release
|
|
include:
|
|
#- configuration: Debug
|
|
# preset: debug
|
|
- configuration: Release
|
|
preset: release
|
|
- architecture: x86_64
|
|
runner: ubuntu-24.04
|
|
#- architecture: arm64-v8a
|
|
# runner: macos-latest
|
|
steps:
|
|
- name: Enable KVM
|
|
if: ${{ startsWith(matrix.runner, 'ubuntu') }}
|
|
run: |
|
|
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
|
|
sudo udevadm control --reload-rules
|
|
sudo udevadm trigger --name-match=kvm
|
|
|
|
- name: Download Artifacts
|
|
uses: pyTooling/download-artifact@v4
|
|
with:
|
|
name: Android ${{matrix.architecture}} ${{matrix.configuration}} Artifacts
|
|
path: build/${{matrix.preset}}/artifacts
|
|
|
|
- name: Download Windows Artifacts
|
|
uses: pyTooling/download-artifact@v4
|
|
with:
|
|
name: Windows x86_64 Release Artifacts
|
|
path: build/${{matrix.preset}}/artifacts
|
|
|
|
- name: Download Emulation Root
|
|
uses: pyTooling/download-artifact@v4
|
|
with:
|
|
name: ${{ matrix.emulation-root }} Emulation Root
|
|
path: build/${{matrix.preset}}/artifacts/root
|
|
|
|
- name: Copy Test Sample
|
|
run: cp build/${{matrix.preset}}/artifacts/test-sample.exe build/${{matrix.preset}}/artifacts/root/filesys/c/
|
|
|
|
- name: Run Test
|
|
uses: reactivecircus/android-emulator-runner@v2.34.0
|
|
with:
|
|
api-level: 29
|
|
arch: ${{matrix.architecture}}
|
|
script: 'adb push build/${{matrix.preset}}/artifacts/* /data/local/tmp && adb shell "cd /data/local/tmp && export LD_LIBRARY_PATH=. && chmod +x ./analyzer && EMULATOR_ICICLE=${{ matrix.emulator == ''Icicle'' }} ./analyzer -e ./root c:/test-sample.exe"'
|
|
|
|
build-page:
|
|
name: Build Page
|
|
runs-on: ubuntu-latest
|
|
needs: [create-emulation-root, build]
|
|
steps:
|
|
- name: Checkout Source
|
|
uses: actions/checkout@v5
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Download Emscripten Web Artifacts
|
|
uses: pyTooling/download-artifact@v4
|
|
with:
|
|
name: Emscripten Web Release Artifacts
|
|
path: build/release/artifacts/32
|
|
|
|
- name: Download Emscripten Web Memory 64 Artifacts
|
|
uses: pyTooling/download-artifact@v4
|
|
with:
|
|
name: Emscripten Web Memory 64 Release Artifacts
|
|
path: build/release/artifacts/64
|
|
|
|
- name: Download Windows Artifacts
|
|
uses: pyTooling/download-artifact@v4
|
|
with:
|
|
name: Windows x86_64 Release Artifacts
|
|
path: build/release/artifacts
|
|
|
|
- name: Download Emulation Root
|
|
uses: pyTooling/download-artifact@v4
|
|
with:
|
|
name: Windows 2022 Emulation Root
|
|
path: build/release/artifacts/root
|
|
|
|
- name: Copy Sample
|
|
run: cp ./build/release/artifacts/test-sample.exe build/release/artifacts/root/filesys/c/
|
|
|
|
- name: Create Emulation Root zip
|
|
run: cd ./build/release/artifacts && zip -r "${{github.workspace}}/page/public/root.zip" ./root
|
|
|
|
- name: Copy Files
|
|
run: |
|
|
mkdir -p ./page/public/32/
|
|
mkdir -p ./page/public/64/
|
|
cp ./build/release/artifacts/32/analyzer.js ./page/public/32/
|
|
cp ./build/release/artifacts/32/analyzer.wasm ./page/public/32/
|
|
cp ./build/release/artifacts/64/analyzer.js ./page/public/64/
|
|
cp ./build/release/artifacts/64/analyzer.wasm ./page/public/64/
|
|
|
|
- name: Build Page
|
|
run: cd ./page && npm i && npm run build
|
|
|
|
- name: Upload Page Artifacts
|
|
uses: pyTooling/upload-artifact@v4
|
|
with:
|
|
name: Page Artifacts
|
|
working-directory: page/dist/
|
|
path: "*"
|
|
retention-days: 1
|
|
|
|
deploy-page:
|
|
name: Deploy Page
|
|
runs-on: ubuntu-latest
|
|
needs: [build-page, summary]
|
|
if: github.repository_owner == 'momo5502' && github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
steps:
|
|
- name: Download Page Artifacts
|
|
uses: pyTooling/download-artifact@v4
|
|
with:
|
|
name: Page Artifacts
|
|
path: ./page/dist/
|
|
|
|
- name: Setup Pages
|
|
uses: actions/configure-pages@v5
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-pages-artifact@v3
|
|
with:
|
|
path: ./page/dist
|
|
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@v4
|
|
|
|
summary:
|
|
name: Pipeline Summary
|
|
runs-on: ubuntu-24.04
|
|
needs:
|
|
[
|
|
build-page,
|
|
clang-tidy,
|
|
build-apiset-dumper,
|
|
smoke-test-node,
|
|
smoke-test-mingw,
|
|
smoke-test-android,
|
|
create-emulation-root,
|
|
build,
|
|
build-isolate,
|
|
test,
|
|
win-test,
|
|
verify-formatting,
|
|
]
|
|
if: always()
|
|
steps:
|
|
- uses: geekyeggo/delete-artifact@v5
|
|
continue-on-error: true
|
|
with:
|
|
name: "Temp *"
|
|
|
|
- name: Pipeline failed
|
|
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
|
|
run: exit 1
|