Add GitHub actions for push to master as well (#16454)

Instead of using a full matrix, just add the builds we care about
This commit is contained in:
Riccardo Schirone 2020-04-07 12:40:15 +02:00 committed by GitHub
parent 51573ddb58
commit 88ad1ccd4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 63 additions and 31 deletions

View File

@ -7,33 +7,36 @@ on:
jobs:
build:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
compiler: [gcc, clang]
build_system: [acr, meson]
name: [linux-acr-gcc, linux-acr-clang, linux-meson-gcc, linux-meson-newshell, macos-clang]
include:
- os: ubuntu-latest
- name: linux-acr-gcc
os: ubuntu-latest
build_system: acr
compiler: gcc
- name: linux-acr-clang
os: ubuntu-latest
build_system: acr
compiler: clang
- name: linux-meson-gcc
os: ubuntu-latest
build_system: meson
compiler: gcc
coverage: true
env:
MESON_OPTIONS: -Db_coverage=true
- os: ubuntu-latest
meson_options: -Db_coverage=true
coverage: 1
- name: linux-meson-newshell
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
meson_options: -Duse_treesitter=true
newshell: newshell
- name: macos-clang
os: macos-latest
build_system: acr
compiler: clang
steps:
@ -61,7 +64,7 @@ jobs:
if: matrix.build_system == 'meson'
run: |
export PATH=${HOME}/.local/bin:${PATH}
meson ${MESON_OPTIONS} --prefix=${HOME} build && ninja -C build
meson ${{ matrix.meson_options }} --prefix=${HOME} build && ninja -C build
env:
CC: ${{ matrix.compiler }}
- name: Install with make
@ -81,6 +84,7 @@ jobs:
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.newshell != 'newshell'
run: |
# Running the test suite
export PATH=${HOME}/bin:${HOME}/.local/bin:${PATH}
@ -88,6 +92,17 @@ jobs:
export PKG_CONFIG_PATH=${HOME}/lib/pkgconfig:${HOME}/lib/$(uname -m)-linux-gnu/pkgconfig:${PKG_CONFIG_PATH}
cd test
make
- name: Run tests with newshell
if: matrix.newshell == 'newshell'
continue-on-error: true
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}
export R2_CFG_NEWSHELL=1
cd test
make
- name: Upload coverage info
uses: codecov/codecov-action@v1
if: matrix.coverage
if: matrix.coverage == '1'

View File

@ -2,25 +2,42 @@ name: Radare2 CI PR
on:
pull_request:
paths-ignore:
- 'man/*'
- '.travis*'
- 'travis*'
- 'appveyor.yml'
- '*.md'
- 'COPYING*'
branches:
- master
jobs:
build:
name: ${{ matrix.name }}
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
name: [linux-acr-gcc, linux-acr-clang, linux-meson-gcc, macos-clang]
include:
- name: linux-acr-gcc
os: ubuntu-latest
build_system: acr
compiler: gcc
- os: ubuntu-latest
build_system: meson
run_tests: true
- name: linux-acr-clang
os: ubuntu-latest
build_system: acr
compiler: clang
- name: linux-meson-gcc
os: ubuntu-latest
build_system: meson
compiler: gcc
- name: macos-clang
os: macos-latest
build_system: acr
compiler: clang
run_tests: true
steps:
- uses: actions/checkout@v2
@ -51,7 +68,7 @@ jobs:
env:
CC: ${{ matrix.compiler }}
- name: Install with make
if: matrix.build_system == 'acr' && matrix.os == 'macos-latest'
if: matrix.build_system == 'acr'
run: |
# Install the radare2
export PATH=${HOME}/bin:${HOME}/.local/bin:${PATH}
@ -67,7 +84,7 @@ jobs:
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')
if: matrix.run_tests
run: |
# Running the test suite
export PATH=${HOME}/bin:${HOME}/.local/bin:${PATH}