Fix TCC CI and improve the rest of jobs ##ci

This commit is contained in:
pancake 2021-01-13 01:25:23 +01:00 committed by pancake
parent 72f67e0612
commit af66a574ba
3 changed files with 51 additions and 36 deletions

View File

@ -1,6 +1,12 @@
name: CI name: CI
on: push on:
push:
branches:
- master
pull_request:
# schedule:
# - cron: '0 0 * * 1'
# python sys\meson.py --release --backend vs2019 --shared --install --prefix="%cd%\radar e2_dist" --webui # python sys\meson.py --release --backend vs2019 --shared --install --prefix="%cd%\radar e2_dist" --webui
@ -24,10 +30,12 @@ jobs:
# with: # with:
# path: radare2_dist/* # path: radare2_dist/*
build-spaces: build-spaces:
name: Build spaces name: linux-meson-spaces
continue-on-error: true # continue-on-error: true
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
steps: steps:
- name: Checkout
uses: actions/checkout@v2
#- name: XXX this is not possible with make Install from a directory with spaces #- name: XXX this is not possible with make Install from a directory with spaces
# run: | # run: |
# git config pull.rebase false # git config pull.rebase false
@ -47,19 +55,21 @@ jobs:
run: | run: |
export PATH=${HOME}/.local/bin:${HOME}/Library/Python/3.9/bin:${PATH} export PATH=${HOME}/.local/bin:${HOME}/Library/Python/3.9/bin:${PATH}
sudo apt-get --assume-yes install python3-wheel python3-setuptools sudo apt-get --assume-yes install python3-wheel python3-setuptools
pip3 install --user meson==0.55.3 ninja==1.10.0 sudo pip3 install meson==0.55.3 ninja==1.10.0
git config --global pull.rebase false git config --global pull.rebase false
git clone --depth 1 https://github.com/radareorg/radare2 "spa ces" git clone --depth 1 . "spa ces"
cd "spa ces" cd "spa ces"
meson --prefix="/tmp/r 2" build > /dev/null export CFLAGS="-O2 -Werror -Wno-unused-result -Wno-stringop-truncation"
ninja -C build > /dev/null meson --prefix="/tmp/r 2" build
ninja -C build install ; cd .. ninja -C build
ninja -C build install
cd ..
find "/tmp/r 2" find "/tmp/r 2"
LD_LIBRARY_PATH="/tmp/r 2/lib/x86_64-linux-gnu/" "/tmp/r 2/bin/r2" -v LD_LIBRARY_PATH="/tmp/r 2/lib/x86_64-linux-gnu/" "/tmp/r 2/bin/r2" -v
windows-dist: windows-dist:
name: windows-${{ matrix.name }} name: windows-${{ matrix.name }}
# if: contains(github.ref, 'release-') # if: contains(github.ref, 'ci-')
runs-on: windows-latest runs-on: windows-latest
strategy: strategy:
fail-fast: false fail-fast: false
@ -132,7 +142,7 @@ jobs:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Packaging for Debian - name: Packaging for Debian
run: export CFLAGS="-Werror -Wno-cpp"; sys/debian.sh run: sys/debian.sh
- name: Pub - name: Pub
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
@ -183,9 +193,9 @@ jobs:
# uses: actions/upload-artifact@v2 # uses: actions/upload-artifact@v2
# with: # with:
# path: rpmbuild/RPMS/*/*.rpm # path: rpmbuild/RPMS/*/*.rpm
linux-asan: linux-asan-fuzz:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: contains(github.ref, 'release-') if: contains(github.ref, 'master') || contains(github.ref, 'ci-')
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
@ -194,20 +204,26 @@ jobs:
pip install r2pipe pip install r2pipe
sys/sanitize.sh sys/sanitize.sh
- name: Running tests - name: Running tests
run: make tests run: |
export LD_LIBRARY_PATH=/usr/local/lib
make tests
- name: Run fuzz tests - name: Run fuzz tests
run: make -C test fuzz-tests run: make -C test fuzz-tests
linux-test: linux-test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
# if: contains(github.ref, 'ci-')
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Building Radare2 - name: Building Radare2
run: | run: |
pip install r2pipe pip install r2pipe wheel
export CFLAGS="-O2 -Wno-unused-result"
sys/install.sh sys/install.sh
- name: Running tests - name: Running tests
run: make tests run: |
export LD_LIBRARY_PATH=/usr/local/lib
make tests
# Apple # Apple
macos-acr: macos-acr:
@ -218,28 +234,25 @@ jobs:
- name: Packaging - name: Packaging
run: dist/macos/build-pkg.sh run: dist/macos/build-pkg.sh
- name: Building Radare2 - name: Building Radare2
run: sys/install.sh > /dev/null run: sys/install.sh
- name: Pub - name: Pub
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
path: dist/macos/*.pkg path: dist/macos/*.pkg
macos-test: macos-test:
runs-on: macos-latest runs-on: macos-latest
if: contains(github.ref, 'mac-') if: contains(github.ref, 'master') || contains(github.ref, 'ci-')
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Building Radare2 - name: Building Radare2
run: export CFLAGS="-Werror -Wno-cpp"; sys/install.sh > /dev/null run: export CFLAGS="-O2 -Werror -Wno-cpp -Wno-stringop-truncation"; sys/install.sh
- name: Running tests - name: Running tests
run: make tests run: make tests
- name: Pub
uses: actions/upload-artifact@v2
with:
path: dist/macos/*.pkg
# Mobile # Mobile
ios-cydia: ios-cydia:
if: contains(github.ref, 'master') || contains(github.ref, 'ci-')
runs-on: macos-latest runs-on: macos-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
@ -256,7 +269,7 @@ jobs:
# - uses: actions/upload-artifact@v2 # - uses: actions/upload-artifact@v2
# with: # with:
# name: radare2-arm32_${{ steps.extract_version.outputs.branch }}_iphoneos-arm # name: radare2-arm32_${{ steps.extract_version.outputs.branch }}_iphoneos-arm
# path: ./sys/cydia/radare2/radare2-arm32_${{ steps.extract_version.outputs.branch }}_iphoneos-arm.deb # path: ./dist/cydia/radare2/radare2-arm32_${{ steps.extract_version.outputs.branch }}_iphoneos-arm.deb
- name: Create cydia package - name: Create cydia package
run: ./sys/ios-cydia.sh run: ./sys/ios-cydia.sh
- name: Create iOS SDK - name: Create iOS SDK
@ -267,16 +280,15 @@ jobs:
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
with: with:
name: radare2_iphoneos-arm name: radare2_iphoneos-arm
path: ./sys/cydia/radare2/*.deb path: ./dist/cydia/radare2*/*.deb
android-build: android-build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
# if: contains(github.ref, 'release-')
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
# name: [x86_64, arm, aarch64] # name: [x86_64, arm, aarch64]
name: [aarch64] name: [x86_64, aarch64]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Install dependencies - name: Install dependencies

