rust bindings update #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PJ | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
LD_LIBRARY_PATH: /usr/local/lib | |
steps: | |
- uses: actions/checkout@v3 | |
- name: update | |
run: sudo apt update | |
- name: install dep | |
run: sudo apt install -y git gcc make g++ python3 python3-dev swig curl clang | |
- name: install rust | |
run: | | |
sudo curl https://sh.rustup.rs -sSf | sh -s -- -y | |
export PATH=$PATH:/root/.cargo/bin | |
- name: build pjsip | |
working-directory: ./pjproject | |
run: | | |
./configure --enable-shared | |
make dep | |
make | |
sudo make install | |
- name: build python module | |
working-directory: ./pjproject/pjsip-apps/src/swig/python | |
run: | | |
make | |
make install | |
- name: test python module | |
run: python3 -c 'import pjsua2' | |
- name: compile c example | |
working-directory: ./c | |
run: make | |
- name: compile cpp example | |
working-directory: ./cpp | |
run: make | |
- name: compile rust example | |
working-directory: ./rust | |
run: cargo build |