Skip to content

Commit

Permalink
Create more GitHub Actions jobs for meson and gcc/clang ##build (#16442)
Browse files Browse the repository at this point in the history
* Create more GitHub Actions jobs for meson and gcc/clang
* Add workflow for GitHub Actions when we commit in master
  • Loading branch information
ret2libc authored Apr 7, 2020
1 parent 4fbb986 commit 6136666
Show file tree
Hide file tree
Showing 3 changed files with 171 additions and 42 deletions.
42 changes: 0 additions & 42 deletions .github/workflows/ccpp.yml

This file was deleted.

93 changes: 93 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Radare2 CI

on:
push:
branches:
- master

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
compiler: [gcc, clang]
build_system: [acr, meson]
include:
- os: ubuntu-latest
build_system: meson
compiler: gcc
coverage: true
env:
MESON_OPTIONS: -Db_coverage=true
- os: ubuntu-latest
build_system: meson
compiler: gcc
env:
MESON_OPTIONS: -Duse_treesitter=true
R2_CFG_NEWSHELL: 1
exclude:
- os: macos-latest
build_system: meson
- os: macos-latest
compiler: gcc
- os: ubuntu-latest
build_system: meson
compiler: clang

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 ${MESON_OPTIONS} --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
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}
cd test
make
- name: Upload coverage info
uses: codecov/codecov-action@v1
if: matrix.coverage
78 changes: 78 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Radare2 CI PR

on:
pull_request:
branches:
- master

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
compiler: [gcc, clang]
build_system: [acr, meson]
exclude:
- os: macos-latest
build_system: meson
- os: macos-latest
compiler: gcc
- os: ubuntu-latest
build_system: meson
compiler: clang

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' && matrix.os == 'macos-latest'
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.os == 'macos-latest' || (matrix.os == 'ubuntu-latest' && matrix.build_system == 'meson')
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}
cd test
make

0 comments on commit 6136666

Please sign in to comment.