View File

@ -2,7 +2,9 @@ name: "Code scanning - action"
on: on:
push: push:
pull_request: branches:
- master
# pull_request:
schedule: schedule:
- cron: '0 0 * * 1' - cron: '0 0 * * 1'

View File

@ -1,9 +1,10 @@
name: Radare2 CI - build with TinyCC compiler name: TCC
on: on:
schedule: push:
# “At 00:00 on every Tuesday, Thursday, and Saturday” branches:
- cron: '0 13 * * 2,4,6' - master
pull_request:
jobs: jobs:
build: build:
@ -30,6 +31,11 @@ jobs:
repository: radareorg/radare2-testbins repository: radareorg/radare2-testbins
path: test/bins path: test/bins
- name: Install dependencies
run: |
sudo apt-get --assume-yes install wheel setuptools || true
sudo python -m pip install --upgrade pip
pip install r2pipe
- name: Configure, build and install - name: Configure, build and install
env: env:
CC: tcc CC: tcc
@ -38,11 +44,6 @@ jobs:
make make
sudo make install sudo make install
- name: Install test dependencies
run: |
sudo apt-get --assume-yes install python3-wheel python3-setuptools
python3 -m pip install --user 'git+https://github.com/radareorg/radare2-r2pipe#egg=r2pipe&subdirectory=python'
- name: Run tests - name: Run tests
env: env:
PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig