Skip to content

Add ARM64 support

Add ARM64 support #298

Workflow file for this run

name: Builds
on: [push, pull_request]
jobs:
testdatas:
env:
TESTDATA_URL: https://github.com/0vercl0k/kdmp-parser/releases/download/v0.1/testdatas.7z
name: Fetch Test Data
runs-on: ubuntu-latest
steps:
- name: Cache Artifacts
id: cache-testdatas
uses: actions/cache@v4
with:
key: kdmp-parser-testdatas-cache
path: .
- if: steps.cache-testdatas.outputs.cache-hit != 'true'
run: |
sudo apt-get -y update; sudo apt-get install -y p7zip-full;
curl ${{ env.TESTDATA_URL }} -O -L
7z x testdatas.7z; rm testdatas.7z
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: kdmp-parser-testdatas-cache
path: .
parser:
needs: testdatas
strategy:
fail-fast: false
matrix:
variant:
# Available runners: https://github.com/actions/runner-images
- {os: windows-2019, generator: msvc, arch: x64, config: RelWithDebInfo, }
- {os: windows-2019, generator: msvc, arch: win32, config: RelWithDebInfo, }
- {os: ubuntu-22.04, generator: gcc, arch: x64, config: RelWithDebInfo, }
- {os: ubuntu-22.04, generator: clang, arch: x64, config: RelWithDebInfo, }
- {os: ubuntu-24.04, generator: gcc, arch: x64, config: RelWithDebInfo, }
- {os: ubuntu-24.04, generator: clang, arch: x64, config: RelWithDebInfo, }
- {os: macos-13, generator: clang, arch: x64, config: Release, }
# - {os: macos-13-xlarge, generator: clang, arch: arm64, config: Release, } # Paying runner
- {os: macos-14, generator: clang, arch: arm64, config: Release, }
# - {os: macos-14-large, generator: clang, arch: x64, config: Release, } # Paying runner
runs-on: ${{ matrix.variant.os }}
name: parser / ${{ matrix.variant.os }} / ${{ matrix.variant.generator }} / ${{ matrix.variant.arch }}
env:
CMAKE_FLAGS: "-DBUILD_PARSER:BOOL=ON -DBUILD_TESTS:BOOL=ON -DBUILD_PYTHON_BINDING:BOOL=OFF"
CMAKE_ARCH: ""
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Retrieve testdatas
uses: actions/download-artifact@v4
with:
name: kdmp-parser-testdatas-cache
path: .
- name: Environment Setup (Windows)
if: matrix.variant.os == 'windows-2019'
run: |
Import-Module .\.github\Invoke-VisualStudio.ps1
Invoke-VisualStudio2022${{ matrix.variant.arch }}
echo "CMAKE_ARCH='-A ${{ matrix.variant.arch }}'" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Environment Setup (Linux)
if: matrix.variant.os == 'ubuntu-22.04'
run: |
sudo apt update
- name: Build (Linux/GCC)
if: matrix.variant.os == 'ubuntu-22.04' && matrix.variant.generator == 'gcc'
run: |
sudo apt install -y g++
echo CC=gcc >> $GITHUB_ENV
echo CXX=g++ >> $GITHUB_ENV
- name: Environment Setup (Linux/CLang)
if: matrix.variant.os == 'ubuntu-22.04' && matrix.variant.generator == 'clang'
run: |
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
echo CC=clang >> $GITHUB_ENV
echo CXX=clang++ >> $GITHUB_ENV
- name: Build
run: |
mkdir build
mkdir artifact
cmake -S . -B ./build ${{ env.CMAKE_ARCH }} ${{ env.CMAKE_FLAGS }}
cmake --build ./build --verbose --config ${{ matrix.variant.config }}
cmake --install ./build --config ${{ matrix.variant.config }} --prefix ./artifact
- name: Tests
run: |
mv *.dmp ./build/src/tests/
ctest --progress --build-config ${{ matrix.variant.config }} -T test --test-dir ./build/src/tests/
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: parser-${{ matrix.variant.os }}.${{ matrix.variant.generator }}-${{ matrix.variant.arch }}.${{ matrix.variant.config }}-${{ github.sha }}
path: artifact/
bindings:
needs: testdatas
strategy:
fail-fast: false
matrix:
variant:
# Available runners: https://github.com/actions/runner-images
- {os: windows-2019, config: RelWithDebInfo }
- {os: ubuntu-22.04, config: RelWithDebInfo }
# most up to date free intel based osx?
- {os: macos-13, config: Release }
runs-on: ${{ matrix.variant.os }}
name: bindings / ${{ matrix.variant.os }}
env:
CMAKE_FLAGS: "-DBUILD_PARSER:BOOL=OFF -DBUILD_TESTS:BOOL=OFF -DBUILD_PYTHON_BINDING:BOOL=ON"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Retrieve testdatas
uses: actions/download-artifact@v4
with:
name: kdmp-parser-testdatas-cache
path: .
- name: Build / test wheels
uses: pypa/cibuildwheel@v2.19.1
env:
CIBW_BEFORE_TEST: pip install -U -r {project}/src/python/tests/requirements.txt
with:
package-dir: ./src/python
- name: Upload wheel
uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.variant.os }}
path: ./wheelhouse/*.whl
merge:
runs-on: ubuntu-latest
needs: bindings
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: wheels
pattern: wheels-*