Skip to content

CI

CI #433

Workflow file for this run

name: CI
on:
push:
branches:
- 'master'
tags:
- 'python-v*'
schedule:
- cron: '0 18 * * 1,3,5' # Three-weekly at 18:00 UTC on Monday, Wednesday, and Friday
pull_request:
branches:
- master
jobs:
build:
name: Ubuntu
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Install python and other dependencies
run: sudo apt-get update && sudo apt-get --assume-yes install python3-wheel python3-setuptools ruby ocaml opam rustc cargo
- name: Install meson and ninja
run: pip3 install --user meson ninja PyYAML
- name: Checkout rizin
uses: actions/checkout@v2
with:
repository: rizinorg/rizin
submodules: recursive
path: rizin
- name: Build Rizin
run: |
export PATH=${HOME}/.local/bin:${PATH}
meson --prefix=${HOME} build && ninja -C build
working-directory: rizin
- name: Install Rizin
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}
ninja -C build install
working-directory: rizin
- name: Run Python rz-pipe test
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}
python3 setup.py install --user
python3 -m pip install -r requirements-test.txt
make pytest
working-directory: python
- name: Build Python distribution packages
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}
python3 -m pip install build
python3 -m build
working-directory: python
- name: Publish Python package to pypi
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
packages_dir: python/dist
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.15.x
- name: Run Go rz-pipe test
run: |
export PATH=${HOME}/bin:${HOME}/.local/bin:${PATH}
export GOPATH=${HOME}/go
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
working-directory: go
env:
GO111MODULE: on
- name: Run OCaml rz-pipe test
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}
opam init
opam install -y .
working-directory: ocaml
- name: Run Rust rz-pipe test
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}
cargo build
working-directory: rust
- name: Run Ruby rz-pipe test
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}
make
working-directory: ruby
rust-fmt-clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --check --manifest-path rust/Cargo.toml
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --manifest-path rust/Cargo.toml -- -D warnings