Zig binding
* zig binding - sample added * zig build CI * split mingw (shared/static) CI/CD * unicorn log added * build C/C++ samples
This commit is contained in:
committed by
Matheus Catarino França
parent
0619deeafd
commit
4fb4b3e4b0
7
.github/workflows/build-uc2.yml
vendored
7
.github/workflows/build-uc2.yml
vendored
@@ -35,7 +35,7 @@ jobs:
|
||||
shared: 'yes',
|
||||
mingw: MINGW64,
|
||||
mingw-arch: x86_64,
|
||||
artifact: 'windows_mingw64.7z',
|
||||
artifact: 'windows_mingw64-shared.7z',
|
||||
build_type: 'Debug',
|
||||
archiver: '7z a',
|
||||
generators: 'Ninja'
|
||||
@@ -49,7 +49,7 @@ jobs:
|
||||
shared: 'no',
|
||||
mingw: MINGW64,
|
||||
mingw-arch: x86_64,
|
||||
artifact: 'windows_mingw64.7z',
|
||||
artifact: 'windows_mingw64-static.7z',
|
||||
build_type: 'Debug',
|
||||
archiver: '7z a',
|
||||
generators: 'Ninja'
|
||||
@@ -217,7 +217,7 @@ jobs:
|
||||
#export CC=i686-w64-mingw32-gcc
|
||||
export AR=gcc-ar
|
||||
export RANLIB=gcc-ranlib
|
||||
export CFLAGS="-m32"
|
||||
export CFLAGS="-m32 -static"
|
||||
export LDFLAGS="-m32"
|
||||
export LDFLAGS_STATIC="-m32"
|
||||
export UNICORN_QEMU_FLAGS="--cpu=i386"
|
||||
@@ -230,6 +230,7 @@ jobs:
|
||||
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \
|
||||
-G "${{ matrix.config.generators }}" \
|
||||
-DCMAKE_INSTALL_PREFIX:PATH=instdir \
|
||||
-DCMAKE_C_FLAGS:STRING="-static" \
|
||||
-DBUILD_SHARED_LIBS=${{ matrix.config.shared }}
|
||||
cmake --build . --config ${{ matrix.config.build_type }}
|
||||
cmake --install . --strip
|
||||
|
||||
81
.github/workflows/zigbuild.yml
vendored
Normal file
81
.github/workflows/zigbuild.yml
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
name: Zig Build
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- ".gitignore"
|
||||
- "docs/**"
|
||||
- "README"
|
||||
- "CREDITS.TXT"
|
||||
- "COPYING_GLIB"
|
||||
- "COPYING.LGPL2"
|
||||
- "AUTHORS.TXT"
|
||||
- "CHANGELOG"
|
||||
- "COPYING"
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
runs-on: [ubuntu-latest, macos-latest]
|
||||
runs-on: ${{ matrix.runs-on }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
- uses: goto-bus-stop/setup-zig@v2
|
||||
with:
|
||||
version: 0.11.0
|
||||
- uses: lukka/get-cmake@latest
|
||||
with:
|
||||
cmakeVersion: latest
|
||||
ninjaVersion: latest
|
||||
|
||||
- name: CMake Build
|
||||
run: zig build cmake
|
||||
|
||||
- name: Build Summary
|
||||
run: zig build --summary all -freference-trace
|
||||
|
||||
# ===================================================================
|
||||
# zig-mingw:
|
||||
# runs-on: windows-latest
|
||||
# strategy:
|
||||
# fail-fast: false
|
||||
# matrix:
|
||||
# include: [{ msystem: CLANG64, arch: x86_64, prefix: /clang64 }, { msystem: CLANG32, arch: i686, prefix: /clang32 }, { msystem: CLANGARM64, arch: aarch64, prefix: /clangarm64 }]
|
||||
# steps:
|
||||
# - uses: actions/checkout@v3
|
||||
# with:
|
||||
# path: temp
|
||||
# submodules: recursive
|
||||
# fetch-depth: 0
|
||||
# - uses: goto-bus-stop/setup-zig@v2
|
||||
# with:
|
||||
# version: master
|
||||
# - uses: msys2/setup-msys2@v2
|
||||
# with:
|
||||
# msystem: ${{ matrix.msystem }}
|
||||
# path-type: inherit
|
||||
# location: D:\
|
||||
# install: git mingw-w64-clang-${{ matrix.arch }}-cmake
|
||||
# update: true
|
||||
|
||||
# - name: Move Checkout
|
||||
# run: |
|
||||
# Copy-Item -Path ".\temp" -Destination "C:\_" -Recurse
|
||||
|
||||
# - name: Build Summary - ${{ matrix.arch }}
|
||||
# shell: msys2 {0}
|
||||
# run: |
|
||||
# cd /C/_
|
||||
# zig build cmake
|
||||
# if [${{ matrix.config.arch }} == 'i686' ]; then
|
||||
# zig build --summary all -freference-trace -Dtarget=x86-windows
|
||||
# else
|
||||
# zig build --summary all -freference-trace -Dtarget=${{ matrix.arch }}-windows
|
||||
# fi
|
||||
|
||||
Reference in New Issue
Block a user