2019-12-06 10:21:28 +00:00
|
|
|
name: Cutter CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2020-08-01 14:07:19 +00:00
|
|
|
os: [ubuntu-18.04, ubuntu-16.04, macos-latest, windows-latest]
|
2020-01-20 16:14:05 +00:00
|
|
|
python-version: [3.7.x]
|
2019-12-06 10:21:28 +00:00
|
|
|
# Prevent one job from pausing the rest
|
|
|
|
fail-fast: false
|
|
|
|
steps:
|
|
|
|
- uses: actions/setup-python@v1
|
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
2020-04-03 12:41:17 +00:00
|
|
|
- uses: actions/checkout@v2
|
2019-12-06 10:21:28 +00:00
|
|
|
with:
|
|
|
|
submodules: true # 'recursive' 'true' or 'false'
|
2020-04-03 12:41:17 +00:00
|
|
|
persist-credentials: false
|
2019-12-06 10:21:28 +00:00
|
|
|
- name: apt dependencies
|
|
|
|
if: contains(matrix.os, 'ubuntu')
|
2020-04-02 17:55:24 +00:00
|
|
|
run: |
|
2020-07-16 10:40:26 +00:00
|
|
|
if [[ "${{ matrix.os }}" = "ubuntu-18.04" ]]
|
|
|
|
then
|
|
|
|
# github action VMs currently have broken package list causing install to fail, run update to refresh it
|
|
|
|
# remove this once fixed
|
|
|
|
sudo apt-get update
|
|
|
|
fi
|
2020-04-07 20:24:25 +00:00
|
|
|
sudo apt-get install libgraphviz-dev mesa-common-dev
|
2020-04-02 17:55:24 +00:00
|
|
|
if [[ "${{ matrix.os }}" = "ubuntu-16.04" ]]
|
|
|
|
then
|
|
|
|
sudo apt-get install ninja-build/xenial-backports
|
|
|
|
else
|
|
|
|
sudo apt-get install ninja-build
|
|
|
|
fi
|
2019-12-06 10:21:28 +00:00
|
|
|
- name: homebrew dependencies
|
|
|
|
if: contains(matrix.os, 'macos')
|
|
|
|
run: |
|
|
|
|
cd scripts
|
2020-07-29 20:16:42 +00:00
|
|
|
brew update --preinstall # temporary workaround for https://github.com/Homebrew/homebrew-bundle/issues/751
|
2019-12-06 10:21:28 +00:00
|
|
|
brew bundle
|
|
|
|
brew tap iveney/mocha
|
|
|
|
brew install realpath
|
|
|
|
brew install pkg-config
|
|
|
|
- name: py dependencies
|
|
|
|
run: |
|
|
|
|
pip install meson
|
|
|
|
- name: cmake ubuntu
|
|
|
|
if: contains(matrix.os, 'ubuntu')
|
|
|
|
run: |
|
|
|
|
scripts/fetch_deps.sh
|
|
|
|
source cutter-deps/env.sh
|
|
|
|
export LD_LIBRARY_PATH="`llvm-config --libdir`:$LD_LIBRARY_PATH"
|
|
|
|
source scripts/prepare_breakpad_linux.sh
|
|
|
|
export PKG_CONFIG_PATH="$CUSTOM_BREAKPAD_PREFIX/lib/pkgconfig:$CUSTOM_PYTHON_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH"
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake \
|
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
|
|
-DPYTHON_LIBRARY="$CUTTER_DEPS_PYTHON_PREFIX/lib/libpython3.6m.so.1.0" \
|
|
|
|
-DPYTHON_INCLUDE_DIR="$CUTTER_DEPS_PYTHON_PREFIX/include/python3.6m" \
|
|
|
|
-DPYTHON_EXECUTABLE="$CUTTER_DEPS_PYTHON_PREFIX/bin/python3" \
|
|
|
|
-DCUTTER_ENABLE_PYTHON=ON \
|
|
|
|
-DCUTTER_ENABLE_PYTHON_BINDINGS=OFF \
|
|
|
|
-DCUTTER_ENABLE_CRASH_REPORTS=ON \
|
|
|
|
-DCUTTER_USE_BUNDLED_RADARE2=ON \
|
|
|
|
../src && \
|
|
|
|
make -j4
|
|
|
|
- name: cmake macos
|
|
|
|
shell: bash
|
|
|
|
if: contains(matrix.os, 'macos')
|
|
|
|
run: |
|
|
|
|
scripts/fetch_deps.sh
|
|
|
|
source cutter-deps/env.sh
|
|
|
|
export PATH=/usr/local/opt/llvm/bin:$PATH
|
|
|
|
source scripts/prepare_breakpad_macos.sh
|
|
|
|
export PKG_CONFIG_PATH="$CUSTOM_BREAKPAD_PREFIX/lib/pkgconfig:$CUSTOM_PYTHON_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH"
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake \
|
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
|
|
-DPYTHON_LIBRARY="$CUTTER_DEPS_PYTHON_PREFIX/lib/libpython3.6m.dylib" \
|
|
|
|
-DPYTHON_INCLUDE_DIR="$CUTTER_DEPS_PYTHON_PREFIX/include/python3.6m" \
|
|
|
|
-DPYTHON_EXECUTABLE="$CUTTER_DEPS_PYTHON_PREFIX/bin/python3" \
|
|
|
|
-DCUTTER_ENABLE_PYTHON=ON \
|
|
|
|
-DCUTTER_ENABLE_PYTHON_BINDINGS=ON \
|
|
|
|
-DCUTTER_ENABLE_CRASH_REPORTS=ON \
|
|
|
|
-DCUTTER_USE_BUNDLED_RADARE2=ON \
|
|
|
|
-DBREAKPAD_FRAMEWORK_DIR="$BREAKPAD_FRAMEWORK_DIR" \
|
|
|
|
../src && \
|
|
|
|
make -j4;
|
2020-08-30 20:23:41 +00:00
|
|
|
- name: windows dependencies
|
2020-08-01 14:07:19 +00:00
|
|
|
if: contains(matrix.os, 'windows-latest')
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
pip install ninja
|
|
|
|
scripts/fetch_deps.sh
|
2020-08-30 20:23:41 +00:00
|
|
|
- name: windows cmake
|
|
|
|
if: contains(matrix.os, 'windows-latest')
|
|
|
|
shell: cmd
|
|
|
|
run: |
|
|
|
|
set CUTTER_DEPS=%CD%\cutter-deps
|
|
|
|
set PATH=%CD%\cutter-deps\qt\bin;%PATH%
|
|
|
|
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
|
|
|
|
cd
|
2020-08-01 14:07:19 +00:00
|
|
|
mkdir build
|
|
|
|
cd build
|
2020-08-30 20:23:41 +00:00
|
|
|
set PACKAGE_NAME=cutter-git-x64.Windows
|
|
|
|
cmake ^
|
|
|
|
-DCMAKE_BUILD_TYPE=Release ^
|
|
|
|
-DCUTTER_USE_BUNDLED_RADARE2=ON ^
|
|
|
|
-DCUTTER_ENABLE_PYTHON=ON ^
|
|
|
|
-DCUTTER_ENABLE_PYTHON_BINDINGS=ON ^
|
|
|
|
-DCUTTER_PACKAGE_DEPENDENCIES=ON ^
|
|
|
|
-DCUTTER_ENABLE_DEPENDENCY_DOWNLOADS=ON ^
|
|
|
|
-DCMAKE_PREFIX_PATH="%CUTTER_DEPS%\pyside" ^
|
|
|
|
-DCPACK_PACKAGE_FILE_NAME=%PACKAGE_NAME% ^
|
|
|
|
-G Ninja ^
|
2020-08-01 14:07:19 +00:00
|
|
|
../src
|
2020-08-30 20:23:41 +00:00
|
|
|
cmake --build . --config Release
|
|
|
|
cmake --build . --config Release --target package
|
|
|
|
echo ::set-env name=PACKAGE_NAME::%PACKAGE_NAME%.zip
|
|
|
|
- uses: actions/upload-artifact@v2
|
|
|
|
if: env.PACKAGE_NAME != null
|
|
|
|
with:
|
|
|
|
name: ${{ env.PACKAGE_NAME }}
|
|
|
|
path: build/${{ env.PACKAGE_NAME }}
|