Skip to content

[Github Actions] macOS debug build workflow improvements #22

[Github Actions] macOS debug build workflow improvements

[Github Actions] macOS debug build workflow improvements #22

Workflow file for this run

name: Ubuntu build/release workflow
on:
push:
pull_request:
release:
types: [published]
branches:
- master
jobs:
build:
name: Build wheel on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
python-version: ['3.8', '3.9', '3.10']
exclude:
- os: ubuntu-20.04
python-version: '3.10'
- os: ubuntu-22.04
python-version: '3.8'
- os: ubuntu-22.04
python-version: '3.9'
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt install libboost-dev libboost-system-dev libboost-iostreams-dev libboost-python-dev
pip install --upgrade pip setuptools wheel pytest
- name: Build wheel
run: |
python setup.py v8
python setup.py sdist bdist_wheel -d stpyv8-${{ matrix.os }}-${{ matrix.python-version }}
python setup.py install
cp v8/out.gn/x64.release.sample/icudtl.dat stpyv8-${{ matrix.os }}-${{ matrix.python-version }}/icudtl.dat
env:
V8_DEPS_LINUX: 0
LDFLAGS: -L/usr/lib -L/usr/lib/x86_64-linux-gnu
- name: Test wheel
run: |
pytest -v
- name: Create wheel zip
uses: vimtor/action-zip@v1.1
with:
files: stpyv8-${{ matrix.os }}-${{ matrix.python-version }}/
recursive: false
dest: stpyv8-${{ matrix.os }}-python-${{ matrix.python-version }}.zip
- name: Upload wheel zip
uses: actions/upload-artifact@v3
if: ${{ github.event_name != 'release' }}
with:
name: wheels
path: stpyv8-${{ matrix.os }}-python-${{ matrix.python-version }}.zip
- name: Release
uses: softprops/action-gh-release@v1
if: ${{ github.event_name == 'release' }}
with:
files: 'stpyv8-${{ matrix.os }}-python-${{ matrix.python-version }}.zip'
token: ${{ secrets.GITHUB_TOKEN }}