Begin playing with GitHub workflows #3
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
#--------------------------------------------------------------------------- | |
# This workflow will build and archive a wxPython source distribution for | |
# CI. It will start by building a sdist archive first, and then that will be | |
# used in subsequent jobs on each supported platform and Python version. | |
#--------------------------------------------------------------------------- | |
name: ci-build | |
on: | |
push: | |
branches: [ 'master' ] | |
pull_request: | |
branches: [ 'master' ] | |
workflow_dispatch: | |
permissions: | |
contents: read | |
defaults: | |
run: | |
shell: bash | |
env: | |
PYTHONUNBUFFERED: 1 | |
jobs: | |
build-source-dist: | |
runs-on: ubuntu-latest | |
outputs: | |
VERSION: ${{ steps.generate.outputs.version }} | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
cache: 'pip' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip setuptools wheel | |
python -m pip install --upgrade -r requirements.txt | |
- name: Generate code and create sdist | |
id: generate | |
run: | | |
python build.py setrev dox etg sip --nodoc sdist | |
VERSION=$(python build.py --quiet version) | |
echo "version=$VERSION" >> "$GITHUB_OUTPUT" | |
- name: Save sdist as job artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wxPython-source | |
path: dist/wxPython-${{ steps.generate.outputs.version }}.tar.gz | |
#--------------------------------------------------------------------------- | |
# build-wheels: | |
# needs: build-source-dist | |
# strategy: | |
# matrix: | |
# os: [ubuntu-latest, windows-latest, macos-latest] | |
# python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] | |
# architecture: ['x86', 'x64'] | |
# # Exclude x86 configs on non-Windows OSs | |
# exclude: | |
# - os: ubuntu-latest | |
# architecture: x86 | |
# - os: macos-latest | |
# architecture: x86 | |
# env: | |
# VERSION: ${{ needs.build-source-dist.outputs.VERSION }} | |
# runs-on: ${{ matrix.os }} | |
# steps: | |
# - name: Checkout repo | |
# uses: actions/checkout@v3 | |
# with: | |
# submodules: 'recursive' | |
# - name: download CI source artifact | |
# uses: actions/download-artifact@v3 | |
# with: | |
# name: wxPython-source | |
# path: dist | |
# - name: Set up Python ${{ matrix.python-version }} | |
# uses: actions/setup-python@v4 | |
# with: | |
# python-version: '${{ matrix.python-version }}' | |
# architecture: '${{ matrix.architecture }}' | |
# cache: 'pip' | |
# - name: Install Python dependencies | |
# run: | | |
# python -m pip install --upgrade pip setuptools wheel | |
# python -m pip install --upgrade -r requirements.txt | |
# - name: Install Ubuntu dependencies | |
# if: ${{ matrix.os }} == ubuntu-latest | |
# run: | | |
# apt-get install -y \ | |
# freeglut3 \ | |
# freeglut3-dev \ | |
# libgl1-mesa-dev \ | |
# libglu1-mesa-dev \ | |
# libgstreamer-plugins-base1.0-dev \ | |
# libgtk-3-dev \ | |
# libjpeg-dev \ | |
# libnotify-dev \ | |
# libsdl2-dev \ | |
# libsm-dev \ | |
# libtiff-dev \ | |
# libwebkit2gtk-4.0-dev \ | |
# libxtst-dev; | |
# - name: Build wxPython wheel | |
# run: | | |
# cd dist | |
# pip wheel -v wxPython-${{ env.VERSION }}.tar.gz | |
# - name: Simple smoke test | |
# run: | | |
# cd dist | |
# pip install wxPython-*.whl | |
# python -c "import wx; print(wx); print(wx.version()); print(wx.PlatformInfo)" | |
# - name: Save wheel as job artifact | |
# uses: actions/upload-artifact@v3 | |
# # Just Windows and Macos | |
# if: ${{ matrix.os != 'ubuntu-latest' }} | |
# with: | |
# name: wxPython-wheel-${{ matrix.os }}-py${{ matrix.python-version }}-${{ matrix.architecture}} | |
# path: dist/wxPython-*.whl |