mirror of
https://github.com/pound-emu/pound.git
synced 2025-12-25 04:36:59 +00:00
Introduces the first unit tests for the ARM32 JIT decoder. A new script automatically generates a test case for every instruction in arm32.inc, providing 100% of the isa. This also includes a critical rework of the decoder's lookup table generation logic. The previous hashing method was flawed, causing build-time overflows and incorrect instruction matching (shadowing) for patterns with wildcards. The new algorithm correctly populates the lookup table. Signed-off-by: Ronald Caesar <github43132@proton.me>
184 lines
5.9 KiB
YAML
184 lines
5.9 KiB
YAML
# Copyright 2025 Pound Emulator Project
|
|
|
|
name: Build
|
|
|
|
on: [push, pull_request]
|
|
|
|
concurrency:
|
|
group: ci-${{github.event_name}}-${{github.ref}}
|
|
cancel-in-progress: ${{github.event_name == 'push'}}
|
|
|
|
env:
|
|
BUILD_TYPE: Release
|
|
BUILD_DIR: ${{github.workspace}}/build
|
|
|
|
jobs:
|
|
get-info:
|
|
name: Info
|
|
runs-on: ubuntu-24.04
|
|
outputs:
|
|
shorthash: ${{steps.vars.outputs.shorthash}}
|
|
commit: ${{steps.vars.outputs.commit}}
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Commit Count and Git Hash
|
|
id: vars
|
|
run: |
|
|
echo "shorthash=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
|
echo "commit=$(git rev-list --count HEAD)" >> $GITHUB_ENV
|
|
echo "shorthash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
|
echo "commit=$(git rev-list --count HEAD)" >> $GITHUB_OUTPUT
|
|
|
|
Linux:
|
|
name: Linux
|
|
runs-on: ubuntu-24.04
|
|
needs: get-info
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
submodules: recursive
|
|
fetch-depth: 0
|
|
|
|
- name: Install Dependencies
|
|
run: |
|
|
sudo apt update
|
|
sudo apt-get remove --purge man-db
|
|
sudo apt install -y ninja-build clang lld cmake ccache \
|
|
libx11-dev libxext-dev libxrandr-dev libxcursor-dev \
|
|
libxi-dev libxinerama-dev libwayland-dev libxkbcommon-dev \
|
|
wayland-protocols libgl-dev git
|
|
|
|
- name: Configure CMake
|
|
run: cmake -G Ninja -B ${{env.BUILD_DIR}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
|
|
|
|
- name: Build
|
|
run: cmake --build ${{env.BUILD_DIR}} --config ${{env.BUILD_TYPE}} --parallel $(nproc)
|
|
|
|
- name: Prepare Artifact Folder
|
|
run: |
|
|
mkdir -p artifact
|
|
cp -r ${{env.BUILD_DIR}}/Pound artifact/Pound-x64-${{env.BUILD_TYPE}}
|
|
|
|
- name: Upload Linux Artifact
|
|
uses: actions/upload-artifact@main
|
|
with:
|
|
name: Pound-linux-x64-${{env.BUILD_TYPE}}-${{ needs.get-info.outputs.commit }}-${{needs.get-info.outputs.shorthash}}
|
|
path: artifact/
|
|
|
|
Windows:
|
|
name: Windows
|
|
runs-on: windows-2025
|
|
needs: get-info
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
submodules: recursive
|
|
fetch-depth: 0
|
|
|
|
- name: Configure CMake
|
|
run:
|
|
cmake -G Ninja -B "${{env.BUILD_DIR}}" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} `
|
|
-DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl `
|
|
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
|
|
|
- name: Build
|
|
run: cmake --build "${{env.BUILD_DIR}}" --config ${{env.BUILD_TYPE}} --parallel $env:NUMBER_OF_PROCESSORS
|
|
|
|
- name: Prepare Artifact Folder
|
|
run: |
|
|
mkdir -p artifact
|
|
cp -r ${{env.BUILD_DIR}}/Pound.exe artifact/Pound-x64-${{env.BUILD_TYPE}}.exe
|
|
|
|
- name: Upload Windows Artifact
|
|
uses: actions/upload-artifact@main
|
|
with:
|
|
name: Pound-win64-${{env.BUILD_TYPE}}-${{ needs.get-info.outputs.commit }}-${{needs.get-info.outputs.shorthash}}
|
|
path: artifact/
|
|
|
|
macOS-x86_64:
|
|
name: macOS x86_64
|
|
runs-on: macos-15-intel
|
|
needs: get-info
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
submodules: recursive
|
|
fetch-depth: 0
|
|
|
|
- name: Setup latest Xcode
|
|
uses: maxim-lobanov/setup-xcode@v1
|
|
with:
|
|
xcode-version: latest-stable
|
|
|
|
- name: Install Dependencies
|
|
run: |
|
|
brew install llvm@20
|
|
echo "CMAKE_PREFIX_PATH=/usr/local/opt/llvm@20" >> $GITHUB_ENV
|
|
|
|
- name: Configure CMake (x86_64)
|
|
run: >
|
|
cmake -G Ninja -B "${{env.BUILD_DIR}}"
|
|
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
|
|
-DCMAKE_OSX_ARCHITECTURES=x86_64
|
|
-DCMAKE_C_COMPILER=/usr/local/opt/llvm@20/bin/clang
|
|
-DCMAKE_CXX_COMPILER=/usr/local/opt/llvm@20/bin/clang++
|
|
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15
|
|
|
|
- name: Build (x86_64)
|
|
run: cmake --build "${{env.BUILD_DIR}}" --config ${{env.BUILD_TYPE}} --parallel $(sysctl -n hw.logicalcpu)
|
|
|
|
- name: Prepare Artifact Folder
|
|
run: |
|
|
mkdir -p artifact
|
|
cp -r ${{env.BUILD_DIR}}/Pound artifact/Pound-x86_64-macOS-${{env.BUILD_TYPE}}
|
|
|
|
- name: Upload Artifact
|
|
uses: actions/upload-artifact@main
|
|
with:
|
|
name: Pound-macOS-x86_64-${{env.BUILD_TYPE}}-${{ needs.get-info.outputs.commit }}-${{ needs.get-info.outputs.shorthash }}
|
|
path: artifact/
|
|
|
|
macOS-arm64:
|
|
name: macOS ARM64
|
|
runs-on: macos-14
|
|
needs: get-info
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
submodules: recursive
|
|
fetch-depth: 0
|
|
|
|
- name: Setup latest Xcode
|
|
uses: maxim-lobanov/setup-xcode@v1
|
|
with:
|
|
xcode-version: latest-stable
|
|
|
|
- name: Install Dependencies
|
|
run: |
|
|
brew install llvm@20
|
|
echo "CMAKE_PREFIX_PATH=/opt/homebrew/opt/llvm@20" >> $GITHUB_ENV
|
|
|
|
- name: Configure CMake (ARM64)
|
|
run: >
|
|
cmake -G Ninja -B "${{env.BUILD_DIR}}"
|
|
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
|
|
-DCMAKE_C_COMPILER=/opt/homebrew/opt/llvm@20/bin/clang
|
|
-DCMAKE_CXX_COMPILER=/opt/homebrew/opt/llvm@20/bin/clang++
|
|
-DCMAKE_OSX_ARCHITECTURES=arm64
|
|
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15
|
|
|
|
- name: Build (ARM64)
|
|
run: cmake --build "${{env.BUILD_DIR}}" --config ${{env.BUILD_TYPE}} --parallel $(sysctl -n hw.logicalcpu)
|
|
|
|
- name: Prepare Artifact Folder
|
|
run: |
|
|
mkdir -p artifact
|
|
cp -r ${{env.BUILD_DIR}}/Pound artifact/Pound-arm64-macOS-${{env.BUILD_TYPE}}
|
|
|
|
- name: Upload Artifact
|
|
uses: actions/upload-artifact@main
|
|
with:
|
|
name: Pound-macOS-arm64-${{env.BUILD_TYPE}}-${{ needs.get-info.outputs.commit }}-${{ needs.get-info.outputs.shorthash }}
|
|
path: artifact/
|