Skip to content

Commit

Permalink
CI: add testing with GTK build for Windows (msvc)
Browse files Browse the repository at this point in the history
Closes: ebassi#265
  • Loading branch information
DjLegolas committed Jan 24, 2025
1 parent d402214 commit 36c5510
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
26 changes: 26 additions & 0 deletions .github/workflows/msvc-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,41 @@ on:
jobs:
build:
runs-on: windows-latest
name: Build with introspection=${{ matrix.build_introspection }}
env:
PYTHONIOENCODING: "utf-8"
GIR_BUILD: ""
strategy:
fail-fast: false
matrix:
build_introspection: [ true, false ]
steps:
- uses: actions/checkout@master
- uses: actions/setup-python@v1
with:
python-version: '3.12'
- uses: seanmiddleditch/gha-setup-vsdevenv@master
- name: Install GTK
if: matrix.build_introspection
run: |
$WebClient = New-Object System.Net.WebClient
$WebClient.DownloadFile("https://github.com/wingtk/gvsbuild/releases/download/2024.8.1/GTK4_Gvsbuild_2024.8.1_x64.zip","C:\GTK.zip")
7z x C:\GTK.zip -oC:\GTK
echo "C:\GTK\lib" | Out-File -FilePath $env:GITHUB_PATH -Append
echo "C:\GTK\bin" | Out-File -FilePath $env:GITHUB_PATH -Append
echo "C:\GTK" | Out-File -FilePath $env:GITHUB_PATH -Append
echo "GIR_BUILD=-Dintrospection=enabled" >> $GITHUB_ENV
python -m pip install setuptools
python -m pip install C:\GTK\python\pycairo-1.26.1-cp312-cp312-win_amd64.whl C:\GTK\python\pygobject-3.48.2-cp312-cp312-win_amd64.whl
- name: Prebuild
run: |
echo %PATH%
python -m pip install meson==1.0.0
meson build --verbose _build
- uses: BSFishy/meson-build@v1.0.3
with:
action: test
directory: _build
setup-options: ${{ env.GIR_BUILD }}
options: "--verbose"
meson-version: "1.0.0"
2 changes: 1 addition & 1 deletion tests/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ endif

src_build_path = meson.current_build_dir() / '../src'

if build_gir and host_system == 'linux' and not meson.is_cross_build()
if build_gir and not meson.is_cross_build()
foreach unit: ['introspection.py']
if get_option('installed_tests')
install_data(unit, install_dir: installed_test_bindir)
Expand Down

0 comments on commit 36c5510

Please sign in to comment.