Skip to content

Commit

Permalink
Run tests for swig-rb on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jun66j5 committed Oct 13, 2024
1 parent e79325b commit 30d8351
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ jobs:
bindings:
if: ${{ contains(fromJson(inputs.targets), 'swig-py') ||
contains(fromJson(inputs.targets), 'swig-pl') ||
contains(fromJson(inputs.targets), 'swig-rb') ||
contains(fromJson(inputs.targets), 'javahl') }}
runs-on: ${{ matrix.os }}
needs: prepare
Expand All @@ -109,6 +110,7 @@ jobs:
os: ${{ fromJson(inputs.os) }}
python-version: ['3.x']
perl-version: ['5']
ruby-version: ['mswin']
java-version: ['21']

defaults:
Expand Down Expand Up @@ -187,6 +189,12 @@ jobs:
with:
perl-version: ${{ matrix.perl-version }}

- name: Set up Ruby ${{ matrix.ruby-version }}
if: ${{ contains(fromJson(inputs.targets), 'swig-rb') }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}

- name: Set up Java ${{ matrix.java-version }}
if: ${{ contains(fromJson(inputs.targets), 'javahl') }}
uses: actions/setup-java@v4
Expand Down
10 changes: 10 additions & 0 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,16 @@ switch -Exact ($args[0]) {
$test_targets += '--swig=perl'
$use_swig = $true
}
if ($input_targets -Contains 'swig-rb') {
if (Select-String -Path win-tests.py -Quiet collector=dir) {
$build_targets += '__SWIG_RUBY__'
$test_targets += '--swig=ruby'
$use_swig = $true
}
else {
Write-Warning 'SKIP: swig-rb'
}
}
if ($input_targets -Contains 'javahl') {
$genmake_opts += @("--with-jdk=$java_home",
"--with-junit=$junit_file")
Expand Down

0 comments on commit 30d8351

Please sign in to comment.