2021-10-03 17:27:18 +03:00
|
|
|
name: Build UC2
|
2021-10-16 21:37:16 +03:00
|
|
|
|
2021-10-06 13:51:52 +03:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths-ignore:
|
|
|
|
- ".gitignore"
|
|
|
|
- "docs/**"
|
|
|
|
- "README"
|
|
|
|
- "CREDITS.TXT"
|
|
|
|
- "COPYING_GLIB"
|
|
|
|
- "COPYING.LGPL2"
|
|
|
|
- "AUTHORS.TXT"
|
|
|
|
- "CHANGELOG"
|
|
|
|
- "COPYING"
|
2021-10-07 00:22:02 +03:00
|
|
|
pull_request:
|
2021-10-06 13:51:52 +03:00
|
|
|
|
|
|
|
|
2021-10-03 17:27:18 +03:00
|
|
|
env:
|
|
|
|
CI: true
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
Windows:
|
|
|
|
runs-on: ${{ matrix.config.os }}
|
2021-10-07 00:22:02 +03:00
|
|
|
name: ${{ matrix.config.name }}
|
2021-10-03 17:27:18 +03:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
config:
|
|
|
|
- {
|
2022-02-17 12:39:02 +03:00
|
|
|
os: windows-2019,
|
2021-10-03 17:27:18 +03:00
|
|
|
arch: x64,
|
|
|
|
python-arch: x64,
|
|
|
|
python-ver: '3.8',
|
|
|
|
name: 'windows-x64 MINGW64',
|
|
|
|
mingw: MINGW64,
|
|
|
|
mingw-arch: x86_64,
|
|
|
|
artifact: 'windows_mingw64.7z',
|
|
|
|
build_type: 'Debug',
|
|
|
|
archiver: '7z a',
|
|
|
|
generators: 'Ninja'
|
|
|
|
}
|
|
|
|
- {
|
2022-02-17 12:39:02 +03:00
|
|
|
os: windows-2019,
|
2021-10-03 17:27:18 +03:00
|
|
|
arch: x64,
|
|
|
|
python-arch: x64,
|
|
|
|
python-ver: '3.8',
|
|
|
|
name: 'windows-x64 MINGW32',
|
|
|
|
mingw: MINGW32,
|
|
|
|
mingw-arch: i686,
|
|
|
|
artifact: 'windows_mingw32.7z',
|
|
|
|
build_type: 'Debug',
|
|
|
|
archiver: '7z a',
|
|
|
|
generators: 'Ninja'
|
|
|
|
}
|
|
|
|
- {
|
2022-02-17 12:39:02 +03:00
|
|
|
os: windows-2019,
|
2021-10-03 17:27:18 +03:00
|
|
|
arch: x64,
|
|
|
|
python-arch: x64,
|
|
|
|
python-ver: '3.8',
|
2022-04-12 21:36:52 +03:00
|
|
|
name: 'windows-x64 MSVC 64bit shared',
|
2021-10-03 17:27:18 +03:00
|
|
|
msvc-arch: x64,
|
2022-04-12 20:26:47 +03:00
|
|
|
artifact: 'windows_msvc64_shared.7z',
|
|
|
|
shared: 'yes',
|
2021-10-03 17:27:18 +03:00
|
|
|
build_type: 'Debug',
|
|
|
|
archiver: '7z a',
|
|
|
|
generators: 'Visual Studio 16 2019'
|
|
|
|
}
|
2021-10-07 00:22:02 +03:00
|
|
|
- {
|
2022-02-17 12:39:02 +03:00
|
|
|
os: windows-2019,
|
2021-10-07 00:22:02 +03:00
|
|
|
arch: x86,
|
|
|
|
python-arch: x86,
|
|
|
|
python-ver: '3.8',
|
2022-04-12 21:36:52 +03:00
|
|
|
name: 'windows-x86 MSVC 32bit shared',
|
2021-10-07 00:22:02 +03:00
|
|
|
msvc-arch: x86,
|
2022-04-12 20:26:47 +03:00
|
|
|
artifact: 'windows_msvc32_shared.7z',
|
|
|
|
shared: 'yes',
|
|
|
|
build_type: 'Debug',
|
|
|
|
archiver: '7z a',
|
|
|
|
generators: 'Visual Studio 16 2019'
|
|
|
|
}
|
|
|
|
- {
|
|
|
|
os: windows-2019,
|
|
|
|
arch: x64,
|
|
|
|
python-arch: x64,
|
|
|
|
python-ver: '3.8',
|
2022-04-12 21:36:52 +03:00
|
|
|
name: 'windows-x64 MSVC 64bit static',
|
2022-04-12 20:26:47 +03:00
|
|
|
msvc-arch: x64,
|
|
|
|
artifact: 'windows_msvc64_static.7z',
|
|
|
|
shared: 'no',
|
|
|
|
build_type: 'Debug',
|
|
|
|
archiver: '7z a',
|
|
|
|
generators: 'Visual Studio 16 2019'
|
|
|
|
}
|
|
|
|
- {
|
|
|
|
os: windows-2019,
|
|
|
|
arch: x86,
|
|
|
|
python-arch: x86,
|
|
|
|
python-ver: '3.8',
|
2022-04-12 21:36:52 +03:00
|
|
|
name: 'windows-x86 MSVC 32bit static',
|
2022-04-12 20:26:47 +03:00
|
|
|
msvc-arch: x86,
|
|
|
|
artifact: 'windows_msvc32_static.7z',
|
|
|
|
shared: 'no',
|
2021-10-07 00:22:02 +03:00
|
|
|
build_type: 'Debug',
|
|
|
|
archiver: '7z a',
|
|
|
|
generators: 'Visual Studio 16 2019'
|
|
|
|
}
|
2021-10-03 17:27:18 +03:00
|
|
|
compiler: [ gcc ]
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: '🛠️ Win MINGW setup'
|
|
|
|
if: contains(matrix.config.mingw, 'MINGW')
|
|
|
|
uses: msys2/setup-msys2@v2
|
|
|
|
with:
|
|
|
|
msystem: ${{ matrix.config.mingw }}
|
|
|
|
install: >-
|
|
|
|
git
|
|
|
|
mingw-w64-${{ matrix.config.mingw-arch }}-cmake
|
|
|
|
mingw-w64-${{ matrix.config.mingw-arch }}-ninja
|
|
|
|
mingw-w64-${{ matrix.config.mingw-arch }}-cmocka
|
|
|
|
mingw-w64-${{ matrix.config.mingw-arch }}-${{ matrix.compiler }}
|
|
|
|
mingw-w64-${{ matrix.config.mingw-arch }}-toolchain
|
|
|
|
|
2021-10-07 00:22:02 +03:00
|
|
|
- name: '🛠️ Win MSVC 64 setup'
|
|
|
|
if: contains(matrix.config.name, 'MSVC 64')
|
2021-10-03 17:27:18 +03:00
|
|
|
uses: microsoft/setup-msbuild@v1
|
|
|
|
|
2021-10-07 00:22:02 +03:00
|
|
|
- name: '🚧 Win MSVC 64 build'
|
|
|
|
if: contains(matrix.config.name, 'MSVC 64')
|
2021-10-03 17:27:18 +03:00
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
choco install ninja cmake
|
|
|
|
ninja --version
|
|
|
|
cmake --version
|
|
|
|
mkdir build
|
|
|
|
cmake \
|
|
|
|
-S . \
|
|
|
|
-B . \
|
|
|
|
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \
|
|
|
|
-G "${{ matrix.config.generators }}" \
|
|
|
|
-DCMAKE_INSTALL_PREFIX:PATH=instdir
|
|
|
|
cmake --build . --config ${{ matrix.config.build_type }}
|
|
|
|
cmake --install . --strip --config ${{ matrix.config.build_type }}
|
2021-11-03 23:44:00 +03:00
|
|
|
ctest -VV -C ${{ matrix.config.build_type }}
|
2021-10-03 17:27:18 +03:00
|
|
|
mv Debug instdir
|
|
|
|
|
2021-10-07 00:22:02 +03:00
|
|
|
- name: '🛠️ Win MSVC 32 setup'
|
|
|
|
if: contains(matrix.config.name, 'MSVC 32')
|
|
|
|
uses: ilammy/msvc-dev-cmd@v1
|
|
|
|
with:
|
|
|
|
arch: x86
|
|
|
|
|
|
|
|
- name: '🚧 Win MSVC 32 build'
|
|
|
|
if: contains(matrix.config.name, 'MSVC 32')
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
choco install ninja cmake
|
|
|
|
ninja --version
|
|
|
|
cmake --version
|
|
|
|
mkdir build
|
|
|
|
cmake \
|
|
|
|
-S . \
|
|
|
|
-B . \
|
|
|
|
-A "win32" \
|
|
|
|
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \
|
|
|
|
-G "${{ matrix.config.generators }}" \
|
|
|
|
-DCMAKE_INSTALL_PREFIX:PATH=instdir
|
|
|
|
cmake --build . --config ${{ matrix.config.build_type }}
|
|
|
|
cmake --install . --strip --config ${{ matrix.config.build_type }}
|
2021-11-03 23:44:00 +03:00
|
|
|
ctest -VV -C ${{ matrix.config.build_type }}
|
2021-10-07 00:22:02 +03:00
|
|
|
mv Debug instdir
|
|
|
|
|
2021-10-03 17:27:18 +03:00
|
|
|
- name: '🚧 Win MINGW build'
|
|
|
|
if: contains(matrix.config.mingw, 'MINGW')
|
|
|
|
shell: msys2 {0}
|
|
|
|
run: |
|
|
|
|
if [ ${{ matrix.config.mingw }} == 'MINGW32' ]; then
|
|
|
|
export CPPFLAGS=-D__USE_MINGW_ANSI_STDIO=1
|
|
|
|
#export CC=i686-w64-mingw32-gcc
|
|
|
|
export AR=gcc-ar
|
|
|
|
export RANLIB=gcc-ranlib
|
|
|
|
export CFLAGS="-m32"
|
|
|
|
export LDFLAGS="-m32"
|
|
|
|
export LDFLAGS_STATIC="-m32"
|
|
|
|
export UNICORN_QEMU_FLAGS="--cpu=i386"
|
|
|
|
fi
|
|
|
|
mkdir build
|
|
|
|
mkdir instdir
|
|
|
|
cmake \
|
|
|
|
-S . \
|
|
|
|
-B . \
|
|
|
|
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \
|
|
|
|
-G "${{ matrix.config.generators }}" \
|
|
|
|
-DCMAKE_INSTALL_PREFIX:PATH=instdir
|
|
|
|
cmake --build . --config ${{ matrix.config.build_type }}
|
|
|
|
cmake --install . --strip
|
2021-11-03 23:44:00 +03:00
|
|
|
ctest -VV -C ${{ matrix.config.build_type }}
|
2021-10-03 17:27:18 +03:00
|
|
|
|
|
|
|
- name: '📦 Pack artifact'
|
2021-11-25 17:31:53 +03:00
|
|
|
if: always()
|
2021-10-03 17:27:18 +03:00
|
|
|
shell: bash
|
|
|
|
working-directory: instdir
|
|
|
|
run: |
|
|
|
|
ls -laR
|
2021-12-22 22:45:15 +03:00
|
|
|
${{ matrix.config.archiver }} ../${{ matrix.config.artifact }} . ../test*
|
2021-10-03 17:27:18 +03:00
|
|
|
|
|
|
|
- name: '📤 Upload artifact'
|
2021-11-25 17:31:53 +03:00
|
|
|
if: always()
|
2021-10-03 17:27:18 +03:00
|
|
|
uses: actions/upload-artifact@v1
|
|
|
|
with:
|
|
|
|
path: ./${{ matrix.config.artifact }}
|
|
|
|
name: ${{ matrix.config.artifact }}
|
|
|
|
|
|
|
|
Macos:
|
|
|
|
runs-on: ${{ matrix.config.os }}
|
|
|
|
name: ${{ matrix.config.name }} - ${{ matrix.compiler }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
config:
|
|
|
|
- {
|
|
|
|
os: macos-latest,
|
|
|
|
arch: x64,
|
|
|
|
python-arch: x64,
|
|
|
|
python-ver: '3.8',
|
2022-04-12 21:36:52 +03:00
|
|
|
name: 'macos-x64 cmake shared',
|
2022-04-12 20:08:35 +03:00
|
|
|
shared: 'yes',
|
|
|
|
artifact: 'macos-cmake-shared-x64.7z',
|
|
|
|
build_type: 'Debug',
|
|
|
|
archiver: '7za a',
|
|
|
|
generators: 'Ninja'
|
|
|
|
}
|
|
|
|
- {
|
|
|
|
os: macos-latest,
|
|
|
|
arch: x64,
|
|
|
|
python-arch: x64,
|
|
|
|
python-ver: '3.8',
|
2022-04-12 22:10:19 +03:00
|
|
|
name: 'macos-x64 cmake static',
|
2022-04-12 20:08:35 +03:00
|
|
|
shared: 'no',
|
|
|
|
artifact: 'macos-cmake-static-x64.7z',
|
2021-10-03 17:27:18 +03:00
|
|
|
build_type: 'Debug',
|
|
|
|
archiver: '7za a',
|
|
|
|
generators: 'Ninja'
|
|
|
|
}
|
2021-10-07 00:22:02 +03:00
|
|
|
- {
|
|
|
|
os: macos-11,
|
|
|
|
arch: x86_64,
|
|
|
|
python-arch: x86_64,
|
|
|
|
python-ver: '3.8',
|
|
|
|
name: 'android cmake',
|
|
|
|
artifact: 'Android-x86_64.7z',
|
|
|
|
build_type: 'Debug',
|
|
|
|
archiver: '7za a',
|
|
|
|
generators: 'Ninja'
|
|
|
|
}
|
2021-10-03 17:27:18 +03:00
|
|
|
compiler: [ gcc ]
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
# - name: '🛠️ Python setup'
|
|
|
|
# uses: actions/setup-python@v2
|
|
|
|
# with:
|
|
|
|
# python-version: ${{ matrix.config.python-ver }}
|
|
|
|
|
|
|
|
- name: '🚧 Mac build'
|
2021-10-07 00:22:02 +03:00
|
|
|
if: contains(matrix.config.name, 'macos-x64')
|
2021-10-03 17:27:18 +03:00
|
|
|
shell: bash
|
|
|
|
run: |
|
2021-10-07 00:22:02 +03:00
|
|
|
brew install p7zip cmake ninja
|
|
|
|
ninja --version
|
|
|
|
cmake --version
|
|
|
|
mkdir build
|
|
|
|
mkdir instdir
|
|
|
|
cmake \
|
|
|
|
-S . \
|
|
|
|
-B . \
|
|
|
|
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \
|
|
|
|
-G "${{ matrix.config.generators }}" \
|
2022-04-12 20:08:35 +03:00
|
|
|
-DCMAKE_INSTALL_PREFIX:PATH=instdir \
|
|
|
|
-DBUILD_SHARED_LIB= ${{ matrix.config.shared }}
|
2021-10-07 00:22:02 +03:00
|
|
|
cmake --build . --config ${{ matrix.config.build_type }}
|
|
|
|
cmake --install . --strip
|
2021-11-03 23:44:00 +03:00
|
|
|
ctest -VV -C ${{ matrix.config.build_type }}
|
2021-10-16 21:35:23 +03:00
|
|
|
|
2021-10-07 00:22:02 +03:00
|
|
|
- name: '🚧 Android x86_64 build'
|
|
|
|
if: contains(matrix.config.name, 'android')
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
brew install p7zip cmake ninja
|
|
|
|
mkdir build
|
|
|
|
mkdir instdir
|
|
|
|
cmake . -DCMAKE_TOOLCHAIN_FILE="$ANDROID_HOME/ndk/21.4.7075529/build/cmake/android.toolchain.cmake" \
|
|
|
|
-DANDROID_PLATFORM=android-28 \
|
|
|
|
-DANDROID_NDK="$ANDROID_HOME/ndk/21.4.7075529" \
|
|
|
|
-DANDROID_ABI=${{ matrix.config.arch }} \
|
|
|
|
-DOLP_SDK_ENABLE_TESTING=NO \
|
|
|
|
-DOLP_SDK_BUILD_EXAMPLES=ON \
|
|
|
|
-S . \
|
|
|
|
-B . \
|
|
|
|
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \
|
|
|
|
-G "${{ matrix.config.generators }}" \
|
|
|
|
-DCMAKE_INSTALL_PREFIX:PATH=instdir
|
|
|
|
cmake --build . --config ${{ matrix.config.build_type }}
|
|
|
|
cmake --install . --strip
|
|
|
|
|
2021-10-16 21:35:23 +03:00
|
|
|
- name: '🚧 AVD Cache'
|
|
|
|
if: contains(matrix.config.name, 'android')
|
|
|
|
uses: actions/cache@v2
|
|
|
|
id: avd-cache
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.android/avd/*
|
|
|
|
~/.android/adb*
|
|
|
|
key: avd-28
|
|
|
|
|
|
|
|
- name: '🚧 Create x86_64 tests environment'
|
|
|
|
if: contains(matrix.config.name, 'android') && steps.avd-cache.outputs.cache-hit != 'true'
|
|
|
|
uses: reactivecircus/android-emulator-runner@v2
|
|
|
|
with:
|
|
|
|
api-level: 28
|
|
|
|
arch: ${{ matrix.config.arch }}
|
|
|
|
force-avd-creation: false
|
|
|
|
disable-animations: false
|
|
|
|
target: default
|
|
|
|
profile: Nexus 6
|
|
|
|
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -verbose -show-kernel
|
|
|
|
script: echo "Generated AVD snapshot for caching."
|
|
|
|
|
2021-10-07 00:22:02 +03:00
|
|
|
- name: '🚧 Android x86_64 tests'
|
|
|
|
if: contains(matrix.config.name, 'android')
|
|
|
|
uses: reactivecircus/android-emulator-runner@v2
|
|
|
|
with:
|
|
|
|
api-level: 28
|
2021-10-16 21:35:23 +03:00
|
|
|
force-avd-creation: false
|
|
|
|
disable-animations: true
|
2021-10-07 00:22:02 +03:00
|
|
|
arch: ${{ matrix.config.arch }}
|
|
|
|
target: default
|
|
|
|
profile: Nexus 6
|
|
|
|
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -verbose -show-kernel
|
2021-10-16 21:35:23 +03:00
|
|
|
script: bash ./adb.sh
|
2021-10-07 00:22:02 +03:00
|
|
|
|
2021-10-03 17:27:18 +03:00
|
|
|
- name: '📦 Pack artifact'
|
2021-11-25 17:31:53 +03:00
|
|
|
if: always()
|
2021-10-03 17:27:18 +03:00
|
|
|
shell: bash
|
|
|
|
working-directory: instdir
|
|
|
|
run: |
|
|
|
|
ls -laR
|
2021-12-22 22:45:15 +03:00
|
|
|
${{ matrix.config.archiver }} ../${{ matrix.config.artifact }} . ../test*
|
2021-10-03 17:27:18 +03:00
|
|
|
|
|
|
|
- name: '📤 Upload artifact'
|
2021-11-25 17:31:53 +03:00
|
|
|
if: always()
|
2021-10-03 17:27:18 +03:00
|
|
|
uses: actions/upload-artifact@v1
|
|
|
|
with:
|
|
|
|
path: ./${{ matrix.config.artifact }}
|
|
|
|
name: ${{ matrix.config.artifact }}
|
|
|
|
|
|
|
|
Linux:
|
|
|
|
runs-on: ${{ matrix.config.os }}
|
|
|
|
name: ${{ matrix.config.name }} - ${{ matrix.compiler }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
config:
|
|
|
|
- {
|
|
|
|
os: ubuntu-latest,
|
|
|
|
arch: x64,
|
|
|
|
python-arch: x64,
|
|
|
|
python-ver: '3.8',
|
2022-04-12 21:36:52 +03:00
|
|
|
name: 'ubuntu-x64 cmake shared',
|
2022-04-12 20:08:35 +03:00
|
|
|
shared: 'yes',
|
|
|
|
artifact: 'ubuntu-cmake-shared-x64.7z',
|
|
|
|
build_type: 'Debug',
|
|
|
|
archiver: '7z a',
|
|
|
|
generators: 'Ninja'
|
|
|
|
}
|
|
|
|
- {
|
|
|
|
os: ubuntu-latest,
|
|
|
|
arch: x86,
|
|
|
|
python-arch: x86,
|
|
|
|
python-ver: '3.8',
|
2022-04-12 21:36:52 +03:00
|
|
|
name: 'ubuntu-x86 cmake shared',
|
2022-04-12 20:08:35 +03:00
|
|
|
shared: 'yes',
|
|
|
|
artifact: 'ubuntu-cmake-shared-x86.7z',
|
|
|
|
build_type: 'Debug',
|
|
|
|
archiver: '7z a',
|
|
|
|
generators: 'Ninja'
|
|
|
|
}
|
|
|
|
- {
|
|
|
|
os: ubuntu-latest,
|
|
|
|
arch: x64,
|
|
|
|
python-arch: x64,
|
|
|
|
python-ver: '3.8',
|
2022-04-12 21:36:52 +03:00
|
|
|
name: 'ubuntu-x64 cmake static',
|
2022-04-12 20:08:35 +03:00
|
|
|
shared: 'no',
|
|
|
|
artifact: 'ubuntu-cmake-static-x64.7z',
|
2021-10-03 17:27:18 +03:00
|
|
|
build_type: 'Debug',
|
|
|
|
archiver: '7z a',
|
|
|
|
generators: 'Ninja'
|
|
|
|
}
|
|
|
|
- {
|
|
|
|
os: ubuntu-latest,
|
|
|
|
arch: x86,
|
|
|
|
python-arch: x86,
|
|
|
|
python-ver: '3.8',
|
2022-04-12 21:36:52 +03:00
|
|
|
name: 'ubuntu-x86 cmake static',
|
2022-04-12 20:08:35 +03:00
|
|
|
shared: 'no',
|
|
|
|
artifact: 'ubuntu-cmake-static-x86.7z',
|
2021-10-03 17:27:18 +03:00
|
|
|
build_type: 'Debug',
|
|
|
|
archiver: '7z a',
|
|
|
|
generators: 'Ninja'
|
|
|
|
}
|
|
|
|
- {
|
|
|
|
os: ubuntu-latest,
|
|
|
|
arch: aarch64,
|
|
|
|
python-arch: aarch64,
|
|
|
|
python-ver: '3.8',
|
|
|
|
name: 'ubuntu-aarch64 cmake',
|
|
|
|
artifact: 'ubuntu-cmake-aarch64.7z',
|
|
|
|
build_type: 'Debug',
|
|
|
|
archiver: '7z a',
|
|
|
|
generators: 'Ninja',
|
|
|
|
distro: ubuntu20.04
|
|
|
|
}
|
|
|
|
- {
|
|
|
|
os: ubuntu-latest,
|
|
|
|
arch: ppc64le,
|
|
|
|
python-arch: ppc,
|
|
|
|
python-ver: '3.8',
|
|
|
|
name: 'ubuntu-ppc64le cmake',
|
|
|
|
artifact: 'ubuntu-cmake-ppc64le.7z',
|
|
|
|
build_type: 'Debug',
|
|
|
|
archiver: '7z a',
|
|
|
|
generators: 'Ninja',
|
|
|
|
distro: ubuntu20.04
|
|
|
|
}
|
|
|
|
compiler: [ gcc ]
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
# - name: '🛠️ Python setup'
|
|
|
|
# uses: actions/setup-python@v2
|
|
|
|
# with:
|
|
|
|
# python-version: ${{ matrix.config.python-ver }}
|
|
|
|
|
|
|
|
- name: '🚧 Linux x64/x86 build'
|
|
|
|
if: contains(matrix.config.arch, 'x64') || contains(matrix.config.arch, 'x86')
|
|
|
|
shell: 'script -q -e -c "bash {0}"'
|
|
|
|
run: |
|
|
|
|
if [ ${{ matrix.config.arch }} == 'x64' ]; then
|
|
|
|
sudo apt install -q -y libcmocka-dev ninja-build
|
|
|
|
else
|
|
|
|
export CFLAGS="-m32" LDFLAGS="-m32" LDFLAGS_STATIC="-m32" UNICORN_QEMU_FLAGS="--cpu=i386"
|
|
|
|
sudo dpkg --add-architecture i386
|
|
|
|
sudo apt install -q -y lib32ncurses-dev lib32z1-dev lib32gcc-9-dev libc6-dev-i386 gcc-multilib \
|
|
|
|
libcmocka-dev:i386 libcmocka0:i386 libc6:i386 libgcc-s1:i386 ninja-build
|
|
|
|
fi
|
|
|
|
mkdir build
|
|
|
|
mkdir instdir
|
|
|
|
cmake \
|
|
|
|
-S . \
|
|
|
|
-B . \
|
|
|
|
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \
|
|
|
|
-G "${{ matrix.config.generators }}" \
|
2022-04-12 20:08:35 +03:00
|
|
|
-DCMAKE_INSTALL_PREFIX:PATH=instdir \
|
|
|
|
-DBUILD_SHARED_LIBS=${{ matrix.config.shared }}
|
2021-10-03 17:27:18 +03:00
|
|
|
cmake --build . --config ${{ matrix.config.build_type }}
|
|
|
|
cmake --install . --strip
|
2021-11-03 23:44:00 +03:00
|
|
|
ctest -VV -C ${{ matrix.config.build_type }}
|
2021-10-03 17:27:18 +03:00
|
|
|
|
|
|
|
- name: '🚧 Linux ppc64le/aarch64 build'
|
|
|
|
if: contains(matrix.config.arch, 'ppc64le') || contains(matrix.config.arch, 'aarch64')
|
|
|
|
uses: uraimo/run-on-arch-action@v2.0.5
|
|
|
|
with:
|
|
|
|
arch: ${{ matrix.config.arch }}
|
|
|
|
distro: ${{ matrix.config.distro }}
|
|
|
|
setup: |
|
|
|
|
mkdir -p "${PWD}/instdir"
|
|
|
|
dockerRunArgs: |
|
|
|
|
--volume "${PWD}/instdir:/instdir"
|
|
|
|
shell: /bin/sh
|
|
|
|
install: |
|
|
|
|
apt-get update -q -y
|
|
|
|
apt-get install -q -y git cmake build-essential automake libcmocka-dev pkg-config ${{ matrix.compiler }} ninja-build
|
|
|
|
run: |
|
|
|
|
mkdir build
|
|
|
|
cmake \
|
|
|
|
-S . \
|
|
|
|
-B . \
|
|
|
|
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \
|
|
|
|
-G "${{ matrix.config.generators }}" \
|
|
|
|
-DCMAKE_INSTALL_PREFIX:PATH=/instdir
|
|
|
|
cmake --build . --config ${{ matrix.config.build_type }}
|
|
|
|
cmake --install . --strip
|
2021-11-03 23:44:00 +03:00
|
|
|
ctest -VV -C ${{ matrix.config.build_type }}
|
2021-10-03 17:27:18 +03:00
|
|
|
|
|
|
|
- name: '📦 Pack artifact'
|
2021-11-25 16:43:53 +03:00
|
|
|
if: always()
|
2021-10-03 17:27:18 +03:00
|
|
|
shell: bash
|
|
|
|
working-directory: instdir
|
|
|
|
run: |
|
|
|
|
ls -laR
|
2021-12-22 22:45:15 +03:00
|
|
|
${{ matrix.config.archiver }} ../${{ matrix.config.artifact }} . ../test*
|
2021-10-03 17:27:18 +03:00
|
|
|
|
|
|
|
- name: '📤 Upload artifact'
|
2021-11-25 16:43:53 +03:00
|
|
|
if: always()
|
2021-10-03 17:27:18 +03:00
|
|
|
uses: actions/upload-artifact@v1
|
|
|
|
with:
|
|
|
|
path: ./${{ matrix.config.artifact }}
|
2021-10-07 00:22:02 +03:00
|
|
|
name: ${{ matrix.config.artifact }}
|