102 lines
3.5 KiB
YAML
102 lines
3.5 KiB
YAML
name: Radare2 CI PR
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
build:
|
|
name: ${{ matrix.name }}
|
|
runs-on: ${{ matrix.os }}
|
|
timeout-minutes: 35
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
name: [linux-acr-gcc-tests, linux-acr-clang-build, linux-meson-gcc-build, linux-meson-gcc-newshell-tests, macos-clang-tests]
|
|
include:
|
|
- name: linux-acr-gcc-tests
|
|
os: ubuntu-latest
|
|
build_system: acr
|
|
compiler: gcc
|
|
run_tests: true
|
|
- name: linux-acr-clang-build
|
|
os: ubuntu-latest
|
|
build_system: acr
|
|
compiler: clang
|
|
- name: linux-meson-gcc-build
|
|
os: ubuntu-latest
|
|
build_system: meson
|
|
compiler: gcc
|
|
- name: linux-meson-gcc-newshell-tests
|
|
os: ubuntu-latest
|
|
build_system: meson
|
|
compiler: gcc
|
|
run_tests: true
|
|
newshell: true
|
|
- name: macos-clang-tests
|
|
os: macos-latest
|
|
build_system: acr
|
|
compiler: clang
|
|
run_tests: true
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Install pkg-config with Homebrew
|
|
if: matrix.os == 'macos-latest'
|
|
run: brew install pkg-config
|
|
- name: Install meson and ninja
|
|
if: matrix.build_system == 'meson'
|
|
run: sudo apt-get --assume-yes install python3-wheel python3-setuptools && pip3 install --user meson ninja
|
|
- name: Install clang
|
|
if: matrix.compiler == 'clang' && matrix.os == 'ubuntu-latest'
|
|
run: sudo apt-get --assume-yes install clang
|
|
- name: Checkout our Testsuite Binaries
|
|
uses: actions/checkout@v2
|
|
with:
|
|
repository: radareorg/radare2-testbins
|
|
path: test/bins
|
|
- name: Configure with ACR and build
|
|
if: matrix.build_system == 'acr'
|
|
run: ./configure --prefix=${HOME} && make
|
|
env:
|
|
CC: ${{ matrix.compiler }}
|
|
- name: Build with Meson
|
|
if: matrix.build_system == 'meson'
|
|
run: |
|
|
export PATH=${HOME}/.local/bin:${PATH}
|
|
meson --prefix=${HOME} build && ninja -C build
|
|
env:
|
|
CC: ${{ matrix.compiler }}
|
|
- name: Install with make
|
|
if: matrix.build_system == 'acr'
|
|
run: |
|
|
# Install the radare2
|
|
export PATH=${HOME}/bin:${HOME}/.local/bin:${PATH}
|
|
export LD_LIBRARY_PATH=${HOME}/lib/$(uname -m)-linux-gnu:${HOME}/lib:${HOME}/lib64:${LD_LIBRARY_PATH}
|
|
export PKG_CONFIG_PATH=${HOME}/lib/pkgconfig:${HOME}/lib/$(uname -m)-linux-gnu/pkgconfig:${PKG_CONFIG_PATH}
|
|
make install
|
|
- name: Install with meson
|
|
if: matrix.build_system == 'meson'
|
|
run: |
|
|
# Install the radare2
|
|
export PATH=${HOME}/bin:${HOME}/.local/bin:${PATH}
|
|
export LD_LIBRARY_PATH=${HOME}/lib/$(uname -m)-linux-gnu:${HOME}/lib:${HOME}/lib64:${LD_LIBRARY_PATH}
|
|
export PKG_CONFIG_PATH=${HOME}/lib/pkgconfig:${HOME}/lib/$(uname -m)-linux-gnu/pkgconfig:${PKG_CONFIG_PATH}
|
|
ninja -C build install
|
|
- name: Run tests
|
|
if: matrix.run_tests
|
|
run: |
|
|
# Running the test suite
|
|
export PATH=${HOME}/bin:${HOME}/.local/bin:${PATH}
|
|
export LD_LIBRARY_PATH=${HOME}/lib/$(uname -m)-linux-gnu:${HOME}/lib:${HOME}/lib64:${LD_LIBRARY_PATH}
|
|
export PKG_CONFIG_PATH=${HOME}/lib/pkgconfig:${HOME}/lib/$(uname -m)-linux-gnu/pkgconfig:${PKG_CONFIG_PATH}
|
|
if [ "$NEWSHELL" == "true" ]; then
|
|
export R2_CFG_NEWSHELL=1
|
|
fi
|
|
cd test
|
|
radare2 -N -Qc 'e cfg.newshell' -
|
|
make
|
|
env:
|
|
NEWSHELL: ${{ matrix.newshell }}
|
|
|