Skip to content

Commit c5c1f0d

Browse files
authored
Merge branch 'swig:master' into pr-1262
2 parents f18e4a7 + 8d529bd commit c5c1f0d

68 files changed

Lines changed: 1480 additions & 446 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/linux.yml

Lines changed: 59 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,19 @@ name: linux
33
on:
44
push:
55
paths-ignore:
6+
- '.github/workflows/macos.yml'
7+
- '.github/workflows/windows-cmake.yml'
8+
- '.github/workflows/windows.yml'
69
- 'CHANGES*'
710
- 'Doc/**'
8-
- 'appveyor.yml'
911
pull_request:
1012
branches: master
1113
paths-ignore:
14+
- '.github/workflows/macos.yml'
15+
- '.github/workflows/windows-cmake.yml'
16+
- '.github/workflows/windows.yml'
1217
- 'CHANGES*'
1318
- 'Doc/**'
14-
- 'appveyor.yml'
1519

1620
permissions:
1721
contents: read
@@ -68,9 +72,15 @@ jobs:
6872
- SWIGLANG: go
6973
VER: '1.20'
7074
CSTD: gnu11
75+
- SWIGLANG: go
76+
VER: '1.22'
77+
- SWIGLANG: go
78+
VER: '1.23'
7179
- SWIGLANG: go
7280
VER: '1.24'
7381
CSTD: gnu99 # Go 1.24 doesn't build with -Wdeclaration-after-statement
82+
- SWIGLANG: go
83+
VER: '1.25'
7484
- SWIGLANG: guile
7585
- SWIGLANG: guile
7686
VER: '3.0'
@@ -89,6 +99,7 @@ jobs:
8999
os: ubuntu-22.04 # Octave 6.4.0
90100
CPPSTD: c++11
91101
- SWIGLANG: octave
102+
VER: '8.4'
92103
os: ubuntu-24.04 # Octave 8.4.0
93104
CPPSTD: c++11
94105
- SWIGLANG: perl5
@@ -101,6 +112,7 @@ jobs:
101112
- SWIGLANG: php
102113
VER: '8.3'
103114
CPPSTD: c++11 # C++98 not supported by PHP.
115+
os: ubuntu-24.04
104116
- SWIGLANG: php
105117
VER: '8.4'
106118
CPPSTD: c++11 # C++98 not supported by PHP.
@@ -251,7 +263,13 @@ jobs:
251263
CPPSTD: c++11
252264
- SWIGLANG: ruby
253265
CPPSTD: c++11
254-
VER: '3.3.9' # 3.3.10 has an error: -Werror=missing-field-initializers, see https://bugs.ruby-lang.org/issues/21659
266+
VER: '3.3'
267+
- SWIGLANG: ruby
268+
CPPSTD: c++11
269+
VER: '3.4'
270+
- SWIGLANG: ruby
271+
CPPSTD: c++11
272+
VER: '4.0'
255273
- SWIGLANG: ruby
256274
CPPSTD: c++11
257275
- SWIGLANG: scilab
@@ -307,6 +325,16 @@ jobs:
307325
- SWIGLANG: java
308326
CPPSTD: c++17
309327
GCC: 13
328+
- SWIGLANG: java
329+
VER: 8
330+
- SWIGLANG: java
331+
VER: 11
332+
- SWIGLANG: java
333+
VER: 17
334+
- SWIGLANG: java
335+
VER: 21
336+
- SWIGLANG: java
337+
VER: 25
310338
- SWIGLANG: javascript
311339
ENGINE: node
312340
VER: '18'
@@ -373,6 +401,12 @@ jobs:
373401
CPPSTD: c++20
374402
GCC: 13
375403
os: ubuntu-22.04
404+
- SWIGLANG: javascript
405+
ENGINE: node
406+
VER: '22'
407+
CPPSTD: c++20
408+
GCC: 13
409+
os: ubuntu-22.04
376410
- SWIGLANG: javascript
377411
ENGINE: v8
378412
CSTD: c++14
@@ -395,6 +429,7 @@ jobs:
395429

