Update glib to version 2.76.5 #1191
Workflow file for this run
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
on: | |
push: | |
branches: [main] | |
pull_request: | |
release: | |
types: [published] | |
env: | |
python_version: '3.11' | |
name: CI | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
if: "!contains(github.event.head_commit.message, 'skip ci')" | |
steps: | |
- uses: actions/[email protected] | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Set up Python | |
uses: actions/[email protected] | |
with: | |
python-version: ${{ env.python_version }} | |
- name: Lint with Pre-commit | |
uses: pre-commit/[email protected] | |
- name: Check Poetry lock file integrity | |
run: | | |
python -m pip install --constraint=.github/constraints.txt poetry | |
poetry config virtualenvs.in-project true | |
poetry check | |
test: | |
needs: lint | |
name: Test with Python ${{ matrix.python-version }} | |
strategy: | |
matrix: | |
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] | |
runs-on: windows-latest | |
timeout-minutes: 60 | |
if: "!contains(github.event.head_commit.message, 'skip ci')" | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Set up Python | |
uses: actions/[email protected] | |
with: | |
python-version: ${{ matrix.python-version }} | |
allow-prereleases: true | |
- name: Use Python Dependency Cache | |
uses: actions/[email protected] | |
with: | |
path: ~\AppData\Local\pip\Cache | |
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }} | |
restore-keys: ${{ runner.os }}-poetry- | |
- name: Install Poetry | |
run: | | |
python -m pip install --constraint=.github/constraints.txt poetry | |
poetry config virtualenvs.in-project true | |
- name: Install Python Dependencies | |
run: poetry install | |
- name: Install dependencies | |
run: | | |
pip install tox tox-gh-actions | |
# Temporarily move the preinstalled git, it causes errors related to cygwin. | |
- name: Move git binary | |
run: | | |
Move-Item "C:\Program Files\Git\usr\bin" "C:\Program Files\Git\usr\notbin" | |
Move-Item "C:\Program Files\Git\bin" "C:\Program Files\Git\notbin" | |
- name: Test with tox | |
run: tox | |
- name: Restore git binary | |
run: | | |
Move-Item "C:\Program Files\Git\usr\notbin" "C:\Program Files\Git\usr\bin" | |
Move-Item "C:\Program Files\Git\notbin" "C:\Program Files\Git\bin" | |
build: | |
needs: lint | |
name: Build GTK Binaries | |
runs-on: windows-latest | |
timeout-minutes: 75 | |
if: "!contains(github.event.head_commit.message, 'skip ci')" | |
strategy: | |
matrix: | |
gtk-version: ['3', '4'] | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Set up Python | |
uses: actions/[email protected] | |
with: | |
python-version: ${{ env.python_version }} | |
- name: Use Python Dependency Cache | |
uses: actions/[email protected] | |
with: | |
path: ~\AppData\Local\pip\Cache | |
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }} | |
restore-keys: ${{ runner.os }}-poetry- | |
- name: Install Poetry | |
run: | | |
python -m pip install --constraint=.github/constraints.txt poetry | |
poetry config virtualenvs.in-project true | |
- name: Install Python Dependencies | |
run: poetry install | |
# Temporarily move the preinstalled git, it causes errors related to cygwin. | |
- name: Move git binary | |
run: | | |
Move-Item "C:\Program Files\Git\usr\bin" "C:\Program Files\Git\usr\notbin" | |
Move-Item "C:\Program Files\Git\bin" "C:\Program Files\Git\notbin" | |
- name: Build GTK3 | |
if: matrix.gtk-version == '3' | |
run: > | |
poetry run gvsbuild build --ninja-opts -j2 gtk3 gtksourceview4 graphene | |
glib-networking | |
- name: Build GTK4 | |
if: matrix.gtk-version == '4' | |
run: > # Use -j2 option to prevent out of memory errors with GitHub Action runners | |
poetry run gvsbuild build --ninja-opts -j2 --enable-gi cairo gtk4 libadwaita | |
gtksourceview5 gobject-introspection adwaita-icon-theme hicolor-icon-theme | |
- name: Restore git binary | |
run: | | |
Move-Item "C:\Program Files\Git\usr\notbin" "C:\Program Files\Git\usr\bin" | |
Move-Item "C:\Program Files\Git\notbin" "C:\Program Files\Git\bin" | |
- name: Create Source Dist and Wheel | |
run: poetry build | |
- name: Upload gvsbuild-${{ github.event.release.tag_name }}.tar.gz | |
uses: actions/upload-artifact@v3 | |
if: github.event_name == 'release' && matrix.gtk-version == '4' | |
with: | |
name: gvsbuild-${{ github.event.release.tag_name }}.tar.gz | |
path: dist/gvsbuild-${{ github.event.release.tag_name }}.tar.gz | |
- name: Upload gvsbuild-${{ github.event.release.tag_name }}-py3-none-any.whl | |
uses: actions/upload-artifact@v3 | |
if: github.event_name == 'release' && matrix.gtk-version == '4' | |
with: | |
name: gvsbuild-${{ github.event.release.tag_name }}-py3-none-any.whl | |
path: dist/gvsbuild-${{ github.event.release.tag_name }}-py3-none-any.whl | |
- name: Publish to PyPI (release only) | |
if: github.event_name == 'release' && matrix.gtk-version == '4' | |
run: poetry publish -u __token__ -p ${{ secrets.PYPI_TOKEN }} |