From 6136666e9c85879dd4d1f0f4f7ca948348a03778 Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Tue, 7 Apr 2020 05:31:05 +0200 Subject: [PATCH] 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 --- .github/workflows/ccpp.yml | 42 ----------------- .github/workflows/ci.yaml | 93 ++++++++++++++++++++++++++++++++++++++ .github/workflows/pr.yaml | 78 ++++++++++++++++++++++++++++++++ 3 files changed, 171 insertions(+), 42 deletions(-) delete mode 100644 .github/workflows/ccpp.yml create mode 100644 .github/workflows/ci.yaml create mode 100644 .github/workflows/pr.yaml diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml deleted file mode 100644 index 95d1e08ea4..0000000000 --- a/.github/workflows/ccpp.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Radare2 CI - -on: - push: - branches: - - master - pull_request: - branches: - - master - -jobs: - build: - runs-on: ${{ matrix.os }} - strategy: - matrix: - node_version: ['12'] - os: [ubuntu-latest, macos-latest] - - steps: - - uses: actions/checkout@v2 - - name: Install pkg-config with Homebrew - if: matrix.os == 'macos-latest' - run: brew install pkg-config - - name: Checkout our Testsuite Binaries - uses: actions/checkout@v2 - with: - repository: radareorg/radare2-testbins - path: test/bins - - name: Configure with ACR - run: ./configure --prefix=${HOME} - - name: Build - run: make - - name: Install and run tests - run: | - # Install the radare2 - export PATH=${HOME}/bin:${PATH} - export LD_LIBRARY_PATH=${HOME}/lib:${HOME}/lib64:${LD_LIBRARY_PATH} - export PKG_CONFIG_PATH=${HOME}/lib/pkgconfig:${PKG_CONFIG_PATH} - make install - # Running the test suite - cd test && make - diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000000..6073fa0aec --- /dev/null +++ b/.github/workflows/ci.yaml @@ -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 diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml new file mode 100644 index 0000000000..b9250a8d5a --- /dev/null +++ b/.github/workflows/pr.yaml @@ -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 +