-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: add testing with GTK build for Windows (msvc)
Closes: #265
- Loading branch information
Showing
4 changed files
with
59 additions
and
8 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 setup _build | ||
- uses: BSFishy/[email protected] | ||
with: | ||
action: test | ||
directory: _build | ||
setup-options: ${{ env.GIR_BUILD }} | ||
options: "--verbose" | ||
meson-version: "1.0.0" |
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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
message('In tests/meson.build') | ||
unit_tests = [ | ||
'box', | ||
'box2d', | ||
|
@@ -20,8 +21,10 @@ unit_tests = [ | |
'vec4' | ||
] | ||
|
||
message('find "gen-installed-test.py"') | ||
gen_installed_test = find_program('gen-installed-test.py') | ||
|
||
message('build paths') | ||
installed_test_datadir = get_option('prefix') / get_option('datadir') / 'installed-tests' / graphene_api_path | ||
installed_test_bindir = get_option('prefix') / get_option('libexecdir') / 'installed-tests' / graphene_api_path | ||
|
||
|
@@ -33,7 +36,7 @@ mutest_dep = dependency('mutest-1', | |
required: false, | ||
disabler: true, | ||
) | ||
|
||
message('if mutest_dep.found') | ||
if mutest_dep.found() | ||
foreach unit: unit_tests | ||
wrapper = '@[email protected]'.format(unit) | ||
|
@@ -65,8 +68,8 @@ if mutest_dep.found() | |
endif | ||
|
||
src_build_path = meson.current_build_dir() / '../src' | ||
|
||
if build_gir and host_system == 'linux' and not meson.is_cross_build() | ||
message('if build_gir 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) | ||
|