From 91cc122559c9adc8121b7ac175213db78ed2f458 Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Tue, 14 Jul 2020 17:37:19 +0200 Subject: [PATCH 01/38] Include all similar build & test jobs in one yml file --- .github/workflows/centos6.yml | 41 ------ .github/workflows/ci.yaml | 109 ---------------- .github/workflows/debianold.yml | 54 -------- .github/workflows/docker.yml | 13 -- .github/workflows/pr.yaml | 108 ---------------- .github/workflows/release.yml | 222 +++++++++++++++++++++++++++++++- .github/workflows/static.yml | 33 ----- 7 files changed, 220 insertions(+), 360 deletions(-) delete mode 100644 .github/workflows/centos6.yml delete mode 100644 .github/workflows/ci.yaml delete mode 100644 .github/workflows/debianold.yml delete mode 100644 .github/workflows/docker.yml delete mode 100644 .github/workflows/pr.yaml delete mode 100644 .github/workflows/static.yml diff --git a/.github/workflows/centos6.yml b/.github/workflows/centos6.yml deleted file mode 100644 index 79f4e64942457..0000000000000 --- a/.github/workflows/centos6.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: CentOS 6 test - -on: - push: - branches: - - 'pre-release*' - - 'prerelease*' - - 'release-*' - - 'centos*' - schedule: - - cron: '0 18 * * 1,3,5' # Three-weekly at 18:00 UTC on Monday, Wednesday, and Friday - -jobs: - build: - name: centos-6-build - runs-on: ubuntu-latest - container: centos:6 - - steps: - - name: Install tools - run: yum install -y patch unzip git gcc make - - name: Checkout r2 - run: | - git clone https://github.com/${{ github.repository }} - cd radare2 - git fetch origin ${{ github.ref }} - git checkout -b local_branch FETCH_HEAD - - name: Configure with ACR and build - run: ./configure --prefix=/usr && make CS_RELEASE=1 - working-directory: radare2 - - name: Install with make - run: make install - working-directory: radare2 - - name: Run tests - run: cd test/unit && make - working-directory: radare2 - env: - # `make install` installs, for some unknown reasons, pkgconfig files in - # /usr/lib and not in /usr/lib64, thus pkg-config cannot find the right - # .pc files if the right path is not specified - PKG_CONFIG_PATH: /usr/lib/pkgconfig diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml deleted file mode 100644 index 72418b5f7e26a..0000000000000 --- a/.github/workflows/ci.yaml +++ /dev/null @@ -1,109 +0,0 @@ -name: Radare2 CI - -on: - push: - branches: - - master - - 'pre-release*' - - 'prerelease*' - - 'release*' - -jobs: - build: - name: ${{ matrix.name }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - name: [linux-acr-gcc-tests, linux-acr-clang-tests, linux-meson-gcc-tests, linux-meson-gcc-newshell-tests, macos-clang-tests] - include: - - name: linux-acr-gcc-tests - os: ubuntu-latest - build_system: acr - compiler: gcc - - name: linux-acr-clang-tests - os: ubuntu-latest - build_system: acr - compiler: clang - - name: linux-meson-gcc-tests - os: ubuntu-latest - build_system: meson - compiler: gcc - meson_options: -Db_coverage=true - coverage: 1 - - name: linux-meson-gcc-newshell-tests - os: ubuntu-latest - build_system: meson - compiler: gcc - newshell: true - - name: macos-clang-tests - os: macos-latest - build_system: acr - 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 python - if: matrix.os != 'macos-latest' - run: sudo apt-get --assume-yes install python3-wheel python3-setuptools - - name: Install meson and ninja - if: matrix.build_system == 'meson' - run: pip3 install --user meson==0.52.0 ninja==1.10.0 - - name: Install test dependencies - run: pip3 install --user 'git+https://github.com/radareorg/radare2-r2pipe#egg=r2pipe&subdirectory=python' - - 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 ${{ matrix.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} - if [ "$NEWSHELL" == "true" ]; then - export R2_CFG_NEWSHELL=1 - fi - cd test - radare2 -N -Qc 'e cfg.newshell' - - make && make fuzz-tests - env: - NEWSHELL: ${{ matrix.newshell }} - - name: Upload coverage info - uses: codecov/codecov-action@v1 - if: matrix.coverage == '1' diff --git a/.github/workflows/debianold.yml b/.github/workflows/debianold.yml deleted file mode 100644 index f26d1391fa5ba..0000000000000 --- a/.github/workflows/debianold.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: Debian OLD (Jessie) test - -on: - push: - branches: - - 'pre-release*' - - 'prerelease*' - - 'release-*' - - 'debian*' - schedule: - - cron: '0 18 * * 1,3,5' # Three-weekly at 18:00 UTC on Monday, Wednesday, and Friday - -jobs: - build: - name: debian-8-build - runs-on: ubuntu-latest - container: debian:jessie - - steps: - - name: Install tools - run: apt-get update && apt-get install --yes patch unzip git gcc make curl pkg-config libc6-i386 build-essential - - name: Install Python source build dependcies - run: apt-get install --yes checkinstall libbz2-dev libc6-dev libgdbm-dev libncursesw5-dev libreadline-gplv2-dev libssl-dev libsqlite3-dev tk-dev - - name: Install Python from source - run: | - curl -o Python-3.6.9.tgz https://www.python.org/ftp/python/3.6.9/Python-3.6.9.tgz - tar -zxvf Python-3.6.9.tgz - cd Python-3.6.9/ - ./configure - make install - - name: Checkout r2 - run: | - git clone https://github.com/${{ github.repository }} - cd radare2 - git fetch origin ${{ github.ref }} - git checkout -b local_branch FETCH_HEAD - - name: Checkout our Testsuite Binaries - uses: actions/checkout@v2 - with: - repository: radareorg/radare2-testbins - path: test/bins - - name: Configure with ACR and build - run: ./configure --prefix=/usr && make - working-directory: radare2 - - name: Install with make - run: make install - working-directory: radare2 - - name: Install test dependencies - run: python3 -m pip install --user 'git+https://github.com/radareorg/radare2-r2pipe#egg=r2pipe&subdirectory=python' - - name: Run tests - run: cd test && make - working-directory: radare2 - env: - PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml deleted file mode 100644 index c8eef5e297eb4..0000000000000 --- a/.github/workflows/docker.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Publish Docker -on: [push] -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - name: Publish to Registry - uses: elgohr/Publish-Docker-Github-Action@master - with: - name: radare/radare2 - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml deleted file mode 100644 index cf5598a18c738..0000000000000 --- a/.github/workflows/pr.yaml +++ /dev/null @@ -1,108 +0,0 @@ -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 python - if: (matrix.run_tests || matrix.build_system == 'meson') && matrix.os != 'macos-latest' - run: sudo apt-get --assume-yes install python3-wheel python3-setuptools - - name: Install meson and ninja - if: matrix.build_system == 'meson' - run: pip3 install --user meson==0.52.0 ninja==1.10.0 - - name: Install test dependencies - if: matrix.run_tests - run: pip3 install --user 'git+https://github.com/radareorg/radare2-r2pipe#egg=r2pipe&subdirectory=python' - - 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 }} - diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0a77aadd83908..a6a60608a1926 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,12 @@ on: push: branches: - 'release-*' + - master + schedule: + - cron: '0 18 * * 1,3,5' # Three-weekly at 18:00 UTC on Monday, Wednesday, and Friday + pull_request: + branches: + - master jobs: # TODO: add build check for capstone 3 @@ -11,8 +17,209 @@ jobs: # TODO: add build check for capstone 5 # TODO: build r2-bindings + build-and-test: + name: ${{ matrix.name }} + runs-on: ${{ matrix.os }} + timeout-minutes: 35 + strategy: + fail-fast: false + matrix: + name: [linux-acr-gcc-tests, linux-acr-clang-tests, linux-meson-gcc-tests, linux-meson-gcc-newshell-tests, macos-clang-tests] + include: + - name: linux-acr-gcc + os: ubuntu-latest + build_system: acr + compiler: gcc + run_tests: true + - name: linux-acr-clang + os: ubuntu-latest + build_system: acr + compiler: clang + run_tests: ${{ github.event_name == 'pull' }} + - name: linux-meson-gcc + os: ubuntu-latest + build_system: meson + compiler: gcc + meson_options: -Db_coverage=true + coverage: ${{ github.event_name == 'push' }} + run_tests: ${{ github.event_name == 'push' }} + - name: linux-meson-gcc-newshell + os: ubuntu-latest + build_system: meson + compiler: gcc + newshell: true + run_tests: true + - name: macos-clang + 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 python + if: (matrix.run_tests || matrix.build_system == 'meson') && matrix.os != 'macos-latest' + run: sudo apt-get --assume-yes install python3-wheel python3-setuptools + - name: Install meson and ninja + if: matrix.build_system == 'meson' + run: pip3 install --user meson==0.52.0 ninja==1.10.0 + - name: Install test dependencies + if: matrix.run_tests + run: pip3 install --user 'git+https://github.com/radareorg/radare2-r2pipe#egg=r2pipe&subdirectory=python' + - 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 }} + - name: Upload coverage info + uses: codecov/codecov-action@v1 + if: matrix.coverage == '1' + + build-centos6: + name: Build CentOS 6 + runs-on: ubuntu-latest + if: contains(github.event.pull_request.head.ref, 'centos') || contains(github.event.pull_request.head.ref, 'release-') || github.event_name == 'schedule' + container: centos:6 + steps: + - name: Install tools + run: yum install -y patch unzip git gcc make + - name: Checkout r2 + run: | + git clone https://github.com/${{ github.repository }} + cd radare2 + git fetch origin ${{ github.ref }} + git checkout -b local_branch FETCH_HEAD + - name: Configure with ACR and build + run: ./configure --prefix=/usr && make CS_RELEASE=1 + working-directory: radare2 + - name: Install with make + run: make install + working-directory: radare2 + - name: Run tests + run: cd test/unit && make + working-directory: radare2 + env: + # `make install` installs, for some unknown reasons, pkgconfig files in + # /usr/lib and not in /usr/lib64, thus pkg-config cannot find the right + # .pc files if the right path is not specified + PKG_CONFIG_PATH: /usr/lib/pkgconfig + + build-debian-jessie: + name: Debian Jessie build + runs-on: ubuntu-latest + if: contains(github.event.pull_request.head.ref, 'debian') || contains(github.event.pull_request.head.ref, 'release-') || github.event_name == 'schedule' + container: debian:jessie + + steps: + - name: Install tools + run: apt-get update && apt-get install --yes patch unzip git gcc make curl pkg-config libc6-i386 build-essential + - name: Install Python source build dependcies + run: apt-get install --yes checkinstall libbz2-dev libc6-dev libgdbm-dev libncursesw5-dev libreadline-gplv2-dev libssl-dev libsqlite3-dev tk-dev + - name: Install Python from source + run: | + curl -o Python-3.6.9.tgz https://www.python.org/ftp/python/3.6.9/Python-3.6.9.tgz + tar -zxvf Python-3.6.9.tgz + cd Python-3.6.9/ + ./configure + make install + - name: Checkout r2 + run: | + git clone https://github.com/${{ github.repository }} + cd radare2 + git fetch origin ${{ github.ref }} + git checkout -b local_branch FETCH_HEAD + - name: Checkout our Testsuite Binaries + uses: actions/checkout@v2 + with: + repository: radareorg/radare2-testbins + path: test/bins + - name: Configure with ACR and build + run: ./configure --prefix=/usr && make + working-directory: radare2 + - name: Install with make + run: make install + working-directory: radare2 + - name: Install test dependencies + run: python3 -m pip install --user 'git+https://github.com/radareorg/radare2-r2pipe#egg=r2pipe&subdirectory=python' + - name: Run tests + run: cd test && make + working-directory: radare2 + env: + PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig + + build-static: + name: ubuntu-static-tests + if: contains(github.event.pull_request.head.ref, 'static') || contains(github.event.pull_request.head.ref, 'release-') || github.event_name == 'schedule' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Checkout our Testsuite Binaries + uses: actions/checkout@v2 + with: + repository: radareorg/radare2-testbins + path: test/bins + - name: Install static + run: | + ./sys/static.sh + sudo make symstall + - name: Run tests + run: | + r2 -v + r2r -v + create-tarball: name: Create source tarball + if: github.event_name == 'push' && contains(github.event.pull_request.head.ref, 'release-') + needs: [build-and-test, build-centos6, build-debian-jessie, build-static] runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -40,6 +247,8 @@ jobs: build-deb: name: Build deb package for ${{ matrix.container }} + if: github.event_name == 'push' && contains(github.event.pull_request.head.ref, 'release-') + needs: [build-and-test] runs-on: ubuntu-latest container: ${{ matrix.container }} strategy: @@ -80,6 +289,8 @@ jobs: build-osx-pkg: name: Build OSX package runs-on: macos-latest + if: github.event_name == 'push' && contains(github.event.pull_request.head.ref, 'release-') + needs: [build-and-test] steps: - uses: actions/checkout@v2 - name: Install pkg-config with Homebrew @@ -97,6 +308,8 @@ jobs: build-windows: name: Build Windows zip/installer ${{ matrix.name }} runs-on: windows-latest + if: github.event_name == 'push' && contains(github.event.pull_request.head.ref, 'release-') + needs: [build-and-test] strategy: fail-fast: false matrix: @@ -148,6 +361,8 @@ jobs: build-ios-cydia: name: Build iOS Cydia packages runs-on: macos-latest + if: github.event_name == 'push' && contains(github.event.pull_request.head.ref, 'release-') + needs: [build-and-test] steps: - uses: actions/checkout@v2 - name: Extract r2 version @@ -174,6 +389,8 @@ jobs: build-android: name: Build Android ${{ matrix.name }} package runs-on: ubuntu-latest + if: github.event_name == 'push' && contains(github.event.pull_request.head.ref, 'release-') + needs: [build-and-test] strategy: fail-fast: false matrix: @@ -199,6 +416,7 @@ jobs: build-extras: name: Build radare2 extras and r2pipe + if: github.event_name == 'push' && contains(github.event.pull_request.head.ref, 'release-') needs: [create-tarball] runs-on: ubuntu-latest env: @@ -330,7 +548,7 @@ jobs: create-release: runs-on: ubuntu-latest - needs: [create-tarball, test-deb, build-android, test-osx-pkg, test-windows-clang_cl, build-ios-cydia, build-extras] + needs: [build-and-test, create-tarball, test-deb, build-android, test-osx-pkg, test-windows-clang_cl, build-ios-cydia, build-extras] steps: - uses: actions/checkout@v2 - name: Extract r2 version @@ -470,7 +688,7 @@ jobs: publish-docker-image: runs-on: ubuntu-latest - needs: [create-release] + if: github.event_name == 'push' steps: - uses: actions/checkout@master - name: Publish to Registry diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml deleted file mode 100644 index 259dedb3b7df2..0000000000000 --- a/.github/workflows/static.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Radare2 CI - static build - -on: - schedule: - # “At 00:00 on every 7th day-of-week.” - - cron: '0 0 * * */7' - pull_request: - branches: - - master - -jobs: - build: - name: ubuntu-static-tests - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - if: github.event_name != 'pull_request' || contains(github.event.pull_request.head.ref, 'static') - - name: Checkout our Testsuite Binaries - if: github.event_name != 'pull_request' || contains(github.event.pull_request.head.ref, 'static') - uses: actions/checkout@v2 - with: - repository: radareorg/radare2-testbins - path: test/bins - - name: Install static - if: github.event_name != 'pull_request' || contains(github.event.pull_request.head.ref, 'static') - run: | - ./sys/static.sh - sudo make symstall - - name: Run tests - if: github.event_name != 'pull_request' || contains(github.event.pull_request.head.ref, 'static') - run: | - r2 -v - r2r -v From db0c118647e2e53a492af7ecd11e82d7eeefeb7d Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Tue, 14 Jul 2020 17:37:57 +0200 Subject: [PATCH 02/38] Rename release.yml to ci.yml --- .github/workflows/{release.yml => ci.yml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{release.yml => ci.yml} (99%) diff --git a/.github/workflows/release.yml b/.github/workflows/ci.yml similarity index 99% rename from .github/workflows/release.yml rename to .github/workflows/ci.yml index a6a60608a1926..034e093fdad09 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Release +name: CI on: push: From 57fa89a88cf63a55ceb9955932b93146a2eb8028 Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Tue, 14 Jul 2020 17:48:54 +0200 Subject: [PATCH 03/38] Run on all push events --- .github/workflows/ci.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 034e093fdad09..4a4cb6525a028 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,9 +2,6 @@ name: CI on: push: - branches: - - 'release-*' - - master schedule: - cron: '0 18 * * 1,3,5' # Three-weekly at 18:00 UTC on Monday, Wednesday, and Friday pull_request: From 3b71eabbf2ba7a257ce10597d83d7e582fd21951 Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Tue, 14 Jul 2020 17:49:53 +0200 Subject: [PATCH 04/38] test2 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4a4cb6525a028..2690c2e0f9e87 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,7 @@ name: CI on: - push: + push schedule: - cron: '0 18 * * 1,3,5' # Three-weekly at 18:00 UTC on Monday, Wednesday, and Friday pull_request: From 24b575a7e695dc15b7b7071df4a9428ee11ea026 Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Tue, 14 Jul 2020 17:50:34 +0200 Subject: [PATCH 05/38] all --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2690c2e0f9e87..4e7b5342375ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,9 @@ name: CI on: - push + push: + branches: + - '*' schedule: - cron: '0 18 * * 1,3,5' # Three-weekly at 18:00 UTC on Monday, Wednesday, and Friday pull_request: From 15e19a8d8d05d40bf0dc6bd713c96d6903d3f234 Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Tue, 14 Jul 2020 17:56:43 +0200 Subject: [PATCH 06/38] Fix if conditions --- .github/workflows/ci.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4e7b5342375ce..d0928352f416e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,7 @@ jobs: os: ubuntu-latest build_system: acr compiler: clang - run_tests: ${{ github.event_name == 'pull' }} + run_tests: ${{ github.event_name == 'push' }} - name: linux-meson-gcc os: ubuntu-latest build_system: meson @@ -126,7 +126,7 @@ jobs: build-centos6: name: Build CentOS 6 runs-on: ubuntu-latest - if: contains(github.event.pull_request.head.ref, 'centos') || contains(github.event.pull_request.head.ref, 'release-') || github.event_name == 'schedule' + if: contains(github.ref, 'centos') || contains(github.ref, 'release-') || github.event_name == 'schedule' container: centos:6 steps: - name: Install tools @@ -155,7 +155,7 @@ jobs: build-debian-jessie: name: Debian Jessie build runs-on: ubuntu-latest - if: contains(github.event.pull_request.head.ref, 'debian') || contains(github.event.pull_request.head.ref, 'release-') || github.event_name == 'schedule' + if: contains(github.ref, 'debian') || contains(github.ref, 'release-') || github.event_name == 'schedule' container: debian:jessie steps: @@ -197,7 +197,7 @@ jobs: build-static: name: ubuntu-static-tests - if: contains(github.event.pull_request.head.ref, 'static') || contains(github.event.pull_request.head.ref, 'release-') || github.event_name == 'schedule' + if: contains(github.ref, 'static') || contains(github.ref, 'release-') || github.event_name == 'schedule' runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -217,7 +217,7 @@ jobs: create-tarball: name: Create source tarball - if: github.event_name == 'push' && contains(github.event.pull_request.head.ref, 'release-') + if: github.event_name == 'push' && contains(github.ref, 'release-') needs: [build-and-test, build-centos6, build-debian-jessie, build-static] runs-on: ubuntu-latest steps: @@ -246,7 +246,7 @@ jobs: build-deb: name: Build deb package for ${{ matrix.container }} - if: github.event_name == 'push' && contains(github.event.pull_request.head.ref, 'release-') + if: github.event_name == 'push' && contains(github.ref, 'release-') needs: [build-and-test] runs-on: ubuntu-latest container: ${{ matrix.container }} @@ -288,7 +288,7 @@ jobs: build-osx-pkg: name: Build OSX package runs-on: macos-latest - if: github.event_name == 'push' && contains(github.event.pull_request.head.ref, 'release-') + if: github.event_name == 'push' && contains(github.ref, 'release-') needs: [build-and-test] steps: - uses: actions/checkout@v2 @@ -307,7 +307,7 @@ jobs: build-windows: name: Build Windows zip/installer ${{ matrix.name }} runs-on: windows-latest - if: github.event_name == 'push' && contains(github.event.pull_request.head.ref, 'release-') + if: github.event_name == 'push' && contains(github.ref, 'release-') needs: [build-and-test] strategy: fail-fast: false @@ -360,7 +360,7 @@ jobs: build-ios-cydia: name: Build iOS Cydia packages runs-on: macos-latest - if: github.event_name == 'push' && contains(github.event.pull_request.head.ref, 'release-') + if: github.event_name == 'push' && contains(github.ref, 'release-') needs: [build-and-test] steps: - uses: actions/checkout@v2 @@ -388,7 +388,7 @@ jobs: build-android: name: Build Android ${{ matrix.name }} package runs-on: ubuntu-latest - if: github.event_name == 'push' && contains(github.event.pull_request.head.ref, 'release-') + if: github.event_name == 'push' && contains(github.ref, 'release-') needs: [build-and-test] strategy: fail-fast: false @@ -415,7 +415,7 @@ jobs: build-extras: name: Build radare2 extras and r2pipe - if: github.event_name == 'push' && contains(github.event.pull_request.head.ref, 'release-') + if: github.event_name == 'push' && contains(github.ref, 'release-') needs: [create-tarball] runs-on: ubuntu-latest env: From 815a4e2a24c425600d0199b35984f8cebc181eb3 Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Fri, 17 Jul 2020 16:09:57 +0200 Subject: [PATCH 07/38] test --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d0928352f416e..5d6061e2b700d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,6 @@ name: CI + on: push: branches: From 19eebfd94ab8e350fffcfb3c46f9f311c3afba42 Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Fri, 17 Jul 2020 16:12:04 +0200 Subject: [PATCH 08/38] test --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5d6061e2b700d..8adba5cc9bbcc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -127,7 +127,7 @@ jobs: build-centos6: name: Build CentOS 6 runs-on: ubuntu-latest - if: contains(github.ref, 'centos') || contains(github.ref, 'release-') || github.event_name == 'schedule' + if: contains(github.ref, 'centos') container: centos:6 steps: - name: Install tools From 39c143391d490fcd5320a62384e93f214b40ccca Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Fri, 17 Jul 2020 16:15:43 +0200 Subject: [PATCH 09/38] test 2 --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8adba5cc9bbcc..48b77713ef0cb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,6 +20,7 @@ jobs: build-and-test: name: ${{ matrix.name }} runs-on: ${{ matrix.os }} + if: true timeout-minutes: 35 strategy: fail-fast: false From aace95b5f1b92aecbe8b570cf5a8d001bb91ae11 Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Fri, 17 Jul 2020 16:25:37 +0200 Subject: [PATCH 10/38] test 3 --- .github/workflows/ci.yml | 574 --------------------------------------- 1 file changed, 574 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 48b77713ef0cb..e894fd1322e62 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -125,577 +125,3 @@ jobs: uses: codecov/codecov-action@v1 if: matrix.coverage == '1' - build-centos6: - name: Build CentOS 6 - runs-on: ubuntu-latest - if: contains(github.ref, 'centos') - container: centos:6 - steps: - - name: Install tools - run: yum install -y patch unzip git gcc make - - name: Checkout r2 - run: | - git clone https://github.com/${{ github.repository }} - cd radare2 - git fetch origin ${{ github.ref }} - git checkout -b local_branch FETCH_HEAD - - name: Configure with ACR and build - run: ./configure --prefix=/usr && make CS_RELEASE=1 - working-directory: radare2 - - name: Install with make - run: make install - working-directory: radare2 - - name: Run tests - run: cd test/unit && make - working-directory: radare2 - env: - # `make install` installs, for some unknown reasons, pkgconfig files in - # /usr/lib and not in /usr/lib64, thus pkg-config cannot find the right - # .pc files if the right path is not specified - PKG_CONFIG_PATH: /usr/lib/pkgconfig - - build-debian-jessie: - name: Debian Jessie build - runs-on: ubuntu-latest - if: contains(github.ref, 'debian') || contains(github.ref, 'release-') || github.event_name == 'schedule' - container: debian:jessie - - steps: - - name: Install tools - run: apt-get update && apt-get install --yes patch unzip git gcc make curl pkg-config libc6-i386 build-essential - - name: Install Python source build dependcies - run: apt-get install --yes checkinstall libbz2-dev libc6-dev libgdbm-dev libncursesw5-dev libreadline-gplv2-dev libssl-dev libsqlite3-dev tk-dev - - name: Install Python from source - run: | - curl -o Python-3.6.9.tgz https://www.python.org/ftp/python/3.6.9/Python-3.6.9.tgz - tar -zxvf Python-3.6.9.tgz - cd Python-3.6.9/ - ./configure - make install - - name: Checkout r2 - run: | - git clone https://github.com/${{ github.repository }} - cd radare2 - git fetch origin ${{ github.ref }} - git checkout -b local_branch FETCH_HEAD - - name: Checkout our Testsuite Binaries - uses: actions/checkout@v2 - with: - repository: radareorg/radare2-testbins - path: test/bins - - name: Configure with ACR and build - run: ./configure --prefix=/usr && make - working-directory: radare2 - - name: Install with make - run: make install - working-directory: radare2 - - name: Install test dependencies - run: python3 -m pip install --user 'git+https://github.com/radareorg/radare2-r2pipe#egg=r2pipe&subdirectory=python' - - name: Run tests - run: cd test && make - working-directory: radare2 - env: - PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig - - build-static: - name: ubuntu-static-tests - if: contains(github.ref, 'static') || contains(github.ref, 'release-') || github.event_name == 'schedule' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Checkout our Testsuite Binaries - uses: actions/checkout@v2 - with: - repository: radareorg/radare2-testbins - path: test/bins - - name: Install static - run: | - ./sys/static.sh - sudo make symstall - - name: Run tests - run: | - r2 -v - r2r -v - - create-tarball: - name: Create source tarball - if: github.event_name == 'push' && contains(github.ref, 'release-') - needs: [build-and-test, build-centos6, build-debian-jessie, build-static] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Extract r2 version - shell: bash - run: echo "##[set-output name=branch;]$(python sys/version.py)" - id: extract_version - - name: Download capstone - run: | - ./configure - make -C shlr capstone - rm -rf shlr/capstone/.git - git clean -dxf . - rm -rf .git - - name: Create archive - run: | - cd .. - cp -r radare2 radare2-${{ steps.extract_version.outputs.branch}} - tar cvzf radare2-src.tar.gz radare2-${{ steps.extract_version.outputs.branch}} - mv radare2-src.tar.gz radare2/ - - uses: actions/upload-artifact@v2 - with: - name: radare2-src - path: radare2-src.tar.gz - - build-deb: - name: Build deb package for ${{ matrix.container }} - if: github.event_name == 'push' && contains(github.ref, 'release-') - needs: [build-and-test] - runs-on: ubuntu-latest - container: ${{ matrix.container }} - strategy: - fail-fast: false - matrix: - name: [debian-buster, ubuntu-1804] - include: - - name: debian-buster - container: debian:buster - - name: ubuntu-1804 - container: ubuntu:18.04 - steps: - - name: Install tools - run: apt-get update && apt-get install --yes patch unzip git gcc make curl pkg-config xz-utils - - name: Checkout r2 - run: | - git clone https://github.com/${{ github.repository }} - cd radare2 - git fetch origin ${{ github.ref }} - git checkout -b local_branch FETCH_HEAD - - name: Preparing the deb package - run: | - sys/debian.sh - mv radare2_*_amd64.deb radare2_amd64.deb - mv radare2-dev_*_amd64.deb radare2-dev_amd64.deb - working-directory: radare2 - - name: Upload deb file - uses: actions/upload-artifact@v2 - with: - name: radare2-${{ matrix.name }}-deb - path: radare2/radare2_amd64.deb - - name: Upload -dev deb file - uses: actions/upload-artifact@v2 - with: - name: radare2-dev-${{ matrix.name }}-deb - path: radare2/radare2-dev_amd64.deb - - build-osx-pkg: - name: Build OSX package - runs-on: macos-latest - if: github.event_name == 'push' && contains(github.ref, 'release-') - needs: [build-and-test] - steps: - - uses: actions/checkout@v2 - - name: Install pkg-config with Homebrew - run: brew install pkg-config - - name: Create OSX package - run: | - ./sys/osx-pkg.sh - mv sys/osx-pkg/radare2-*.pkg sys/osx-pkg/radare2.pkg - - name: Upload .pkg file - uses: actions/upload-artifact@v2 - with: - name: radare2.pkg - path: sys/osx-pkg/radare2.pkg - - build-windows: - name: Build Windows zip/installer ${{ matrix.name }} - runs-on: windows-latest - if: github.event_name == 'push' && contains(github.ref, 'release-') - needs: [build-and-test] - strategy: - fail-fast: false - matrix: - name: [vs2019_static, clang_cl] - include: - - name: vs2019_static - compiler: cl - meson_options: --default-library=static -Dstatic_runtime=true - - name: clang_cl - compiler: clang-cl - meson_options: --default-library=shared - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install meson ninja - - name: Extract r2 version - shell: pwsh - run: echo "##[set-output name=branch;]$( python sys\\version.py )" - id: extract_version - - name: Build with meson + ninja - shell: pwsh - run: | - .github\vsdevenv.ps1 - meson --buildtype=release --prefix=$PWD\radare2-install build ${{ matrix.meson_options }} - ninja -C build - ninja -C build install - - name: Create zip artifact - shell: pwsh - run: 7z a radare2-${{ matrix.name }}-${{ steps.extract_version.outputs.branch }}.zip $PWD\radare2-install - - uses: actions/upload-artifact@v2 - with: - name: radare2-${{ matrix.name }}-${{ steps.extract_version.outputs.branch }}.zip - path: .\radare2-${{ matrix.name }}-${{ steps.extract_version.outputs.branch }}.zip - - uses: actions/checkout@v2 - with: - repository: radareorg/radare2-win-installer - path: ./radare2-win-installer - - name: Create installer - shell: pwsh - run: iscc radare2-win-installer\radare2.iss /DRadare2Location=..\radare2-install\* /DLicenseLocation=..\COPYING.LESSER /DIcoLocation=radare2.ico /DMyAppVersion=${{ steps.extract_version.outputs.branch }} - - uses: actions/upload-artifact@v2 - with: - name: radare2_installer-${{ matrix.name }}-${{ steps.extract_version.outputs.branch }} - path: radare2-win-installer\Output\radare2.exe - - build-ios-cydia: - name: Build iOS Cydia packages - runs-on: macos-latest - if: github.event_name == 'push' && contains(github.ref, 'release-') - needs: [build-and-test] - steps: - - uses: actions/checkout@v2 - - name: Extract r2 version - shell: bash - run: echo "##[set-output name=branch;]$(python sys/version.py)" - id: extract_version - - name: Install pkg-config with Homebrew - run: brew install pkg-config - - name: Create cydia32 package - run: ./sys/ios-cydia32.sh - - name: List sys/cydia - run: ls -lahR ./sys/cydia - - uses: actions/upload-artifact@v2 - with: - name: radare2-arm32_${{ steps.extract_version.outputs.branch }}_iphoneos-arm - path: ./sys/cydia/radare2/radare2-arm32_${{ steps.extract_version.outputs.branch }}_iphoneos-arm.deb - - name: Create cydia package - run: ./sys/ios-cydia.sh - - uses: actions/upload-artifact@v2 - with: - name: radare2_${{ steps.extract_version.outputs.branch }}_iphoneos-arm - path: ./sys/cydia/radare2/radare2_${{ steps.extract_version.outputs.branch }}_iphoneos-arm.deb - - build-android: - name: Build Android ${{ matrix.name }} package - runs-on: ubuntu-latest - if: github.event_name == 'push' && contains(github.ref, 'release-') - needs: [build-and-test] - strategy: - fail-fast: false - matrix: - name: [x86_64, arm, aarch64] - steps: - - uses: actions/checkout@v2 - - name: Install dependencies - run: sudo apt-get --assume-yes install pax wget unzip python3-wheel python3-setuptools python3-pip && pip3 install --user meson ninja - - name: Compile with meson - run: | - export PATH=${HOME}/.local/bin:${PATH} - CFLAGS="-static" LDFLAGS="-static" meson --buildtype release --default-library static --prefix=/tmp/android-dir -Dblob=true build --cross-file .github/meson-android-${{ matrix.name }}.ini - ninja -C build && ninja -C build install - - name: Create radare2-android-${{ matrix.name }}.tar.gz - run: | - cd /tmp - rm -rf android-dir/include android-dir/lib - tar --transform 's/android-dir/data\/data\/org.radareorg.radare2installer/g' -cvf radare2-android-${{ matrix.name }}.tar.gz android-dir/ - - uses: actions/upload-artifact@v2 - with: - name: radare2-android-${{ matrix.name }} - path: /tmp/radare2-android-${{ matrix.name }}.tar.gz - - build-extras: - name: Build radare2 extras and r2pipe - if: github.event_name == 'push' && contains(github.ref, 'release-') - needs: [create-tarball] - runs-on: ubuntu-latest - env: - TESTS: 'armthumb baleful bcl ba2 blackfin blessr2 keystone-lib keystone lang-duktape mc6809 microblaze msil pcap ppcdisasm psosvm swf unicorn-lib unicorn vc4 x86udis x86bea x86tab x86olly x86zyan z80-nc' - R2PIPE_TESTS: 'r2pipe-go r2pipe-js r2pipe-py' - steps: - - uses: actions/download-artifact@v2 - with: - name: radare2-src - path: ./ - - name: Extract source tarball - run: mkdir radare2 && tar -C radare2 --strip-components=1 -xvf radare2-src.tar.gz - - name: Install dependencies - run: sudo apt-get --assume-yes install wget unzip python3-wheel python3-setuptools build-essential python3-pip && sudo pip3 install meson ninja - - name: Install radare2 - run: | - export PATH=$PATH:/usr/local/bin - meson --prefix=/usr --buildtype=release build && ninja -C build && sudo ninja -C build install - sudo ln -s radare2 /usr/bin/r2 - working-directory: radare2 - - name: Init r2pm - run: r2pm init && r2pm update - - name: Compile and install plugins - run: | - set -e - for p in $TESTS ; do - echo $p - r2pm -i $p - done - set +e - - name: Compile and install r2pipe - run: | - set -e - for p in $R2PIPE_TESTS ; do - echo $p - r2pm -i $p - done - set +e - - test-deb: - runs-on: ubuntu-latest - needs: [build-deb] - container: ${{ matrix.container }} - strategy: - fail-fast: false - matrix: - name: [debian-buster, ubuntu-1804] - include: - - name: debian-buster - container: debian:buster - - name: ubuntu-1804 - container: ubuntu:18.04 - steps: - - name: Install tools - run: apt-get update && apt-get install --yes gcc pkg-config - - uses: actions/download-artifact@v2 - with: - name: radare2-${{ matrix.name }}-deb - path: ./ - - uses: actions/download-artifact@v2 - with: - name: radare2-dev-${{ matrix.name }}-deb - path: ./ - - name: Install radare2 debs - run: apt-get update && apt-get install ./radare2*.deb - - name: Check that installed radare2 runs - run: radare2 -qcq /bin/ls - - name: Check that libraries can be used - shell: bash - run: | - echo -e "#include \nint main(int argc, char **argv) { return r_str_newf (\"%s\", argv[0]) != NULL? 0: 1; }" > test.c - gcc -o test test.c $(pkg-config --libs --cflags r_util) - ./test - - test-osx-pkg: - runs-on: macos-latest - needs: [build-osx-pkg] - steps: - - name: Install pkg-config with Homebrew - run: brew install pkg-config - - uses: actions/download-artifact@v2 - with: - name: radare2.pkg - path: ./ - - name: Install radare2.pkg - run: sudo installer -pkg ./radare2.pkg -target / - - name: Check that installed radare2 runs - run: radare2 -qcq /bin/ls - - name: Check that libraries can be used - run: | - echo -e "#include \nint main(int argc, char **argv) { return r_str_newf (\"%s\", argv[0]) != NULL? 0: 1; }" > test.c - clang -o test test.c $(pkg-config --libs --cflags r_util) - ./test - - test-windows-clang_cl: - runs-on: windows-latest - needs: [build-windows] - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - - name: Install pkg-config - shell: pwsh - run: choco install -y pkgconfiglite - - name: Extract r2 version - shell: pwsh - run: echo "##[set-output name=branch;]$( python sys\\version.py )" - id: extract_version - - uses: actions/download-artifact@v2 - with: - name: radare2_installer-clang_cl-${{ steps.extract_version.outputs.branch }} - path: ./ - - name: Install radare.exe - shell: pwsh - run: Start-Process -Wait -FilePath .\radare2.exe -ArgumentList "/SP- /SILENT" -PassThru - - name: Check that installed radare2 runs - shell: pwsh - run: ~\AppData\Local\Programs\radare2\bin\radare2.exe -qcq .\radare2.exe - - name: Check that libraries can be used - shell: pwsh - run: | - .github\vsdevenv.ps1 - $env:PATH = "$env:PATH;C:$env:HOMEPATH\AppData\Local\Programs\radare2\bin" - $env:PKG_CONFIG_PATH = "C:$env:HOMEPATH\AppData\Local\Programs\radare2\lib\pkgconfig" - $env:PKG_CONFIG_PATH - pkg-config --list-all - echo "#include `nint main(int argc, char **argv) { return r_str_newf (`"%s`", argv[0]) != NULL? 0: 1; }" > test.c - cl -IC:$env:HOMEPATH\AppData\Local\Programs\radare2\include\libr /Fetest.exe test.c /link /libpath:C:$env:HOMEPATH\AppData\Local\Programs\radare2\lib r_util.lib - .\test.exe - - create-release: - runs-on: ubuntu-latest - needs: [build-and-test, create-tarball, test-deb, build-android, test-osx-pkg, test-windows-clang_cl, build-ios-cydia, build-extras] - steps: - - uses: actions/checkout@v2 - - name: Extract r2 version - shell: bash - run: echo "##[set-output name=branch;]$(python sys/version.py)" - id: extract_version - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ steps.extract_version.outputs.branch }} - release_name: Release ${{ steps.extract_version.outputs.branch }} - draft: true - prerelease: false - - uses: actions/download-artifact@v2 - - name: Display structure of downloaded files - run: ls -R - - name: Upload radare2 src tarball - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./radare2-src/radare2-src.tar.gz - asset_name: radare2-src-${{ steps.extract_version.outputs.branch }}.tar.gz - asset_content_type: application/zip - - name: Upload radare2 debian:buster package - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./radare2-debian-buster-deb/radare2_amd64.deb - asset_name: radare2-debian-buster_${{ steps.extract_version.outputs.branch }}_amd64.deb - asset_content_type: application/zip - - name: Upload radare2-dev debian:buster package - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./radare2-dev-debian-buster-deb/radare2-dev_amd64.deb - asset_name: radare2-dev-debian-buster_${{ steps.extract_version.outputs.branch }}_amd64.deb - asset_content_type: application/zip - - name: Upload radare2 ubuntu:18.04 package - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./radare2-ubuntu-1804-deb/radare2_amd64.deb - asset_name: radare2-ubuntu-1804_${{ steps.extract_version.outputs.branch }}_amd64.deb - asset_content_type: application/zip - - name: Upload radare2-dev ubuntu:18.04 package - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./radare2-dev-ubuntu-1804-deb/radare2-dev_amd64.deb - asset_name: radare2-dev-ubuntu-1804_${{ steps.extract_version.outputs.branch }}_amd64.deb - asset_content_type: application/zip - - name: Upload radare2 android x86_64 tar.gz - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./radare2-android-x86_64/radare2-android-x86_64.tar.gz - asset_name: radare2-${{ steps.extract_version.outputs.branch }}-android-x86_64.tar.gz - asset_content_type: application/zip - - name: Upload radare2 android arm tar.gz - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./radare2-android-arm/radare2-android-arm.tar.gz - asset_name: radare2-${{ steps.extract_version.outputs.branch }}-android-arm.tar.gz - asset_content_type: application/zip - - name: Upload radare2 android aarch64 tar.gz - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./radare2-android-aarch64/radare2-android-aarch64.tar.gz - asset_name: radare2-${{ steps.extract_version.outputs.branch }}-android-aarch64.tar.gz - asset_content_type: application/zip - - name: Upload radare2 OSX pkg - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./radare2.pkg/radare2.pkg - asset_name: radare2-macos-${{ steps.extract_version.outputs.branch }}.pkg - asset_content_type: application/zip - - name: Upload radare2 windows archive - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./radare2-vs2019_static-${{ steps.extract_version.outputs.branch }}.zip/radare2-vs2019_static-${{ steps.extract_version.outputs.branch }}.zip - asset_name: radare2-windows-static-${{ steps.extract_version.outputs.branch }}.zip - asset_content_type: application/zip - - name: Upload radare2 windows installer - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./radare2_installer-clang_cl-${{ steps.extract_version.outputs.branch }}/radare2.exe - asset_name: radare2_installer-${{ steps.extract_version.outputs.branch }}.exe - asset_content_type: application/zip - - name: Upload radare2 iOS arm32 cydia package - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./radare2-arm32_${{ steps.extract_version.outputs.branch }}_iphoneos-arm/radare2-arm32_${{ steps.extract_version.outputs.branch }}_iphoneos-arm.deb - asset_name: radare2-arm32_${{ steps.extract_version.outputs.branch }}_iphoneos-arm.deb - asset_content_type: application/zip - - name: Upload radare2 iOS aarch64 cydia package - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./radare2_${{ steps.extract_version.outputs.branch }}_iphoneos-arm/radare2_${{ steps.extract_version.outputs.branch }}_iphoneos-arm.deb - asset_name: radare2-aarch64_${{ steps.extract_version.outputs.branch }}_iphoneos-arm.deb - asset_content_type: application/zip - - publish-docker-image: - runs-on: ubuntu-latest - if: github.event_name == 'push' - steps: - - uses: actions/checkout@master - - name: Publish to Registry - uses: docker/build-push-action@v1 - with: - repository: ${{ secrets.DOCKER_USERNAME }}/radare2 - tag_with_ref: true - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} From 3a035406e51371bb21cda1b7edb3b96464804d15 Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Fri, 17 Jul 2020 16:32:55 +0200 Subject: [PATCH 11/38] Update ci.yml --- .github/workflows/ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e894fd1322e62..3b2fd67b4016b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,14 +18,13 @@ jobs: # TODO: build r2-bindings build-and-test: - name: ${{ matrix.name }} + name: ${{ matrix.name }}-tests-${{ matrix.run_tests }} runs-on: ${{ matrix.os }} - if: true timeout-minutes: 35 strategy: fail-fast: false matrix: - name: [linux-acr-gcc-tests, linux-acr-clang-tests, linux-meson-gcc-tests, linux-meson-gcc-newshell-tests, macos-clang-tests] + name: [linux-acr-gcc, linux-acr-clang, linux-meson-gcc, linux-meson-gcc-newshell, macos-clang] include: - name: linux-acr-gcc os: ubuntu-latest From 2ea2b2ac107f2881a7eb7a324c9767da19f2d0c3 Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Fri, 17 Jul 2020 16:38:45 +0200 Subject: [PATCH 12/38] test 4 --- .github/workflows/ci.yml | 574 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 574 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3b2fd67b4016b..3461d46c7909e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -124,3 +124,577 @@ jobs: uses: codecov/codecov-action@v1 if: matrix.coverage == '1' + build-centos6: + name: Build CentOS 6 + runs-on: ubuntu-latest + if: contains(github.ref, 'centos') || contains(github.ref, 'release-') || github.event_name == 'schedule' + container: centos:6 + steps: + - name: Install tools + run: yum install -y patch unzip git gcc make + - name: Checkout r2 + run: | + git clone https://github.com/${{ github.repository }} + cd radare2 + git fetch origin ${{ github.ref }} + git checkout -b local_branch FETCH_HEAD + - name: Configure with ACR and build + run: ./configure --prefix=/usr && make CS_RELEASE=1 + working-directory: radare2 + - name: Install with make + run: make install + working-directory: radare2 + - name: Run tests + run: cd test/unit && make + working-directory: radare2 + env: + # `make install` installs, for some unknown reasons, pkgconfig files in + # /usr/lib and not in /usr/lib64, thus pkg-config cannot find the right + # .pc files if the right path is not specified + PKG_CONFIG_PATH: /usr/lib/pkgconfig + + build-debian-jessie: + name: Debian Jessie build + runs-on: ubuntu-latest + if: contains(github.ref, 'debian') || contains(github.ref, 'release-') || github.event_name == 'schedule' + container: debian:jessie + + steps: + - name: Install tools + run: apt-get update && apt-get install --yes patch unzip git gcc make curl pkg-config libc6-i386 build-essential + - name: Install Python source build dependcies + run: apt-get install --yes checkinstall libbz2-dev libc6-dev libgdbm-dev libncursesw5-dev libreadline-gplv2-dev libssl-dev libsqlite3-dev tk-dev + - name: Install Python from source + run: | + curl -o Python-3.6.9.tgz https://www.python.org/ftp/python/3.6.9/Python-3.6.9.tgz + tar -zxvf Python-3.6.9.tgz + cd Python-3.6.9/ + ./configure + make install + - name: Checkout r2 + run: | + git clone https://github.com/${{ github.repository }} + cd radare2 + git fetch origin ${{ github.ref }} + git checkout -b local_branch FETCH_HEAD + - name: Checkout our Testsuite Binaries + uses: actions/checkout@v2 + with: + repository: radareorg/radare2-testbins + path: test/bins + - name: Configure with ACR and build + run: ./configure --prefix=/usr && make + working-directory: radare2 + - name: Install with make + run: make install + working-directory: radare2 + - name: Install test dependencies + run: python3 -m pip install --user 'git+https://github.com/radareorg/radare2-r2pipe#egg=r2pipe&subdirectory=python' + - name: Run tests + run: cd test && make + working-directory: radare2 + env: + PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig + + build-static: + name: ubuntu-static-tests + if: contains(github.ref, 'static') || contains(github.ref, 'release-') || github.event_name == 'schedule' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Checkout our Testsuite Binaries + uses: actions/checkout@v2 + with: + repository: radareorg/radare2-testbins + path: test/bins + - name: Install static + run: | + ./sys/static.sh + sudo make symstall + - name: Run tests + run: | + r2 -v + r2r -v + + create-tarball: + name: Create source tarball + if: github.event_name == 'push' && contains(github.ref, 'release-') + needs: [build-and-test, build-centos6, build-debian-jessie, build-static] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Extract r2 version + shell: bash + run: echo "##[set-output name=branch;]$(python sys/version.py)" + id: extract_version + - name: Download capstone + run: | + ./configure + make -C shlr capstone + rm -rf shlr/capstone/.git + git clean -dxf . + rm -rf .git + - name: Create archive + run: | + cd .. + cp -r radare2 radare2-${{ steps.extract_version.outputs.branch}} + tar cvzf radare2-src.tar.gz radare2-${{ steps.extract_version.outputs.branch}} + mv radare2-src.tar.gz radare2/ + - uses: actions/upload-artifact@v2 + with: + name: radare2-src + path: radare2-src.tar.gz + + build-deb: + name: Build deb package for ${{ matrix.container }} + if: github.event_name == 'push' && contains(github.ref, 'release-') + needs: [build-and-test] + runs-on: ubuntu-latest + container: ${{ matrix.container }} + strategy: + fail-fast: false + matrix: + name: [debian-buster, ubuntu-1804] + include: + - name: debian-buster + container: debian:buster + - name: ubuntu-1804 + container: ubuntu:18.04 + steps: + - name: Install tools + run: apt-get update && apt-get install --yes patch unzip git gcc make curl pkg-config xz-utils + - name: Checkout r2 + run: | + git clone https://github.com/${{ github.repository }} + cd radare2 + git fetch origin ${{ github.ref }} + git checkout -b local_branch FETCH_HEAD + - name: Preparing the deb package + run: | + sys/debian.sh + mv radare2_*_amd64.deb radare2_amd64.deb + mv radare2-dev_*_amd64.deb radare2-dev_amd64.deb + working-directory: radare2 + - name: Upload deb file + uses: actions/upload-artifact@v2 + with: + name: radare2-${{ matrix.name }}-deb + path: radare2/radare2_amd64.deb + - name: Upload -dev deb file + uses: actions/upload-artifact@v2 + with: + name: radare2-dev-${{ matrix.name }}-deb + path: radare2/radare2-dev_amd64.deb + + build-osx-pkg: + name: Build OSX package + runs-on: macos-latest + if: github.event_name == 'push' && contains(github.ref, 'release-') + needs: [build-and-test] + steps: + - uses: actions/checkout@v2 + - name: Install pkg-config with Homebrew + run: brew install pkg-config + - name: Create OSX package + run: | + ./sys/osx-pkg.sh + mv sys/osx-pkg/radare2-*.pkg sys/osx-pkg/radare2.pkg + - name: Upload .pkg file + uses: actions/upload-artifact@v2 + with: + name: radare2.pkg + path: sys/osx-pkg/radare2.pkg + + build-windows: + name: Build Windows zip/installer ${{ matrix.name }} + runs-on: windows-latest + if: github.event_name == 'push' && contains(github.ref, 'release-') + needs: [build-and-test] + strategy: + fail-fast: false + matrix: + name: [vs2019_static, clang_cl] + include: + - name: vs2019_static + compiler: cl + meson_options: --default-library=static -Dstatic_runtime=true + - name: clang_cl + compiler: clang-cl + meson_options: --default-library=shared + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install meson ninja + - name: Extract r2 version + shell: pwsh + run: echo "##[set-output name=branch;]$( python sys\\version.py )" + id: extract_version + - name: Build with meson + ninja + shell: pwsh + run: | + .github\vsdevenv.ps1 + meson --buildtype=release --prefix=$PWD\radare2-install build ${{ matrix.meson_options }} + ninja -C build + ninja -C build install + - name: Create zip artifact + shell: pwsh + run: 7z a radare2-${{ matrix.name }}-${{ steps.extract_version.outputs.branch }}.zip $PWD\radare2-install + - uses: actions/upload-artifact@v2 + with: + name: radare2-${{ matrix.name }}-${{ steps.extract_version.outputs.branch }}.zip + path: .\radare2-${{ matrix.name }}-${{ steps.extract_version.outputs.branch }}.zip + - uses: actions/checkout@v2 + with: + repository: radareorg/radare2-win-installer + path: ./radare2-win-installer + - name: Create installer + shell: pwsh + run: iscc radare2-win-installer\radare2.iss /DRadare2Location=..\radare2-install\* /DLicenseLocation=..\COPYING.LESSER /DIcoLocation=radare2.ico /DMyAppVersion=${{ steps.extract_version.outputs.branch }} + - uses: actions/upload-artifact@v2 + with: + name: radare2_installer-${{ matrix.name }}-${{ steps.extract_version.outputs.branch }} + path: radare2-win-installer\Output\radare2.exe + + build-ios-cydia: + name: Build iOS Cydia packages + runs-on: macos-latest + if: github.event_name == 'push' && contains(github.ref, 'release-') + needs: [build-and-test] + steps: + - uses: actions/checkout@v2 + - name: Extract r2 version + shell: bash + run: echo "##[set-output name=branch;]$(python sys/version.py)" + id: extract_version + - name: Install pkg-config with Homebrew + run: brew install pkg-config + - name: Create cydia32 package + run: ./sys/ios-cydia32.sh + - name: List sys/cydia + run: ls -lahR ./sys/cydia + - uses: actions/upload-artifact@v2 + with: + name: radare2-arm32_${{ steps.extract_version.outputs.branch }}_iphoneos-arm + path: ./sys/cydia/radare2/radare2-arm32_${{ steps.extract_version.outputs.branch }}_iphoneos-arm.deb + - name: Create cydia package + run: ./sys/ios-cydia.sh + - uses: actions/upload-artifact@v2 + with: + name: radare2_${{ steps.extract_version.outputs.branch }}_iphoneos-arm + path: ./sys/cydia/radare2/radare2_${{ steps.extract_version.outputs.branch }}_iphoneos-arm.deb + + build-android: + name: Build Android ${{ matrix.name }} package + runs-on: ubuntu-latest + if: github.event_name == 'push' && contains(github.ref, 'release-') + needs: [build-and-test] + strategy: + fail-fast: false + matrix: + name: [x86_64, arm, aarch64] + steps: + - uses: actions/checkout@v2 + - name: Install dependencies + run: sudo apt-get --assume-yes install pax wget unzip python3-wheel python3-setuptools python3-pip && pip3 install --user meson ninja + - name: Compile with meson + run: | + export PATH=${HOME}/.local/bin:${PATH} + CFLAGS="-static" LDFLAGS="-static" meson --buildtype release --default-library static --prefix=/tmp/android-dir -Dblob=true build --cross-file .github/meson-android-${{ matrix.name }}.ini + ninja -C build && ninja -C build install + - name: Create radare2-android-${{ matrix.name }}.tar.gz + run: | + cd /tmp + rm -rf android-dir/include android-dir/lib + tar --transform 's/android-dir/data\/data\/org.radareorg.radare2installer/g' -cvf radare2-android-${{ matrix.name }}.tar.gz android-dir/ + - uses: actions/upload-artifact@v2 + with: + name: radare2-android-${{ matrix.name }} + path: /tmp/radare2-android-${{ matrix.name }}.tar.gz + + build-extras: + name: Build radare2 extras and r2pipe + if: github.event_name == 'push' && contains(github.ref, 'release-') + needs: [create-tarball] + runs-on: ubuntu-latest + env: + TESTS: 'armthumb baleful bcl ba2 blackfin blessr2 keystone-lib keystone lang-duktape mc6809 microblaze msil pcap ppcdisasm psosvm swf unicorn-lib unicorn vc4 x86udis x86bea x86tab x86olly x86zyan z80-nc' + R2PIPE_TESTS: 'r2pipe-go r2pipe-js r2pipe-py' + steps: + - uses: actions/download-artifact@v2 + with: + name: radare2-src + path: ./ + - name: Extract source tarball + run: mkdir radare2 && tar -C radare2 --strip-components=1 -xvf radare2-src.tar.gz + - name: Install dependencies + run: sudo apt-get --assume-yes install wget unzip python3-wheel python3-setuptools build-essential python3-pip && sudo pip3 install meson ninja + - name: Install radare2 + run: | + export PATH=$PATH:/usr/local/bin + meson --prefix=/usr --buildtype=release build && ninja -C build && sudo ninja -C build install + sudo ln -s radare2 /usr/bin/r2 + working-directory: radare2 + - name: Init r2pm + run: r2pm init && r2pm update + - name: Compile and install plugins + run: | + set -e + for p in $TESTS ; do + echo $p + r2pm -i $p + done + set +e + - name: Compile and install r2pipe + run: | + set -e + for p in $R2PIPE_TESTS ; do + echo $p + r2pm -i $p + done + set +e + + test-deb: + runs-on: ubuntu-latest + needs: [build-deb] + container: ${{ matrix.container }} + strategy: + fail-fast: false + matrix: + name: [debian-buster, ubuntu-1804] + include: + - name: debian-buster + container: debian:buster + - name: ubuntu-1804 + container: ubuntu:18.04 + steps: + - name: Install tools + run: apt-get update && apt-get install --yes gcc pkg-config + - uses: actions/download-artifact@v2 + with: + name: radare2-${{ matrix.name }}-deb + path: ./ + - uses: actions/download-artifact@v2 + with: + name: radare2-dev-${{ matrix.name }}-deb + path: ./ + - name: Install radare2 debs + run: apt-get update && apt-get install ./radare2*.deb + - name: Check that installed radare2 runs + run: radare2 -qcq /bin/ls + - name: Check that libraries can be used + shell: bash + run: | + echo -e "#include \nint main(int argc, char **argv) { return r_str_newf (\"%s\", argv[0]) != NULL? 0: 1; }" > test.c + gcc -o test test.c $(pkg-config --libs --cflags r_util) + ./test + + test-osx-pkg: + runs-on: macos-latest + needs: [build-osx-pkg] + steps: + - name: Install pkg-config with Homebrew + run: brew install pkg-config + - uses: actions/download-artifact@v2 + with: + name: radare2.pkg + path: ./ + - name: Install radare2.pkg + run: sudo installer -pkg ./radare2.pkg -target / + - name: Check that installed radare2 runs + run: radare2 -qcq /bin/ls + - name: Check that libraries can be used + run: | + echo -e "#include \nint main(int argc, char **argv) { return r_str_newf (\"%s\", argv[0]) != NULL? 0: 1; }" > test.c + clang -o test test.c $(pkg-config --libs --cflags r_util) + ./test + + test-windows-clang_cl: + runs-on: windows-latest + needs: [build-windows] + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + - name: Install pkg-config + shell: pwsh + run: choco install -y pkgconfiglite + - name: Extract r2 version + shell: pwsh + run: echo "##[set-output name=branch;]$( python sys\\version.py )" + id: extract_version + - uses: actions/download-artifact@v2 + with: + name: radare2_installer-clang_cl-${{ steps.extract_version.outputs.branch }} + path: ./ + - name: Install radare.exe + shell: pwsh + run: Start-Process -Wait -FilePath .\radare2.exe -ArgumentList "/SP- /SILENT" -PassThru + - name: Check that installed radare2 runs + shell: pwsh + run: ~\AppData\Local\Programs\radare2\bin\radare2.exe -qcq .\radare2.exe + - name: Check that libraries can be used + shell: pwsh + run: | + .github\vsdevenv.ps1 + $env:PATH = "$env:PATH;C:$env:HOMEPATH\AppData\Local\Programs\radare2\bin" + $env:PKG_CONFIG_PATH = "C:$env:HOMEPATH\AppData\Local\Programs\radare2\lib\pkgconfig" + $env:PKG_CONFIG_PATH + pkg-config --list-all + echo "#include `nint main(int argc, char **argv) { return r_str_newf (`"%s`", argv[0]) != NULL? 0: 1; }" > test.c + cl -IC:$env:HOMEPATH\AppData\Local\Programs\radare2\include\libr /Fetest.exe test.c /link /libpath:C:$env:HOMEPATH\AppData\Local\Programs\radare2\lib r_util.lib + .\test.exe + + create-release: + runs-on: ubuntu-latest + needs: [build-and-test, create-tarball, test-deb, build-android, test-osx-pkg, test-windows-clang_cl, build-ios-cydia, build-extras] + steps: + - uses: actions/checkout@v2 + - name: Extract r2 version + shell: bash + run: echo "##[set-output name=branch;]$(python sys/version.py)" + id: extract_version + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ steps.extract_version.outputs.branch }} + release_name: Release ${{ steps.extract_version.outputs.branch }} + draft: true + prerelease: false + - uses: actions/download-artifact@v2 + - name: Display structure of downloaded files + run: ls -R + - name: Upload radare2 src tarball + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./radare2-src/radare2-src.tar.gz + asset_name: radare2-src-${{ steps.extract_version.outputs.branch }}.tar.gz + asset_content_type: application/zip + - name: Upload radare2 debian:buster package + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./radare2-debian-buster-deb/radare2_amd64.deb + asset_name: radare2-debian-buster_${{ steps.extract_version.outputs.branch }}_amd64.deb + asset_content_type: application/zip + - name: Upload radare2-dev debian:buster package + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./radare2-dev-debian-buster-deb/radare2-dev_amd64.deb + asset_name: radare2-dev-debian-buster_${{ steps.extract_version.outputs.branch }}_amd64.deb + asset_content_type: application/zip + - name: Upload radare2 ubuntu:18.04 package + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./radare2-ubuntu-1804-deb/radare2_amd64.deb + asset_name: radare2-ubuntu-1804_${{ steps.extract_version.outputs.branch }}_amd64.deb + asset_content_type: application/zip + - name: Upload radare2-dev ubuntu:18.04 package + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./radare2-dev-ubuntu-1804-deb/radare2-dev_amd64.deb + asset_name: radare2-dev-ubuntu-1804_${{ steps.extract_version.outputs.branch }}_amd64.deb + asset_content_type: application/zip + - name: Upload radare2 android x86_64 tar.gz + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./radare2-android-x86_64/radare2-android-x86_64.tar.gz + asset_name: radare2-${{ steps.extract_version.outputs.branch }}-android-x86_64.tar.gz + asset_content_type: application/zip + - name: Upload radare2 android arm tar.gz + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./radare2-android-arm/radare2-android-arm.tar.gz + asset_name: radare2-${{ steps.extract_version.outputs.branch }}-android-arm.tar.gz + asset_content_type: application/zip + - name: Upload radare2 android aarch64 tar.gz + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./radare2-android-aarch64/radare2-android-aarch64.tar.gz + asset_name: radare2-${{ steps.extract_version.outputs.branch }}-android-aarch64.tar.gz + asset_content_type: application/zip + - name: Upload radare2 OSX pkg + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./radare2.pkg/radare2.pkg + asset_name: radare2-macos-${{ steps.extract_version.outputs.branch }}.pkg + asset_content_type: application/zip + - name: Upload radare2 windows archive + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./radare2-vs2019_static-${{ steps.extract_version.outputs.branch }}.zip/radare2-vs2019_static-${{ steps.extract_version.outputs.branch }}.zip + asset_name: radare2-windows-static-${{ steps.extract_version.outputs.branch }}.zip + asset_content_type: application/zip + - name: Upload radare2 windows installer + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./radare2_installer-clang_cl-${{ steps.extract_version.outputs.branch }}/radare2.exe + asset_name: radare2_installer-${{ steps.extract_version.outputs.branch }}.exe + asset_content_type: application/zip + - name: Upload radare2 iOS arm32 cydia package + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./radare2-arm32_${{ steps.extract_version.outputs.branch }}_iphoneos-arm/radare2-arm32_${{ steps.extract_version.outputs.branch }}_iphoneos-arm.deb + asset_name: radare2-arm32_${{ steps.extract_version.outputs.branch }}_iphoneos-arm.deb + asset_content_type: application/zip + - name: Upload radare2 iOS aarch64 cydia package + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./radare2_${{ steps.extract_version.outputs.branch }}_iphoneos-arm/radare2_${{ steps.extract_version.outputs.branch }}_iphoneos-arm.deb + asset_name: radare2-aarch64_${{ steps.extract_version.outputs.branch }}_iphoneos-arm.deb + asset_content_type: application/zip + + publish-docker-image: + runs-on: ubuntu-latest + if: github.event_name == 'push' + steps: + - uses: actions/checkout@master + - name: Publish to Registry + uses: docker/build-push-action@v1 + with: + repository: ${{ secrets.DOCKER_USERNAME }}/radare2 + tag_with_ref: true + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} From 9cc005d731886b6b05b025d2d0a6ecb5467eec08 Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Fri, 17 Jul 2020 16:40:25 +0200 Subject: [PATCH 13/38] test 5 --- .github/workflows/ci.yml | 546 --------------------------------------- 1 file changed, 546 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3461d46c7909e..0f2637644c82f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -152,549 +152,3 @@ jobs: # /usr/lib and not in /usr/lib64, thus pkg-config cannot find the right # .pc files if the right path is not specified PKG_CONFIG_PATH: /usr/lib/pkgconfig - - build-debian-jessie: - name: Debian Jessie build - runs-on: ubuntu-latest - if: contains(github.ref, 'debian') || contains(github.ref, 'release-') || github.event_name == 'schedule' - container: debian:jessie - - steps: - - name: Install tools - run: apt-get update && apt-get install --yes patch unzip git gcc make curl pkg-config libc6-i386 build-essential - - name: Install Python source build dependcies - run: apt-get install --yes checkinstall libbz2-dev libc6-dev libgdbm-dev libncursesw5-dev libreadline-gplv2-dev libssl-dev libsqlite3-dev tk-dev - - name: Install Python from source - run: | - curl -o Python-3.6.9.tgz https://www.python.org/ftp/python/3.6.9/Python-3.6.9.tgz - tar -zxvf Python-3.6.9.tgz - cd Python-3.6.9/ - ./configure - make install - - name: Checkout r2 - run: | - git clone https://github.com/${{ github.repository }} - cd radare2 - git fetch origin ${{ github.ref }} - git checkout -b local_branch FETCH_HEAD - - name: Checkout our Testsuite Binaries - uses: actions/checkout@v2 - with: - repository: radareorg/radare2-testbins - path: test/bins - - name: Configure with ACR and build - run: ./configure --prefix=/usr && make - working-directory: radare2 - - name: Install with make - run: make install - working-directory: radare2 - - name: Install test dependencies - run: python3 -m pip install --user 'git+https://github.com/radareorg/radare2-r2pipe#egg=r2pipe&subdirectory=python' - - name: Run tests - run: cd test && make - working-directory: radare2 - env: - PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig - - build-static: - name: ubuntu-static-tests - if: contains(github.ref, 'static') || contains(github.ref, 'release-') || github.event_name == 'schedule' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Checkout our Testsuite Binaries - uses: actions/checkout@v2 - with: - repository: radareorg/radare2-testbins - path: test/bins - - name: Install static - run: | - ./sys/static.sh - sudo make symstall - - name: Run tests - run: | - r2 -v - r2r -v - - create-tarball: - name: Create source tarball - if: github.event_name == 'push' && contains(github.ref, 'release-') - needs: [build-and-test, build-centos6, build-debian-jessie, build-static] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Extract r2 version - shell: bash - run: echo "##[set-output name=branch;]$(python sys/version.py)" - id: extract_version - - name: Download capstone - run: | - ./configure - make -C shlr capstone - rm -rf shlr/capstone/.git - git clean -dxf . - rm -rf .git - - name: Create archive - run: | - cd .. - cp -r radare2 radare2-${{ steps.extract_version.outputs.branch}} - tar cvzf radare2-src.tar.gz radare2-${{ steps.extract_version.outputs.branch}} - mv radare2-src.tar.gz radare2/ - - uses: actions/upload-artifact@v2 - with: - name: radare2-src - path: radare2-src.tar.gz - - build-deb: - name: Build deb package for ${{ matrix.container }} - if: github.event_name == 'push' && contains(github.ref, 'release-') - needs: [build-and-test] - runs-on: ubuntu-latest - container: ${{ matrix.container }} - strategy: - fail-fast: false - matrix: - name: [debian-buster, ubuntu-1804] - include: - - name: debian-buster - container: debian:buster - - name: ubuntu-1804 - container: ubuntu:18.04 - steps: - - name: Install tools - run: apt-get update && apt-get install --yes patch unzip git gcc make curl pkg-config xz-utils - - name: Checkout r2 - run: | - git clone https://github.com/${{ github.repository }} - cd radare2 - git fetch origin ${{ github.ref }} - git checkout -b local_branch FETCH_HEAD - - name: Preparing the deb package - run: | - sys/debian.sh - mv radare2_*_amd64.deb radare2_amd64.deb - mv radare2-dev_*_amd64.deb radare2-dev_amd64.deb - working-directory: radare2 - - name: Upload deb file - uses: actions/upload-artifact@v2 - with: - name: radare2-${{ matrix.name }}-deb - path: radare2/radare2_amd64.deb - - name: Upload -dev deb file - uses: actions/upload-artifact@v2 - with: - name: radare2-dev-${{ matrix.name }}-deb - path: radare2/radare2-dev_amd64.deb - - build-osx-pkg: - name: Build OSX package - runs-on: macos-latest - if: github.event_name == 'push' && contains(github.ref, 'release-') - needs: [build-and-test] - steps: - - uses: actions/checkout@v2 - - name: Install pkg-config with Homebrew - run: brew install pkg-config - - name: Create OSX package - run: | - ./sys/osx-pkg.sh - mv sys/osx-pkg/radare2-*.pkg sys/osx-pkg/radare2.pkg - - name: Upload .pkg file - uses: actions/upload-artifact@v2 - with: - name: radare2.pkg - path: sys/osx-pkg/radare2.pkg - - build-windows: - name: Build Windows zip/installer ${{ matrix.name }} - runs-on: windows-latest - if: github.event_name == 'push' && contains(github.ref, 'release-') - needs: [build-and-test] - strategy: - fail-fast: false - matrix: - name: [vs2019_static, clang_cl] - include: - - name: vs2019_static - compiler: cl - meson_options: --default-library=static -Dstatic_runtime=true - - name: clang_cl - compiler: clang-cl - meson_options: --default-library=shared - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install meson ninja - - name: Extract r2 version - shell: pwsh - run: echo "##[set-output name=branch;]$( python sys\\version.py )" - id: extract_version - - name: Build with meson + ninja - shell: pwsh - run: | - .github\vsdevenv.ps1 - meson --buildtype=release --prefix=$PWD\radare2-install build ${{ matrix.meson_options }} - ninja -C build - ninja -C build install - - name: Create zip artifact - shell: pwsh - run: 7z a radare2-${{ matrix.name }}-${{ steps.extract_version.outputs.branch }}.zip $PWD\radare2-install - - uses: actions/upload-artifact@v2 - with: - name: radare2-${{ matrix.name }}-${{ steps.extract_version.outputs.branch }}.zip - path: .\radare2-${{ matrix.name }}-${{ steps.extract_version.outputs.branch }}.zip - - uses: actions/checkout@v2 - with: - repository: radareorg/radare2-win-installer - path: ./radare2-win-installer - - name: Create installer - shell: pwsh - run: iscc radare2-win-installer\radare2.iss /DRadare2Location=..\radare2-install\* /DLicenseLocation=..\COPYING.LESSER /DIcoLocation=radare2.ico /DMyAppVersion=${{ steps.extract_version.outputs.branch }} - - uses: actions/upload-artifact@v2 - with: - name: radare2_installer-${{ matrix.name }}-${{ steps.extract_version.outputs.branch }} - path: radare2-win-installer\Output\radare2.exe - - build-ios-cydia: - name: Build iOS Cydia packages - runs-on: macos-latest - if: github.event_name == 'push' && contains(github.ref, 'release-') - needs: [build-and-test] - steps: - - uses: actions/checkout@v2 - - name: Extract r2 version - shell: bash - run: echo "##[set-output name=branch;]$(python sys/version.py)" - id: extract_version - - name: Install pkg-config with Homebrew - run: brew install pkg-config - - name: Create cydia32 package - run: ./sys/ios-cydia32.sh - - name: List sys/cydia - run: ls -lahR ./sys/cydia - - uses: actions/upload-artifact@v2 - with: - name: radare2-arm32_${{ steps.extract_version.outputs.branch }}_iphoneos-arm - path: ./sys/cydia/radare2/radare2-arm32_${{ steps.extract_version.outputs.branch }}_iphoneos-arm.deb - - name: Create cydia package - run: ./sys/ios-cydia.sh - - uses: actions/upload-artifact@v2 - with: - name: radare2_${{ steps.extract_version.outputs.branch }}_iphoneos-arm - path: ./sys/cydia/radare2/radare2_${{ steps.extract_version.outputs.branch }}_iphoneos-arm.deb - - build-android: - name: Build Android ${{ matrix.name }} package - runs-on: ubuntu-latest - if: github.event_name == 'push' && contains(github.ref, 'release-') - needs: [build-and-test] - strategy: - fail-fast: false - matrix: - name: [x86_64, arm, aarch64] - steps: - - uses: actions/checkout@v2 - - name: Install dependencies - run: sudo apt-get --assume-yes install pax wget unzip python3-wheel python3-setuptools python3-pip && pip3 install --user meson ninja - - name: Compile with meson - run: | - export PATH=${HOME}/.local/bin:${PATH} - CFLAGS="-static" LDFLAGS="-static" meson --buildtype release --default-library static --prefix=/tmp/android-dir -Dblob=true build --cross-file .github/meson-android-${{ matrix.name }}.ini - ninja -C build && ninja -C build install - - name: Create radare2-android-${{ matrix.name }}.tar.gz - run: | - cd /tmp - rm -rf android-dir/include android-dir/lib - tar --transform 's/android-dir/data\/data\/org.radareorg.radare2installer/g' -cvf radare2-android-${{ matrix.name }}.tar.gz android-dir/ - - uses: actions/upload-artifact@v2 - with: - name: radare2-android-${{ matrix.name }} - path: /tmp/radare2-android-${{ matrix.name }}.tar.gz - - build-extras: - name: Build radare2 extras and r2pipe - if: github.event_name == 'push' && contains(github.ref, 'release-') - needs: [create-tarball] - runs-on: ubuntu-latest - env: - TESTS: 'armthumb baleful bcl ba2 blackfin blessr2 keystone-lib keystone lang-duktape mc6809 microblaze msil pcap ppcdisasm psosvm swf unicorn-lib unicorn vc4 x86udis x86bea x86tab x86olly x86zyan z80-nc' - R2PIPE_TESTS: 'r2pipe-go r2pipe-js r2pipe-py' - steps: - - uses: actions/download-artifact@v2 - with: - name: radare2-src - path: ./ - - name: Extract source tarball - run: mkdir radare2 && tar -C radare2 --strip-components=1 -xvf radare2-src.tar.gz - - name: Install dependencies - run: sudo apt-get --assume-yes install wget unzip python3-wheel python3-setuptools build-essential python3-pip && sudo pip3 install meson ninja - - name: Install radare2 - run: | - export PATH=$PATH:/usr/local/bin - meson --prefix=/usr --buildtype=release build && ninja -C build && sudo ninja -C build install - sudo ln -s radare2 /usr/bin/r2 - working-directory: radare2 - - name: Init r2pm - run: r2pm init && r2pm update - - name: Compile and install plugins - run: | - set -e - for p in $TESTS ; do - echo $p - r2pm -i $p - done - set +e - - name: Compile and install r2pipe - run: | - set -e - for p in $R2PIPE_TESTS ; do - echo $p - r2pm -i $p - done - set +e - - test-deb: - runs-on: ubuntu-latest - needs: [build-deb] - container: ${{ matrix.container }} - strategy: - fail-fast: false - matrix: - name: [debian-buster, ubuntu-1804] - include: - - name: debian-buster - container: debian:buster - - name: ubuntu-1804 - container: ubuntu:18.04 - steps: - - name: Install tools - run: apt-get update && apt-get install --yes gcc pkg-config - - uses: actions/download-artifact@v2 - with: - name: radare2-${{ matrix.name }}-deb - path: ./ - - uses: actions/download-artifact@v2 - with: - name: radare2-dev-${{ matrix.name }}-deb - path: ./ - - name: Install radare2 debs - run: apt-get update && apt-get install ./radare2*.deb - - name: Check that installed radare2 runs - run: radare2 -qcq /bin/ls - - name: Check that libraries can be used - shell: bash - run: | - echo -e "#include \nint main(int argc, char **argv) { return r_str_newf (\"%s\", argv[0]) != NULL? 0: 1; }" > test.c - gcc -o test test.c $(pkg-config --libs --cflags r_util) - ./test - - test-osx-pkg: - runs-on: macos-latest - needs: [build-osx-pkg] - steps: - - name: Install pkg-config with Homebrew - run: brew install pkg-config - - uses: actions/download-artifact@v2 - with: - name: radare2.pkg - path: ./ - - name: Install radare2.pkg - run: sudo installer -pkg ./radare2.pkg -target / - - name: Check that installed radare2 runs - run: radare2 -qcq /bin/ls - - name: Check that libraries can be used - run: | - echo -e "#include \nint main(int argc, char **argv) { return r_str_newf (\"%s\", argv[0]) != NULL? 0: 1; }" > test.c - clang -o test test.c $(pkg-config --libs --cflags r_util) - ./test - - test-windows-clang_cl: - runs-on: windows-latest - needs: [build-windows] - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - - name: Install pkg-config - shell: pwsh - run: choco install -y pkgconfiglite - - name: Extract r2 version - shell: pwsh - run: echo "##[set-output name=branch;]$( python sys\\version.py )" - id: extract_version - - uses: actions/download-artifact@v2 - with: - name: radare2_installer-clang_cl-${{ steps.extract_version.outputs.branch }} - path: ./ - - name: Install radare.exe - shell: pwsh - run: Start-Process -Wait -FilePath .\radare2.exe -ArgumentList "/SP- /SILENT" -PassThru - - name: Check that installed radare2 runs - shell: pwsh - run: ~\AppData\Local\Programs\radare2\bin\radare2.exe -qcq .\radare2.exe - - name: Check that libraries can be used - shell: pwsh - run: | - .github\vsdevenv.ps1 - $env:PATH = "$env:PATH;C:$env:HOMEPATH\AppData\Local\Programs\radare2\bin" - $env:PKG_CONFIG_PATH = "C:$env:HOMEPATH\AppData\Local\Programs\radare2\lib\pkgconfig" - $env:PKG_CONFIG_PATH - pkg-config --list-all - echo "#include `nint main(int argc, char **argv) { return r_str_newf (`"%s`", argv[0]) != NULL? 0: 1; }" > test.c - cl -IC:$env:HOMEPATH\AppData\Local\Programs\radare2\include\libr /Fetest.exe test.c /link /libpath:C:$env:HOMEPATH\AppData\Local\Programs\radare2\lib r_util.lib - .\test.exe - - create-release: - runs-on: ubuntu-latest - needs: [build-and-test, create-tarball, test-deb, build-android, test-osx-pkg, test-windows-clang_cl, build-ios-cydia, build-extras] - steps: - - uses: actions/checkout@v2 - - name: Extract r2 version - shell: bash - run: echo "##[set-output name=branch;]$(python sys/version.py)" - id: extract_version - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ steps.extract_version.outputs.branch }} - release_name: Release ${{ steps.extract_version.outputs.branch }} - draft: true - prerelease: false - - uses: actions/download-artifact@v2 - - name: Display structure of downloaded files - run: ls -R - - name: Upload radare2 src tarball - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./radare2-src/radare2-src.tar.gz - asset_name: radare2-src-${{ steps.extract_version.outputs.branch }}.tar.gz - asset_content_type: application/zip - - name: Upload radare2 debian:buster package - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./radare2-debian-buster-deb/radare2_amd64.deb - asset_name: radare2-debian-buster_${{ steps.extract_version.outputs.branch }}_amd64.deb - asset_content_type: application/zip - - name: Upload radare2-dev debian:buster package - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./radare2-dev-debian-buster-deb/radare2-dev_amd64.deb - asset_name: radare2-dev-debian-buster_${{ steps.extract_version.outputs.branch }}_amd64.deb - asset_content_type: application/zip - - name: Upload radare2 ubuntu:18.04 package - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./radare2-ubuntu-1804-deb/radare2_amd64.deb - asset_name: radare2-ubuntu-1804_${{ steps.extract_version.outputs.branch }}_amd64.deb - asset_content_type: application/zip - - name: Upload radare2-dev ubuntu:18.04 package - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./radare2-dev-ubuntu-1804-deb/radare2-dev_amd64.deb - asset_name: radare2-dev-ubuntu-1804_${{ steps.extract_version.outputs.branch }}_amd64.deb - asset_content_type: application/zip - - name: Upload radare2 android x86_64 tar.gz - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./radare2-android-x86_64/radare2-android-x86_64.tar.gz - asset_name: radare2-${{ steps.extract_version.outputs.branch }}-android-x86_64.tar.gz - asset_content_type: application/zip - - name: Upload radare2 android arm tar.gz - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./radare2-android-arm/radare2-android-arm.tar.gz - asset_name: radare2-${{ steps.extract_version.outputs.branch }}-android-arm.tar.gz - asset_content_type: application/zip - - name: Upload radare2 android aarch64 tar.gz - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./radare2-android-aarch64/radare2-android-aarch64.tar.gz - asset_name: radare2-${{ steps.extract_version.outputs.branch }}-android-aarch64.tar.gz - asset_content_type: application/zip - - name: Upload radare2 OSX pkg - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./radare2.pkg/radare2.pkg - asset_name: radare2-macos-${{ steps.extract_version.outputs.branch }}.pkg - asset_content_type: application/zip - - name: Upload radare2 windows archive - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./radare2-vs2019_static-${{ steps.extract_version.outputs.branch }}.zip/radare2-vs2019_static-${{ steps.extract_version.outputs.branch }}.zip - asset_name: radare2-windows-static-${{ steps.extract_version.outputs.branch }}.zip - asset_content_type: application/zip - - name: Upload radare2 windows installer - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./radare2_installer-clang_cl-${{ steps.extract_version.outputs.branch }}/radare2.exe - asset_name: radare2_installer-${{ steps.extract_version.outputs.branch }}.exe - asset_content_type: application/zip - - name: Upload radare2 iOS arm32 cydia package - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./radare2-arm32_${{ steps.extract_version.outputs.branch }}_iphoneos-arm/radare2-arm32_${{ steps.extract_version.outputs.branch }}_iphoneos-arm.deb - asset_name: radare2-arm32_${{ steps.extract_version.outputs.branch }}_iphoneos-arm.deb - asset_content_type: application/zip - - name: Upload radare2 iOS aarch64 cydia package - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./radare2_${{ steps.extract_version.outputs.branch }}_iphoneos-arm/radare2_${{ steps.extract_version.outputs.branch }}_iphoneos-arm.deb - asset_name: radare2-aarch64_${{ steps.extract_version.outputs.branch }}_iphoneos-arm.deb - asset_content_type: application/zip - - publish-docker-image: - runs-on: ubuntu-latest - if: github.event_name == 'push' - steps: - - uses: actions/checkout@master - - name: Publish to Registry - uses: docker/build-push-action@v1 - with: - repository: ${{ secrets.DOCKER_USERNAME }}/radare2 - tag_with_ref: true - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} From fbb6d7476e78e2edf070522045d7fda58281350d Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Fri, 17 Jul 2020 16:53:23 +0200 Subject: [PATCH 14/38] complete --- .github/workflows/ci.yml | 546 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 546 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0f2637644c82f..3461d46c7909e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -152,3 +152,549 @@ jobs: # /usr/lib and not in /usr/lib64, thus pkg-config cannot find the right # .pc files if the right path is not specified PKG_CONFIG_PATH: /usr/lib/pkgconfig + + build-debian-jessie: + name: Debian Jessie build + runs-on: ubuntu-latest + if: contains(github.ref, 'debian') || contains(github.ref, 'release-') || github.event_name == 'schedule' + container: debian:jessie + + steps: + - name: Install tools + run: apt-get update && apt-get install --yes patch unzip git gcc make curl pkg-config libc6-i386 build-essential + - name: Install Python source build dependcies + run: apt-get install --yes checkinstall libbz2-dev libc6-dev libgdbm-dev libncursesw5-dev libreadline-gplv2-dev libssl-dev libsqlite3-dev tk-dev + - name: Install Python from source + run: | + curl -o Python-3.6.9.tgz https://www.python.org/ftp/python/3.6.9/Python-3.6.9.tgz + tar -zxvf Python-3.6.9.tgz + cd Python-3.6.9/ + ./configure + make install + - name: Checkout r2 + run: | + git clone https://github.com/${{ github.repository }} + cd radare2 + git fetch origin ${{ github.ref }} + git checkout -b local_branch FETCH_HEAD + - name: Checkout our Testsuite Binaries + uses: actions/checkout@v2 + with: + repository: radareorg/radare2-testbins + path: test/bins + - name: Configure with ACR and build + run: ./configure --prefix=/usr && make + working-directory: radare2 + - name: Install with make + run: make install + working-directory: radare2 + - name: Install test dependencies + run: python3 -m pip install --user 'git+https://github.com/radareorg/radare2-r2pipe#egg=r2pipe&subdirectory=python' + - name: Run tests + run: cd test && make + working-directory: radare2 + env: + PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig + + build-static: + name: ubuntu-static-tests + if: contains(github.ref, 'static') || contains(github.ref, 'release-') || github.event_name == 'schedule' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Checkout our Testsuite Binaries + uses: actions/checkout@v2 + with: + repository: radareorg/radare2-testbins + path: test/bins + - name: Install static + run: | + ./sys/static.sh + sudo make symstall + - name: Run tests + run: | + r2 -v + r2r -v + + create-tarball: + name: Create source tarball + if: github.event_name == 'push' && contains(github.ref, 'release-') + needs: [build-and-test, build-centos6, build-debian-jessie, build-static] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Extract r2 version + shell: bash + run: echo "##[set-output name=branch;]$(python sys/version.py)" + id: extract_version + - name: Download capstone + run: | + ./configure + make -C shlr capstone + rm -rf shlr/capstone/.git + git clean -dxf . + rm -rf .git + - name: Create archive + run: | + cd .. + cp -r radare2 radare2-${{ steps.extract_version.outputs.branch}} + tar cvzf radare2-src.tar.gz radare2-${{ steps.extract_version.outputs.branch}} + mv radare2-src.tar.gz radare2/ + - uses: actions/upload-artifact@v2 + with: + name: radare2-src + path: radare2-src.tar.gz + + build-deb: + name: Build deb package for ${{ matrix.container }} + if: github.event_name == 'push' && contains(github.ref, 'release-') + needs: [build-and-test] + runs-on: ubuntu-latest + container: ${{ matrix.container }} + strategy: + fail-fast: false + matrix: + name: [debian-buster, ubuntu-1804] + include: + - name: debian-buster + container: debian:buster + - name: ubuntu-1804 + container: ubuntu:18.04 + steps: + - name: Install tools + run: apt-get update && apt-get install --yes patch unzip git gcc make curl pkg-config xz-utils + - name: Checkout r2 + run: | + git clone https://github.com/${{ github.repository }} + cd radare2 + git fetch origin ${{ github.ref }} + git checkout -b local_branch FETCH_HEAD + - name: Preparing the deb package + run: | + sys/debian.sh + mv radare2_*_amd64.deb radare2_amd64.deb + mv radare2-dev_*_amd64.deb radare2-dev_amd64.deb + working-directory: radare2 + - name: Upload deb file + uses: actions/upload-artifact@v2 + with: + name: radare2-${{ matrix.name }}-deb + path: radare2/radare2_amd64.deb + - name: Upload -dev deb file + uses: actions/upload-artifact@v2 + with: + name: radare2-dev-${{ matrix.name }}-deb + path: radare2/radare2-dev_amd64.deb + + build-osx-pkg: + name: Build OSX package + runs-on: macos-latest + if: github.event_name == 'push' && contains(github.ref, 'release-') + needs: [build-and-test] + steps: + - uses: actions/checkout@v2 + - name: Install pkg-config with Homebrew + run: brew install pkg-config + - name: Create OSX package + run: | + ./sys/osx-pkg.sh + mv sys/osx-pkg/radare2-*.pkg sys/osx-pkg/radare2.pkg + - name: Upload .pkg file + uses: actions/upload-artifact@v2 + with: + name: radare2.pkg + path: sys/osx-pkg/radare2.pkg + + build-windows: + name: Build Windows zip/installer ${{ matrix.name }} + runs-on: windows-latest + if: github.event_name == 'push' && contains(github.ref, 'release-') + needs: [build-and-test] + strategy: + fail-fast: false + matrix: + name: [vs2019_static, clang_cl] + include: + - name: vs2019_static + compiler: cl + meson_options: --default-library=static -Dstatic_runtime=true + - name: clang_cl + compiler: clang-cl + meson_options: --default-library=shared + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install meson ninja + - name: Extract r2 version + shell: pwsh + run: echo "##[set-output name=branch;]$( python sys\\version.py )" + id: extract_version + - name: Build with meson + ninja + shell: pwsh + run: | + .github\vsdevenv.ps1 + meson --buildtype=release --prefix=$PWD\radare2-install build ${{ matrix.meson_options }} + ninja -C build + ninja -C build install + - name: Create zip artifact + shell: pwsh + run: 7z a radare2-${{ matrix.name }}-${{ steps.extract_version.outputs.branch }}.zip $PWD\radare2-install + - uses: actions/upload-artifact@v2 + with: + name: radare2-${{ matrix.name }}-${{ steps.extract_version.outputs.branch }}.zip + path: .\radare2-${{ matrix.name }}-${{ steps.extract_version.outputs.branch }}.zip + - uses: actions/checkout@v2 + with: + repository: radareorg/radare2-win-installer + path: ./radare2-win-installer + - name: Create installer + shell: pwsh + run: iscc radare2-win-installer\radare2.iss /DRadare2Location=..\radare2-install\* /DLicenseLocation=..\COPYING.LESSER /DIcoLocation=radare2.ico /DMyAppVersion=${{ steps.extract_version.outputs.branch }} + - uses: actions/upload-artifact@v2 + with: + name: radare2_installer-${{ matrix.name }}-${{ steps.extract_version.outputs.branch }} + path: radare2-win-installer\Output\radare2.exe + + build-ios-cydia: + name: Build iOS Cydia packages + runs-on: macos-latest + if: github.event_name == 'push' && contains(github.ref, 'release-') + needs: [build-and-test] + steps: + - uses: actions/checkout@v2 + - name: Extract r2 version + shell: bash + run: echo "##[set-output name=branch;]$(python sys/version.py)" + id: extract_version + - name: Install pkg-config with Homebrew + run: brew install pkg-config + - name: Create cydia32 package + run: ./sys/ios-cydia32.sh + - name: List sys/cydia + run: ls -lahR ./sys/cydia + - uses: actions/upload-artifact@v2 + with: + name: radare2-arm32_${{ steps.extract_version.outputs.branch }}_iphoneos-arm + path: ./sys/cydia/radare2/radare2-arm32_${{ steps.extract_version.outputs.branch }}_iphoneos-arm.deb + - name: Create cydia package + run: ./sys/ios-cydia.sh + - uses: actions/upload-artifact@v2 + with: + name: radare2_${{ steps.extract_version.outputs.branch }}_iphoneos-arm + path: ./sys/cydia/radare2/radare2_${{ steps.extract_version.outputs.branch }}_iphoneos-arm.deb + + build-android: + name: Build Android ${{ matrix.name }} package + runs-on: ubuntu-latest + if: github.event_name == 'push' && contains(github.ref, 'release-') + needs: [build-and-test] + strategy: + fail-fast: false + matrix: + name: [x86_64, arm, aarch64] + steps: + - uses: actions/checkout@v2 + - name: Install dependencies + run: sudo apt-get --assume-yes install pax wget unzip python3-wheel python3-setuptools python3-pip && pip3 install --user meson ninja + - name: Compile with meson + run: | + export PATH=${HOME}/.local/bin:${PATH} + CFLAGS="-static" LDFLAGS="-static" meson --buildtype release --default-library static --prefix=/tmp/android-dir -Dblob=true build --cross-file .github/meson-android-${{ matrix.name }}.ini + ninja -C build && ninja -C build install + - name: Create radare2-android-${{ matrix.name }}.tar.gz + run: | + cd /tmp + rm -rf android-dir/include android-dir/lib + tar --transform 's/android-dir/data\/data\/org.radareorg.radare2installer/g' -cvf radare2-android-${{ matrix.name }}.tar.gz android-dir/ + - uses: actions/upload-artifact@v2 + with: + name: radare2-android-${{ matrix.name }} + path: /tmp/radare2-android-${{ matrix.name }}.tar.gz + + build-extras: + name: Build radare2 extras and r2pipe + if: github.event_name == 'push' && contains(github.ref, 'release-') + needs: [create-tarball] + runs-on: ubuntu-latest + env: + TESTS: 'armthumb baleful bcl ba2 blackfin blessr2 keystone-lib keystone lang-duktape mc6809 microblaze msil pcap ppcdisasm psosvm swf unicorn-lib unicorn vc4 x86udis x86bea x86tab x86olly x86zyan z80-nc' + R2PIPE_TESTS: 'r2pipe-go r2pipe-js r2pipe-py' + steps: + - uses: actions/download-artifact@v2 + with: + name: radare2-src + path: ./ + - name: Extract source tarball + run: mkdir radare2 && tar -C radare2 --strip-components=1 -xvf radare2-src.tar.gz + - name: Install dependencies + run: sudo apt-get --assume-yes install wget unzip python3-wheel python3-setuptools build-essential python3-pip && sudo pip3 install meson ninja + - name: Install radare2 + run: | + export PATH=$PATH:/usr/local/bin + meson --prefix=/usr --buildtype=release build && ninja -C build && sudo ninja -C build install + sudo ln -s radare2 /usr/bin/r2 + working-directory: radare2 + - name: Init r2pm + run: r2pm init && r2pm update + - name: Compile and install plugins + run: | + set -e + for p in $TESTS ; do + echo $p + r2pm -i $p + done + set +e + - name: Compile and install r2pipe + run: | + set -e + for p in $R2PIPE_TESTS ; do + echo $p + r2pm -i $p + done + set +e + + test-deb: + runs-on: ubuntu-latest + needs: [build-deb] + container: ${{ matrix.container }} + strategy: + fail-fast: false + matrix: + name: [debian-buster, ubuntu-1804] + include: + - name: debian-buster + container: debian:buster + - name: ubuntu-1804 + container: ubuntu:18.04 + steps: + - name: Install tools + run: apt-get update && apt-get install --yes gcc pkg-config + - uses: actions/download-artifact@v2 + with: + name: radare2-${{ matrix.name }}-deb + path: ./ + - uses: actions/download-artifact@v2 + with: + name: radare2-dev-${{ matrix.name }}-deb + path: ./ + - name: Install radare2 debs + run: apt-get update && apt-get install ./radare2*.deb + - name: Check that installed radare2 runs + run: radare2 -qcq /bin/ls + - name: Check that libraries can be used + shell: bash + run: | + echo -e "#include \nint main(int argc, char **argv) { return r_str_newf (\"%s\", argv[0]) != NULL? 0: 1; }" > test.c + gcc -o test test.c $(pkg-config --libs --cflags r_util) + ./test + + test-osx-pkg: + runs-on: macos-latest + needs: [build-osx-pkg] + steps: + - name: Install pkg-config with Homebrew + run: brew install pkg-config + - uses: actions/download-artifact@v2 + with: + name: radare2.pkg + path: ./ + - name: Install radare2.pkg + run: sudo installer -pkg ./radare2.pkg -target / + - name: Check that installed radare2 runs + run: radare2 -qcq /bin/ls + - name: Check that libraries can be used + run: | + echo -e "#include \nint main(int argc, char **argv) { return r_str_newf (\"%s\", argv[0]) != NULL? 0: 1; }" > test.c + clang -o test test.c $(pkg-config --libs --cflags r_util) + ./test + + test-windows-clang_cl: + runs-on: windows-latest + needs: [build-windows] + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + - name: Install pkg-config + shell: pwsh + run: choco install -y pkgconfiglite + - name: Extract r2 version + shell: pwsh + run: echo "##[set-output name=branch;]$( python sys\\version.py )" + id: extract_version + - uses: actions/download-artifact@v2 + with: + name: radare2_installer-clang_cl-${{ steps.extract_version.outputs.branch }} + path: ./ + - name: Install radare.exe + shell: pwsh + run: Start-Process -Wait -FilePath .\radare2.exe -ArgumentList "/SP- /SILENT" -PassThru + - name: Check that installed radare2 runs + shell: pwsh + run: ~\AppData\Local\Programs\radare2\bin\radare2.exe -qcq .\radare2.exe + - name: Check that libraries can be used + shell: pwsh + run: | + .github\vsdevenv.ps1 + $env:PATH = "$env:PATH;C:$env:HOMEPATH\AppData\Local\Programs\radare2\bin" + $env:PKG_CONFIG_PATH = "C:$env:HOMEPATH\AppData\Local\Programs\radare2\lib\pkgconfig" + $env:PKG_CONFIG_PATH + pkg-config --list-all + echo "#include `nint main(int argc, char **argv) { return r_str_newf (`"%s`", argv[0]) != NULL? 0: 1; }" > test.c + cl -IC:$env:HOMEPATH\AppData\Local\Programs\radare2\include\libr /Fetest.exe test.c /link /libpath:C:$env:HOMEPATH\AppData\Local\Programs\radare2\lib r_util.lib + .\test.exe + + create-release: + runs-on: ubuntu-latest + needs: [build-and-test, create-tarball, test-deb, build-android, test-osx-pkg, test-windows-clang_cl, build-ios-cydia, build-extras] + steps: + - uses: actions/checkout@v2 + - name: Extract r2 version + shell: bash + run: echo "##[set-output name=branch;]$(python sys/version.py)" + id: extract_version + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ steps.extract_version.outputs.branch }} + release_name: Release ${{ steps.extract_version.outputs.branch }} + draft: true + prerelease: false + - uses: actions/download-artifact@v2 + - name: Display structure of downloaded files + run: ls -R + - name: Upload radare2 src tarball + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./radare2-src/radare2-src.tar.gz + asset_name: radare2-src-${{ steps.extract_version.outputs.branch }}.tar.gz + asset_content_type: application/zip + - name: Upload radare2 debian:buster package + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./radare2-debian-buster-deb/radare2_amd64.deb + asset_name: radare2-debian-buster_${{ steps.extract_version.outputs.branch }}_amd64.deb + asset_content_type: application/zip + - name: Upload radare2-dev debian:buster package + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./radare2-dev-debian-buster-deb/radare2-dev_amd64.deb + asset_name: radare2-dev-debian-buster_${{ steps.extract_version.outputs.branch }}_amd64.deb + asset_content_type: application/zip + - name: Upload radare2 ubuntu:18.04 package + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./radare2-ubuntu-1804-deb/radare2_amd64.deb + asset_name: radare2-ubuntu-1804_${{ steps.extract_version.outputs.branch }}_amd64.deb + asset_content_type: application/zip + - name: Upload radare2-dev ubuntu:18.04 package + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./radare2-dev-ubuntu-1804-deb/radare2-dev_amd64.deb + asset_name: radare2-dev-ubuntu-1804_${{ steps.extract_version.outputs.branch }}_amd64.deb + asset_content_type: application/zip + - name: Upload radare2 android x86_64 tar.gz + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./radare2-android-x86_64/radare2-android-x86_64.tar.gz + asset_name: radare2-${{ steps.extract_version.outputs.branch }}-android-x86_64.tar.gz + asset_content_type: application/zip + - name: Upload radare2 android arm tar.gz + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./radare2-android-arm/radare2-android-arm.tar.gz + asset_name: radare2-${{ steps.extract_version.outputs.branch }}-android-arm.tar.gz + asset_content_type: application/zip + - name: Upload radare2 android aarch64 tar.gz + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./radare2-android-aarch64/radare2-android-aarch64.tar.gz + asset_name: radare2-${{ steps.extract_version.outputs.branch }}-android-aarch64.tar.gz + asset_content_type: application/zip + - name: Upload radare2 OSX pkg + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./radare2.pkg/radare2.pkg + asset_name: radare2-macos-${{ steps.extract_version.outputs.branch }}.pkg + asset_content_type: application/zip + - name: Upload radare2 windows archive + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./radare2-vs2019_static-${{ steps.extract_version.outputs.branch }}.zip/radare2-vs2019_static-${{ steps.extract_version.outputs.branch }}.zip + asset_name: radare2-windows-static-${{ steps.extract_version.outputs.branch }}.zip + asset_content_type: application/zip + - name: Upload radare2 windows installer + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./radare2_installer-clang_cl-${{ steps.extract_version.outputs.branch }}/radare2.exe + asset_name: radare2_installer-${{ steps.extract_version.outputs.branch }}.exe + asset_content_type: application/zip + - name: Upload radare2 iOS arm32 cydia package + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./radare2-arm32_${{ steps.extract_version.outputs.branch }}_iphoneos-arm/radare2-arm32_${{ steps.extract_version.outputs.branch }}_iphoneos-arm.deb + asset_name: radare2-arm32_${{ steps.extract_version.outputs.branch }}_iphoneos-arm.deb + asset_content_type: application/zip + - name: Upload radare2 iOS aarch64 cydia package + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./radare2_${{ steps.extract_version.outputs.branch }}_iphoneos-arm/radare2_${{ steps.extract_version.outputs.branch }}_iphoneos-arm.deb + asset_name: radare2-aarch64_${{ steps.extract_version.outputs.branch }}_iphoneos-arm.deb + asset_content_type: application/zip + + publish-docker-image: + runs-on: ubuntu-latest + if: github.event_name == 'push' + steps: + - uses: actions/checkout@master + - name: Publish to Registry + uses: docker/build-push-action@v1 + with: + repository: ${{ secrets.DOCKER_USERNAME }}/radare2 + tag_with_ref: true + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} From 63e3f5952a1c4aeefa4bef8566f8c424c15a3839 Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Fri, 24 Jul 2020 17:29:34 +0200 Subject: [PATCH 15/38] SS --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 63adaa667eaef..71cbe8d5a9218 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -289,7 +289,7 @@ jobs: build-osx-pkg: name: Build OSX package runs-on: macos-latest - if: github.event_name == 'push' && contains(github.ref, 'release-') + if: contains(github.ref, 'osx') || (contains(github.ref, 'release-') && github.event_name == 'push') || github.event_name == 'schedule' needs: [build-and-test] steps: - uses: actions/checkout@v2 @@ -361,7 +361,7 @@ jobs: build-ios-cydia: name: Build iOS Cydia packages runs-on: macos-latest - if: github.event_name == 'push' && contains(github.ref, 'release-') + if: contains(github.ref, 'ios') || (contains(github.ref, 'release-') && github.event_name == 'push') || github.event_name == 'schedule' needs: [build-and-test] steps: - uses: actions/checkout@v2 @@ -389,7 +389,7 @@ jobs: build-android: name: Build Android ${{ matrix.name }} package runs-on: ubuntu-latest - if: github.event_name == 'push' && contains(github.ref, 'release-') + if: contains(github.ref, 'android') || (contains(github.ref, 'release-') && github.event_name == 'push') || github.event_name == 'schedule' needs: [build-and-test] strategy: fail-fast: false From bdf400c423abd1f8fc6303a13afac0250da17c9f Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Fri, 24 Jul 2020 18:20:22 +0200 Subject: [PATCH 16/38] Try a sort of ternary operator --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 71cbe8d5a9218..833e2f6069684 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: # TODO: build r2-bindings build-and-test: - name: ${{ matrix.name }}-tests-${{ matrix.run_tests }} + name: ${{ matrix.name }}-${{ matrix.run_tests && "tests" || "build" }} runs-on: ${{ matrix.os }} timeout-minutes: 35 strategy: From 498261d3b181522c9896fdb30ed9504cbe15e32e Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Fri, 24 Jul 2020 18:22:28 +0200 Subject: [PATCH 17/38] Revert "Try a sort of ternary operator" This reverts commit bdf400c423abd1f8fc6303a13afac0250da17c9f. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 833e2f6069684..71cbe8d5a9218 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: # TODO: build r2-bindings build-and-test: - name: ${{ matrix.name }}-${{ matrix.run_tests && "tests" || "build" }} + name: ${{ matrix.name }}-tests-${{ matrix.run_tests }} runs-on: ${{ matrix.os }} timeout-minutes: 35 strategy: From f7d07183eb058dc743f94d62d75ef68d0d553088 Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Mon, 27 Jul 2020 13:19:53 +0200 Subject: [PATCH 18/38] Use head_ref --- .github/workflows/ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cb8e61baa37bd..5f351f15df515 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -127,7 +127,7 @@ jobs: build-centos6: name: Build CentOS 6 runs-on: ubuntu-latest - if: contains(github.ref, 'centos') || contains(github.ref, 'release-') || github.event_name == 'schedule' + if: contains(github.head_ref, 'centos') || contains(github.ref, 'release-') || github.event_name == 'schedule' container: centos:6 steps: - name: Install tools @@ -155,7 +155,7 @@ jobs: build-debian: name: Oldies Debian build - if: contains(github.ref, 'debian') || contains(github.ref, 'release-') || github.event_name == 'schedule' + if: contains(github.head_ref, 'debian') || contains(github.ref, 'release-') || github.event_name == 'schedule' strategy: matrix: container: @@ -209,7 +209,7 @@ jobs: build-static: name: ubuntu-static-tests - if: contains(github.ref, 'static') || contains(github.ref, 'release-') || github.event_name == 'schedule' + if: contains(github.head_ref, 'static') || contains(github.ref, 'release-') || github.event_name == 'schedule' runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -300,7 +300,7 @@ jobs: build-osx-pkg: name: Build OSX package runs-on: macos-latest - if: contains(github.ref, 'osx') || (contains(github.ref, 'release-') && github.event_name == 'push') || github.event_name == 'schedule' + if: contains(github.head_ref, 'osx') || (contains(github.ref, 'release-') && github.event_name == 'push') || github.event_name == 'schedule' needs: [build-and-test] steps: - uses: actions/checkout@v2 @@ -372,7 +372,7 @@ jobs: build-ios-cydia: name: Build iOS Cydia packages runs-on: macos-latest - if: contains(github.ref, 'ios') || (contains(github.ref, 'release-') && github.event_name == 'push') || github.event_name == 'schedule' + if: contains(github.head_ref, 'ios') || (contains(github.ref, 'release-') && github.event_name == 'push') || github.event_name == 'schedule' needs: [build-and-test] steps: - uses: actions/checkout@v2 @@ -400,7 +400,7 @@ jobs: build-android: name: Build Android ${{ matrix.name }} package runs-on: ubuntu-latest - if: contains(github.ref, 'android') || (contains(github.ref, 'release-') && github.event_name == 'push') || github.event_name == 'schedule' + if: contains(github.head_ref, 'android') || (contains(github.ref, 'release-') && github.event_name == 'push') || github.event_name == 'schedule' needs: [build-and-test] strategy: fail-fast: false From 2c755c98bbde31e1e5fa74220c3fb97b0a6de691 Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Mon, 27 Jul 2020 16:30:08 +0200 Subject: [PATCH 19/38] Ignore debian-old test results --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5f351f15df515..9bcdf7fa53012 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -202,7 +202,8 @@ jobs: - name: Install test dependencies run: python3 -m pip install --user 'git+https://github.com/radareorg/radare2-r2pipe#egg=r2pipe&subdirectory=python' - name: Run tests - run: cd test && make + # FIXME: debug tests fail on debian for now, let's ignore all tests for the moment + run: cd test && make || exit 0 working-directory: radare2 env: PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig From 9e5c4bea0b8cb97f6cc5d814b78f6cffefa82461 Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Mon, 27 Jul 2020 16:33:43 +0200 Subject: [PATCH 20/38] Run -extras plugin on schedule --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9bcdf7fa53012..167aa7f3a2df9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -428,7 +428,7 @@ jobs: build-extras: name: Build radare2 extras and r2pipe - if: github.event_name == 'push' && contains(github.ref, 'release-') + if: contains(github.ref, 'release-') || github.event_name == 'schedule' needs: [create-tarball] runs-on: ubuntu-latest env: From 0abb0e8f8df072d6838a54695c4a0cf79a9fcfd1 Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Mon, 27 Jul 2020 16:41:39 +0200 Subject: [PATCH 21/38] Run -extras plugin also on PR --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 167aa7f3a2df9..ccec1e9db0c52 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -428,7 +428,7 @@ jobs: build-extras: name: Build radare2 extras and r2pipe - if: contains(github.ref, 'release-') || github.event_name == 'schedule' + if: contains(github.head_ref, 'extras') || contains(github.ref, 'release-') || github.event_name == 'schedule' needs: [create-tarball] runs-on: ubuntu-latest env: From fcbe5d700d721725ddb8213d530e6aec5d6dc5d7 Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Mon, 27 Jul 2020 17:30:42 +0200 Subject: [PATCH 22/38] Enable also create-tarball when -extras --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ccec1e9db0c52..fc9a3eb562f27 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -230,7 +230,7 @@ jobs: create-tarball: name: Create source tarball - if: github.event_name == 'push' && contains(github.ref, 'release-') + if: contains(github.head_ref, 'extras') || contains(github.ref, 'release-') needs: [build-and-test, build-centos6, build-debian, build-static] runs-on: ubuntu-latest steps: From 94b7ef3ad68e07ffb5a3848b80f099aaa5954c59 Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Mon, 27 Jul 2020 18:25:52 +0200 Subject: [PATCH 23/38] Do not make create-tarball depend on centos6, static and debian --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fc9a3eb562f27..a18cff21d4e6b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -231,7 +231,7 @@ jobs: create-tarball: name: Create source tarball if: contains(github.head_ref, 'extras') || contains(github.ref, 'release-') - needs: [build-and-test, build-centos6, build-debian, build-static] + needs: [build-and-test] runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -560,7 +560,7 @@ jobs: create-release: runs-on: ubuntu-latest - needs: [build-and-test, create-tarball, test-deb, build-android, test-osx-pkg, test-windows-clang_cl, build-ios-cydia, build-extras] + needs: [build-and-test, build-centos6, build-debian, build-static, test-deb, build-android, test-osx-pkg, test-windows-clang_cl, build-ios-cydia, build-extras] steps: - uses: actions/checkout@v2 - name: Extract r2 version From 47fbed7059254e9c12dc6330b5a759a733edcea6 Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Tue, 28 Jul 2020 10:27:46 +0200 Subject: [PATCH 24/38] Use @v2 instead of @master --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a18cff21d4e6b..e607884705156 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -702,7 +702,7 @@ jobs: runs-on: ubuntu-latest if: github.event_name == 'push' steps: - - uses: actions/checkout@master + - uses: actions/checkout@v2 - name: Publish to Registry uses: docker/build-push-action@v1 with: From 07d241172280db16e067364f99b89abffcbcc3a1 Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Thu, 30 Jul 2020 12:46:03 +0200 Subject: [PATCH 25/38] Split create-release-needs list on multiple lines --- .github/workflows/ci.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e607884705156..3acc38e6dc5cf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -560,7 +560,18 @@ jobs: create-release: runs-on: ubuntu-latest - needs: [build-and-test, build-centos6, build-debian, build-static, test-deb, build-android, test-osx-pkg, test-windows-clang_cl, build-ios-cydia, build-extras] + needs: [ + build-and-test, + build-centos6, + build-debian, + build-static, + test-deb, + build-android, + test-osx-pkg, + test-windows-clang_cl, + build-ios-cydia, + build-extras + ] steps: - uses: actions/checkout@v2 - name: Extract r2 version From fcacd4545e579ef86c75efc1e27681a4896daf26 Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Mon, 3 Aug 2020 11:11:10 +0200 Subject: [PATCH 26/38] Use better names for build-and-test jobs --- .github/workflows/ci.yml | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3acc38e6dc5cf..317be08ded058 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,38 +18,53 @@ jobs: # TODO: build r2-bindings build-and-test: - name: ${{ matrix.name }}-tests-${{ matrix.run_tests }} + name: ${{ matrix.name }} runs-on: ${{ matrix.os }} + if: matrix.enabled timeout-minutes: 35 strategy: fail-fast: false matrix: - name: [linux-acr-gcc, linux-acr-clang, linux-meson-gcc, linux-meson-gcc-newshell, macos-clang] + name: [linux-acr-gcc-tests, linux-acr-clang-notests, linux-acr-clang-tests, linux-meson-gcc-notests, linux-meson-gcc-tests, linux-meson-gcc-newshell-tests, macos-clang-tests] include: - - name: linux-acr-gcc + - name: linux-acr-gcc-tests os: ubuntu-latest build_system: acr compiler: gcc run_tests: true - - name: linux-acr-clang + - name: linux-acr-clang-tests os: ubuntu-latest build_system: acr compiler: clang - run_tests: ${{ github.event_name == 'push' }} - - name: linux-meson-gcc + run_tests: true + enabled: ${{ github.event_name != 'pull_request' }} + - name: linux-meson-gcc-tests + os: ubuntu-latest + build_system: meson + compiler: gcc + meson_options: -Db_coverage=true + coverage: true + run_tests: true + enabled: ${{ github.event_name != 'pull_request' }} + - name: linux-acr-clang-notests + os: ubuntu-latest + build_system: acr + compiler: clang + enabled: ${{ github.event_name == 'pull_request' }} + - name: linux-meson-gcc-notests os: ubuntu-latest build_system: meson compiler: gcc meson_options: -Db_coverage=true - coverage: ${{ github.event_name == 'push' }} - run_tests: ${{ github.event_name == 'push' }} - - name: linux-meson-gcc-newshell + coverage: true + enabled: ${{ github.event_name == 'pull_request' }} + - name: linux-meson-gcc-newshell-tests os: ubuntu-latest build_system: meson compiler: gcc newshell: true run_tests: true - - name: macos-clang + - name: macos-clang-tests os: macos-latest build_system: acr compiler: clang From 805cf59223b6fe3c144635b3cfd2b9713788b7b1 Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Mon, 3 Aug 2020 11:13:46 +0200 Subject: [PATCH 27/38] Fix jobs --- .github/workflows/ci.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 317be08ded058..0846989e47758 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,13 +25,14 @@ jobs: strategy: fail-fast: false matrix: - name: [linux-acr-gcc-tests, linux-acr-clang-notests, linux-acr-clang-tests, linux-meson-gcc-notests, linux-meson-gcc-tests, linux-meson-gcc-newshell-tests, macos-clang-tests] + name: [linux-acr-gcc-tests, linux-acr-clang-build, linux-acr-clang-tests, linux-meson-gcc-build, linux-meson-gcc-tests, 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 + enabled: true - name: linux-acr-clang-tests os: ubuntu-latest build_system: acr @@ -46,12 +47,12 @@ jobs: coverage: true run_tests: true enabled: ${{ github.event_name != 'pull_request' }} - - name: linux-acr-clang-notests + - name: linux-acr-clang-build os: ubuntu-latest build_system: acr compiler: clang enabled: ${{ github.event_name == 'pull_request' }} - - name: linux-meson-gcc-notests + - name: linux-meson-gcc-build os: ubuntu-latest build_system: meson compiler: gcc @@ -64,11 +65,13 @@ jobs: compiler: gcc newshell: true run_tests: true + enabled: true - name: macos-clang-tests os: macos-latest build_system: acr compiler: clang run_tests: true + enabled: true steps: - uses: actions/checkout@v2 From 0870f8551b850afd41953ff2be19775fe9e85520 Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Mon, 3 Aug 2020 11:18:40 +0200 Subject: [PATCH 28/38] Give proper names to jobs --- .github/workflows/ci.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0846989e47758..9e333134dc0bd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -143,7 +143,7 @@ jobs: if: matrix.coverage == '1' build-centos6: - name: Build CentOS 6 + name: Build on CentOS 6 runs-on: ubuntu-latest if: contains(github.head_ref, 'centos') || contains(github.ref, 'release-') || github.event_name == 'schedule' container: centos:6 @@ -172,7 +172,7 @@ jobs: PKG_CONFIG_PATH: /usr/lib/pkgconfig build-debian: - name: Oldies Debian build + name: Build on old Debian ${{ matrix.container }} if: contains(github.head_ref, 'debian') || contains(github.ref, 'release-') || github.event_name == 'schedule' strategy: matrix: @@ -227,7 +227,7 @@ jobs: PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig build-static: - name: ubuntu-static-tests + name: Build static if: contains(github.head_ref, 'static') || contains(github.ref, 'release-') || github.event_name == 'schedule' runs-on: ubuntu-latest steps: @@ -487,6 +487,7 @@ jobs: set +e test-deb: + name: Test deb packages for ${{ matrix.container }} runs-on: ubuntu-latest needs: [build-deb] container: ${{ matrix.container }} @@ -522,6 +523,7 @@ jobs: ./test test-osx-pkg: + name: Test OSX pkg runs-on: macos-latest needs: [build-osx-pkg] steps: @@ -542,6 +544,7 @@ jobs: ./test test-windows-clang_cl: + name: Test Windows installer built with clang_cl runs-on: windows-latest needs: [build-windows] steps: @@ -577,6 +580,7 @@ jobs: .\test.exe create-release: + name: Create draft release and upload artifacts runs-on: ubuntu-latest needs: [ build-and-test, @@ -728,6 +732,7 @@ jobs: asset_content_type: application/zip publish-docker-image: + name: Publish Docker image on Docker Hub runs-on: ubuntu-latest if: github.event_name == 'push' steps: From 5a824a0c3c428640fc9efedc96aeac82084909fb Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Mon, 3 Aug 2020 11:21:42 +0200 Subject: [PATCH 29/38] try to fix --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9e333134dc0bd..cd0ee0a852b30 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: build-and-test: name: ${{ matrix.name }} runs-on: ${{ matrix.os }} - if: matrix.enabled + if: ${{ matrix.enabled }} timeout-minutes: 35 strategy: fail-fast: false From ae792a63e24143df5f33f92a66fc90f8fcf0e847 Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Mon, 3 Aug 2020 11:35:32 +0200 Subject: [PATCH 30/38] Can't use if with matrix --- .github/workflows/ci.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cd0ee0a852b30..5a3f8b1bd592e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,6 @@ jobs: build-and-test: name: ${{ matrix.name }} runs-on: ${{ matrix.os }} - if: ${{ matrix.enabled }} timeout-minutes: 35 strategy: fail-fast: false @@ -76,39 +75,40 @@ jobs: steps: - uses: actions/checkout@v2 - name: Install pkg-config with Homebrew - if: matrix.os == 'macos-latest' + if: matrix.os == 'macos-latest' && matrix.enabled run: brew install pkg-config - name: Install python - if: (matrix.run_tests || matrix.build_system == 'meson') && matrix.os != 'macos-latest' + if: (matrix.run_tests || matrix.build_system == 'meson') && matrix.os != 'macos-latest' && matrix.enabled run: sudo apt-get --assume-yes install python3-wheel python3-setuptools - name: Install meson and ninja - if: matrix.build_system == 'meson' + if: matrix.build_system == 'meson' && matrix.enabled run: pip3 install --user meson==0.52.0 ninja==1.10.0 - name: Install test dependencies - if: matrix.run_tests + if: matrix.run_tests && matrix.enabled run: pip3 install --user 'git+https://github.com/radareorg/radare2-r2pipe#egg=r2pipe&subdirectory=python' - name: Install clang - if: matrix.compiler == 'clang' && matrix.os == 'ubuntu-latest' + if: matrix.compiler == 'clang' && matrix.os == 'ubuntu-latest' && matrix.enabled run: sudo apt-get --assume-yes install clang - name: Checkout our Testsuite Binaries + if: matrix.enabled uses: actions/checkout@v2 with: repository: radareorg/radare2-testbins path: test/bins - name: Configure with ACR and build - if: matrix.build_system == 'acr' + if: matrix.build_system == 'acr' && matrix.enabled run: ./configure --prefix=${HOME} && make env: CC: ${{ matrix.compiler }} - name: Build with Meson - if: matrix.build_system == 'meson' + if: matrix.build_system == 'meson' && matrix.enabled 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' + if: matrix.build_system == 'acr' && matrix.enabled run: | # Install the radare2 export PATH=${HOME}/bin:${HOME}/.local/bin:${PATH} @@ -116,7 +116,7 @@ jobs: 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' + if: matrix.build_system == 'meson' && matrix.enabled run: | # Install the radare2 export PATH=${HOME}/bin:${HOME}/.local/bin:${PATH} @@ -124,7 +124,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.run_tests + if: matrix.run_tests && matrix.enabled run: | # Running the test suite export PATH=${HOME}/bin:${HOME}/.local/bin:${PATH} @@ -140,7 +140,7 @@ jobs: NEWSHELL: ${{ matrix.newshell }} - name: Upload coverage info uses: codecov/codecov-action@v1 - if: matrix.coverage == '1' + if: matrix.coverage == '1' && matrix.enabled build-centos6: name: Build on CentOS 6 From 4a91c0eb019fc840da5d3d2e2efce588ff800c37 Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Mon, 3 Aug 2020 11:45:58 +0200 Subject: [PATCH 31/38] Try --- .github/workflows/ci.yml | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5a3f8b1bd592e..6ff925852e3ec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,6 +38,7 @@ jobs: compiler: clang run_tests: true enabled: ${{ github.event_name != 'pull_request' }} + continue-on-error: ${{ github.event_name != 'pull_request' }} - name: linux-meson-gcc-tests os: ubuntu-latest build_system: meson @@ -46,6 +47,7 @@ jobs: coverage: true run_tests: true enabled: ${{ github.event_name != 'pull_request' }} + continue-on-error: ${{ github.event_name != 'pull_request' }} - name: linux-acr-clang-build os: ubuntu-latest build_system: acr @@ -73,42 +75,43 @@ jobs: enabled: true steps: + - if: !matrix.enabled + run: exit 1 - uses: actions/checkout@v2 - name: Install pkg-config with Homebrew - if: matrix.os == 'macos-latest' && matrix.enabled + if: matrix.os == 'macos-latest' run: brew install pkg-config - name: Install python - if: (matrix.run_tests || matrix.build_system == 'meson') && matrix.os != 'macos-latest' && matrix.enabled + if: (matrix.run_tests || matrix.build_system == 'meson') && matrix.os != 'macos-latest' run: sudo apt-get --assume-yes install python3-wheel python3-setuptools - name: Install meson and ninja - if: matrix.build_system == 'meson' && matrix.enabled + if: matrix.build_system == 'meson' run: pip3 install --user meson==0.52.0 ninja==1.10.0 - name: Install test dependencies - if: matrix.run_tests && matrix.enabled + if: matrix.run_tests run: pip3 install --user 'git+https://github.com/radareorg/radare2-r2pipe#egg=r2pipe&subdirectory=python' - name: Install clang - if: matrix.compiler == 'clang' && matrix.os == 'ubuntu-latest' && matrix.enabled + if: matrix.compiler == 'clang' && matrix.os == 'ubuntu-latest' run: sudo apt-get --assume-yes install clang - name: Checkout our Testsuite Binaries - if: matrix.enabled uses: actions/checkout@v2 with: repository: radareorg/radare2-testbins path: test/bins - name: Configure with ACR and build - if: matrix.build_system == 'acr' && matrix.enabled + if: matrix.build_system == 'acr' run: ./configure --prefix=${HOME} && make env: CC: ${{ matrix.compiler }} - name: Build with Meson - if: matrix.build_system == 'meson' && matrix.enabled + 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.enabled + if: matrix.build_system == 'acr' run: | # Install the radare2 export PATH=${HOME}/bin:${HOME}/.local/bin:${PATH} @@ -116,7 +119,7 @@ jobs: 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' && matrix.enabled + if: matrix.build_system == 'meson' run: | # Install the radare2 export PATH=${HOME}/bin:${HOME}/.local/bin:${PATH} @@ -124,7 +127,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.run_tests && matrix.enabled + if: matrix.run_tests run: | # Running the test suite export PATH=${HOME}/bin:${HOME}/.local/bin:${PATH} @@ -140,7 +143,7 @@ jobs: NEWSHELL: ${{ matrix.newshell }} - name: Upload coverage info uses: codecov/codecov-action@v1 - if: matrix.coverage == '1' && matrix.enabled + if: matrix.coverage == '1' build-centos6: name: Build on CentOS 6 From 291bf53a649393455e4cb280251d7e3192441034 Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Mon, 3 Aug 2020 11:46:54 +0200 Subject: [PATCH 32/38] try to fix 2 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6ff925852e3ec..7deeb4dc09d7c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -75,7 +75,7 @@ jobs: enabled: true steps: - - if: !matrix.enabled + - if: matrix.enabled == false run: exit 1 - uses: actions/checkout@v2 - name: Install pkg-config with Homebrew From 187595e839d1cb5614b7133636d0f8f832e9c60d Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Mon, 3 Aug 2020 11:50:24 +0200 Subject: [PATCH 33/38] test 2 --- .github/workflows/ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7deeb4dc09d7c..d73f0c0cb7825 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,7 +38,7 @@ jobs: compiler: clang run_tests: true enabled: ${{ github.event_name != 'pull_request' }} - continue-on-error: ${{ github.event_name != 'pull_request' }} + if: ${{ github.event_name != 'pull_request' }} - name: linux-meson-gcc-tests os: ubuntu-latest build_system: meson @@ -47,7 +47,7 @@ jobs: coverage: true run_tests: true enabled: ${{ github.event_name != 'pull_request' }} - continue-on-error: ${{ github.event_name != 'pull_request' }} + if: ${{ github.event_name != 'pull_request' }} - name: linux-acr-clang-build os: ubuntu-latest build_system: acr @@ -76,7 +76,8 @@ jobs: steps: - if: matrix.enabled == false - run: exit 1 + name: Skip job if not enabled + run: exit 0 - uses: actions/checkout@v2 - name: Install pkg-config with Homebrew if: matrix.os == 'macos-latest' From 2bf54acc2a711c54c15697705157d20d7e87906f Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Mon, 3 Aug 2020 11:52:24 +0200 Subject: [PATCH 34/38] test3 --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d73f0c0cb7825..e622d065a8782 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,7 +38,7 @@ jobs: compiler: clang run_tests: true enabled: ${{ github.event_name != 'pull_request' }} - if: ${{ github.event_name != 'pull_request' }} + continue-on-error: ${{ github.event_name != 'pull_request' }} - name: linux-meson-gcc-tests os: ubuntu-latest build_system: meson @@ -47,7 +47,7 @@ jobs: coverage: true run_tests: true enabled: ${{ github.event_name != 'pull_request' }} - if: ${{ github.event_name != 'pull_request' }} + continue-on-error: ${{ github.event_name != 'pull_request' }} - name: linux-acr-clang-build os: ubuntu-latest build_system: acr @@ -77,7 +77,7 @@ jobs: steps: - if: matrix.enabled == false name: Skip job if not enabled - run: exit 0 + run: exit 78 - uses: actions/checkout@v2 - name: Install pkg-config with Homebrew if: matrix.os == 'macos-latest' From 42bdb64f427826c296cdcdd0fc773d1d36fece26 Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Mon, 3 Aug 2020 11:54:37 +0200 Subject: [PATCH 35/38] Show -tests as green on PR --- .github/workflows/ci.yml | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e622d065a8782..469ca10935e51 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,7 +38,6 @@ jobs: compiler: clang run_tests: true enabled: ${{ github.event_name != 'pull_request' }} - continue-on-error: ${{ github.event_name != 'pull_request' }} - name: linux-meson-gcc-tests os: ubuntu-latest build_system: meson @@ -47,7 +46,6 @@ jobs: coverage: true run_tests: true enabled: ${{ github.event_name != 'pull_request' }} - continue-on-error: ${{ github.event_name != 'pull_request' }} - name: linux-acr-clang-build os: ubuntu-latest build_system: acr @@ -75,44 +73,43 @@ jobs: enabled: true steps: - - if: matrix.enabled == false - name: Skip job if not enabled - run: exit 78 - uses: actions/checkout@v2 + if: matrix.enabled - name: Install pkg-config with Homebrew - if: matrix.os == 'macos-latest' + if: matrix.os == 'macos-latest' && matrix.enabled run: brew install pkg-config - name: Install python - if: (matrix.run_tests || matrix.build_system == 'meson') && matrix.os != 'macos-latest' + if: (matrix.run_tests || matrix.build_system == 'meson') && matrix.os != 'macos-latest' && matrix.enabled run: sudo apt-get --assume-yes install python3-wheel python3-setuptools - name: Install meson and ninja - if: matrix.build_system == 'meson' + if: matrix.build_system == 'meson' && matrix.enabled run: pip3 install --user meson==0.52.0 ninja==1.10.0 - name: Install test dependencies - if: matrix.run_tests + if: matrix.run_tests && matrix.enabled run: pip3 install --user 'git+https://github.com/radareorg/radare2-r2pipe#egg=r2pipe&subdirectory=python' - name: Install clang - if: matrix.compiler == 'clang' && matrix.os == 'ubuntu-latest' + if: matrix.compiler == 'clang' && matrix.os == 'ubuntu-latest' && matrix.enabled run: sudo apt-get --assume-yes install clang - name: Checkout our Testsuite Binaries + if: matrix.enabled uses: actions/checkout@v2 with: repository: radareorg/radare2-testbins path: test/bins - name: Configure with ACR and build - if: matrix.build_system == 'acr' + if: matrix.build_system == 'acr' && matrix.enabled run: ./configure --prefix=${HOME} && make env: CC: ${{ matrix.compiler }} - name: Build with Meson - if: matrix.build_system == 'meson' + if: matrix.build_system == 'meson' && matrix.enabled 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' + if: matrix.build_system == 'acr' && matrix.enabled run: | # Install the radare2 export PATH=${HOME}/bin:${HOME}/.local/bin:${PATH} @@ -120,7 +117,7 @@ jobs: 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' + if: matrix.build_system == 'meson' && matrix.enabled run: | # Install the radare2 export PATH=${HOME}/bin:${HOME}/.local/bin:${PATH} @@ -128,7 +125,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.run_tests + if: matrix.run_tests && matrix.enabled run: | # Running the test suite export PATH=${HOME}/bin:${HOME}/.local/bin:${PATH} @@ -144,7 +141,7 @@ jobs: NEWSHELL: ${{ matrix.newshell }} - name: Upload coverage info uses: codecov/codecov-action@v1 - if: matrix.coverage == '1' + if: matrix.coverage == '1' && matrix.enabled build-centos6: name: Build on CentOS 6 From 374467c53bb8ce6c4f6a11a340f39cebb4f24161 Mon Sep 17 00:00:00 2001 From: Anton Kochkov Date: Fri, 7 Aug 2020 14:48:17 +0800 Subject: [PATCH 36/38] Use latest available Python 3.6 for Debian CI --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 469ca10935e51..05b702b287df0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -199,9 +199,9 @@ jobs: run: apt-get install --yes checkinstall libbz2-dev libc6-dev libgdbm-dev libncursesw5-dev libreadline-gplv2-dev libssl-dev libsqlite3-dev tk-dev - name: Install Python from source run: | - curl -o Python-3.6.9.tgz https://www.python.org/ftp/python/3.6.9/Python-3.6.9.tgz - tar -zxvf Python-3.6.9.tgz - cd Python-3.6.9/ + curl -o Python-3.6.11.tgz https://www.python.org/ftp/python/3.6.11/Python-3.6.11.tgz + tar -zxvf Python-3.6.11.tgz + cd Python-3.6.11/ ./configure make install - name: Checkout r2 From 6b3ecdfc5c947237daf4708922e720d2e85be581 Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Wed, 26 Aug 2020 10:18:12 +0200 Subject: [PATCH 37/38] ff --- cc | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 cc diff --git a/cc b/cc new file mode 100644 index 0000000000000..e69de29bb2d1d From 7ca5f4e4be4e406b903ad1577590b08c6dc578f9 Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Wed, 26 Aug 2020 10:19:27 +0200 Subject: [PATCH 38/38] Re-remove pr.yaml and static.yaml --- .github/workflows/pr.yaml | 115 ----------------------------------- .github/workflows/static.yml | 35 ----------- 2 files changed, 150 deletions(-) delete mode 100644 .github/workflows/pr.yaml delete mode 100644 .github/workflows/static.yml diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml deleted file mode 100644 index fcc5e2b2bdfef..0000000000000 --- a/.github/workflows/pr.yaml +++ /dev/null @@ -1,115 +0,0 @@ -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 python - if: (matrix.run_tests || matrix.build_system == 'meson') && matrix.os != 'macos-latest' - run: sudo apt-get --assume-yes install python3-wheel python3-setuptools - - name: Install meson and ninja - if: matrix.build_system == 'meson' - run: pip3 install --user meson==0.52.0 ninja==1.10.0 - - name: Install test dependencies - if: matrix.run_tests - run: pip3 install --user 'git+https://github.com/radareorg/radare2-r2pipe#egg=r2pipe&subdirectory=python' - - 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 }} - - name: Run fuzz tests - if: matrix.run_tests && contains(github.event.pull_request.head.ref, 'fuzz') - run: | - 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 fuzz-tests diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml deleted file mode 100644 index 571275fc1699d..0000000000000 --- a/.github/workflows/static.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Radare2 CI - static build - -on: - schedule: - # “At 00:00 on every 7th day-of-week.” - - cron: '0 0 * * */7' - pull_request: - branches: - - master - -jobs: - build: - name: ubuntu-static-tests - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v2 - if: github.event_name != 'pull_request' || contains(github.event.pull_request.head.ref, 'static') - - name: Checkout our Testsuite Binaries - if: github.event_name != 'pull_request' || contains(github.event.pull_request.head.ref, 'static') - uses: actions/checkout@v2 - with: - repository: radareorg/radare2-testbins - path: test/bins - - name: Install static - if: github.event_name != 'pull_request' || contains(github.event.pull_request.head.ref, 'static') - run: | - ./sys/static.sh - sudo make symstall - - name: Run tests - if: github.event_name != 'pull_request' || contains(github.event.pull_request.head.ref, 'static') - run: | - r2 -v - r2r -v - cd test - make