-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create more GitHub Actions jobs for meson and gcc/clang ##build (#16442)
* Create more GitHub Actions jobs for meson and gcc/clang * Add workflow for GitHub Actions when we commit in master
- Loading branch information
Showing
3 changed files
with
171 additions
and
42 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||