396430
env:
397431
SWIGLANG: ${{ matrix.SWIGLANG }}
432+
compiler: ${{ matrix.compiler }}
398433
PY2: ${{ matrix.PY2 }}
399434
VER: ${{ matrix.VER }}
400435
ENGINE: ${{ matrix.ENGINE }}
@@ -435,70 +470,40 @@ jobs:
435470
- name: Install Dependencies
436471
run: |
437472
set -x
438-
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
439-
echo PATH="$PATH" >> $GITHUB_ENV
440-
441473
source $GITHUB_WORKSPACE/Tools/GHA-linux-install.sh
442-
echo WITHLANG="$WITHLANG" >> $GITHUB_ENV
443-
444-
case $(uname) in
445-
Linux)
446-
cpu_count=$(nproc)
447-
;;
448474
449-
Darwin)
450-
cpu_count=$(sysctl -n hw.ncpu)
451-
;;
452-
453-
*)
454-
cpu_count=1
455-
;;
456-
esac
457-
458-
if [[ $cpu_count != 1 ]]; then
475+
cpu_count=$(nproc)
476+
if test $cpu_count -gt 1; then
459477
echo SWIGJOBS=-j$cpu_count >> $GITHUB_ENV
460478
fi
461479
462-
if test '${{ matrix.compiler }}' = 'clang'; then
463-
CC="clang"
464-
CXX="clang++"
465-
466-
CFLAGS="$CFLAGS -fPIE"
467-
CXXFLAGS="$CXXFLAGS -fPIE"
468-
elif test -n "$GCC"; then
469-
CC="gcc-$GCC"
470-
CXX="g++-$GCC"
471-
else
472-
CC="gcc"
473-
CXX="g++"
474-
fi
475-
476-
export CC CXX
477-
478-
echo CC="$CC" >> $GITHUB_ENV
479-
echo CXX="$CXX" >> $GITHUB_ENV
480-
481-
ls -la $(which $CC) $(which $CXX)
482-
$CC --version
483-
$CXX --version
484-
485480
- name: Configure
486481
run: |
487482
source $GITHUB_WORKSPACE/Tools/CI-linux-environment.sh
488483
set -x
489484
490-
if [[ -z "$CSTD" ]]; then
485+
if test -z "$CSTD"; then
491486
case "$CPPSTD" in
492-
c++11) export CSTD=c11 ;;
493-
c++14) export CSTD=c11 ;;
494-
c++17) export CSTD=c17 ;;
495-
c++20) export CSTD=c17 ;;
487+
c++11) CSTD=c11 ;;
488+
c++14) CSTD=c11 ;;
489+
c++17) CSTD=c17 ;;
490+
c++20) CSTD=c17 ;;
496491
esac
497-
echo CSTD="$CSTD" >> $GITHUB_ENV
492+
if test -n "$CSTD"; then echo "CSTD=$CSTD" >> $GITHUB_ENV; fi
493+
fi
494+
if test -n "$CPPSTD"; then
495+
CONFIGOPTS+=("CXXFLAGS=-std=$CPPSTD $CXXFLAGS")
496+
echo "Use C++ standard $CPPSTD"
497+
else
498+
CONFIGOPTS+=("--disable-cpp11-testing")
499+
$CXX -x c++ -dM -E - < /dev/null | grep __cplusplus
500+
fi
501+
if test -n "$CSTD"; then
502+
CONFIGOPTS+=("CFLAGS=-std=$CSTD $CFLAGS")
503+
echo "Use C standard $CSTD"
504+
else
505+
$CC -dM -E - < /dev/null | grep __STDC_VERSION__
498506
fi
499-
if test -z "$CPPSTD"; then CONFIGOPTS+=("--disable-cpp11-testing"); fi
500-
if test -n "$CPPSTD"; then CONFIGOPTS+=("CXXFLAGS=-std=$CPPSTD $CXXFLAGS"); fi
501-
if test -n "$CSTD"; then CONFIGOPTS+=("CFLAGS=-std=$CSTD $CFLAGS"); fi
502507
if test -n "$SWIGLANG"; then CONFIGOPTS+=(--without-alllang --with-$WITHLANG); fi
503508
if test "$PY2" = "2"; then CONFIGOPTS+=(--with-python=python2 --without-python3); fi
504509
echo "${CONFIGOPTS[@]}"

0 commit comments

Comments
 (0)