summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlly Betts <olly@survex.com>2023-04-19 09:57:33 +1200
committerOlly Betts <olly@survex.com>2023-04-19 11:18:13 +1200
commit5b80118f48be5409d1a33bea0852cc481f927002 (patch)
treec355cb09d4918551d9551c5f19e6e816abf49f1d
parente1d59d0016f65cc4b15f0f1840b3beef5555267a (diff)
downloadswig-5b80118f48be5409d1a33bea0852cc481f927002.tar.gz
[ci] Try to sort out Ruby jobs
-rw-r--r--.github/workflows/ci.yml269
-rw-r--r--.github/workflows/nuget.yml62
-rw-r--r--Tools/CI-linux-environment.sh6
-rw-r--r--Tools/CI-linux-install.sh45
4 files changed, 40 insertions, 342 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index fc1227481..077614995 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -32,135 +32,16 @@ jobs:
strategy:
matrix:
include:
- - SWIGLANG: ""
- CPPFLAGS: "-DDOH_POISON"
- - SWIGLANG: ""
- GCC: 7
- - SWIGLANG: ""
- GCC: 8
- - SWIGLANG: ""
- GCC: 9
- - SWIGLANG: ""
- GCC: 10
- - SWIGLANG: ""
- GCC: 11
- - SWIGLANG: ""
- GCC: 12
- os: ubuntu-22.04
- - SWIGLANG: ""
- compiler: clang
- - SWIGLANG: csharp
- # D support can't be enabled because dmd 2.066 fails to build anything
- # under Ubuntu 18.04 due to its standard library (libphobos2.a) not
- # being compiled with -FPIC, but system gcc using -fpie by default,
- # resulting in linking errors for any output. And later versions, such
- # as 2.086.1, are not supported and result in errors in SWIG test suite.
- #
- # - SWIGLANG: d
- # VER: '2.066.0'
- # os: ubuntu-18.04 # This dlang version doesn't work under 20.04.
- - SWIGLANG: go
- VER: '1.6'
- CSTD: gnu11
- - SWIGLANG: go
- VER: '1.8'
- - SWIGLANG: go
- VER: '1.12'
- CSTD: gnu11
- - SWIGLANG: go
- VER: '1.17'
- - SWIGLANG: guile
- - SWIGLANG: guile
+ - SWIGLANG: ruby
+ VER: '1.9'
+ - SWIGLANG: ruby
+ VER: '2.0'
+ - SWIGLANG: ruby
+ VER: '2.1'
+ - SWIGLANG: ruby
VER: '2.2'
- - SWIGLANG: guile
- VER: '3.0'
- - SWIGLANG: java
- #- SWIGLANG: javascript
- # ENGINE: node
- # VER: '6'
- # CPPSTD: c++11
- # os: ubuntu-18.04
- #- SWIGLANG: javascript
- # ENGINE: node
- # VER: '8'
- # CPPSTD: c++11
- # os: ubuntu-18.04
- #- SWIGLANG: javascript
- # ENGINE: node
- # VER: '10'
- # CPPSTD: c++11
- # os: ubuntu-18.04
- - SWIGLANG: javascript
- ENGINE: node
- VER: '12'
- CPPSTD: c++11
- - SWIGLANG: javascript
- ENGINE: node
- VER: '18'
- CPPSTD: c++14
- - SWIGLANG: javascript
- ENGINE: jsc
- VER: '4.0'
- - SWIGLANG: lua
- - SWIGLANG: lua
- VER: '5.3'
- - SWIGLANG: octave
- CPPSTD: c++11
- - SWIGLANG: perl5
- - SWIGLANG: php
- VER: '8.0'
- - SWIGLANG: php
- VER: '8.1'
- - SWIGLANG: php
- VER: '8.2'
- - SWIGLANG: python
- PY2: 2
- #- SWIGLANG: python
- # VER: '3.3'
- # os: ubuntu-18.04 # Python < 3.5 not available for 20.04.
- #- SWIGLANG: python
- # VER: '3.4'
- # os: ubuntu-18.04 # Python < 3.5 not available for 20.04.
- - SWIGLANG: python
- VER: '3.5'
- - SWIGLANG: python
- VER: '3.6'
- - SWIGLANG: python
- VER: '3.7'
- - SWIGLANG: python
- VER: '3.8'
- - SWIGLANG: python
- VER: '3.9'
- - SWIGLANG: python
- VER: '3.10'
- - SWIGLANG: python
- VER: '3.11'
- - SWIGLANG: python
- PY2: 2
- SWIG_FEATURES: -builtin
- - SWIGLANG: python
- PY2: 2
- SWIG_FEATURES: -builtin -O
- - SWIGLANG: python
- SWIG_FEATURES: -builtin
- - SWIGLANG: python
- SWIG_FEATURES: -builtin -O
- - SWIGLANG: r
- #- SWIGLANG: ruby
- # VER: '1.9'
- # os: ubuntu-18.04
- #- SWIGLANG: ruby
- # VER: '2.0'
- # os: ubuntu-18.04
- #- SWIGLANG: ruby
- # VER: '2.1'
- # os: ubuntu-18.04
- #- SWIGLANG: ruby
- # VER: '2.2'
- # os: ubuntu-18.04
- #- SWIGLANG: ruby
- # VER: '2.3'
- # os: ubuntu-18.04
+ - SWIGLANG: ruby
+ VER: '2.3'
- SWIGLANG: ruby
VER: '2.4'
- SWIGLANG: ruby
@@ -175,144 +56,16 @@ jobs:
- SWIGLANG: ruby
VER: '3.1'
CPPSTD: c++11
- - SWIGLANG: scilab
- VER: '5.5.2'
- - SWIGLANG: scilab
- VER: '6.0.2'
- - SWIGLANG: tcl
- # c++11 testing
- - SWIGLANG: csharp
- CPPSTD: c++11
- - SWIGLANG: go
- VER: '1.17'
- CPPSTD: c++11
- CSTD: gnu11
- - SWIGLANG: guile
- CPPSTD: c++11
- - SWIGLANG: java
- CPPSTD: c++11
- - SWIGLANG: javascript
- ENGINE: jsc
- VER: '4.1'
- os: ubuntu-22.04
- CPPSTD: c++11
- - SWIGLANG: javascript
- ENGINE: node
- VER: '14'
- CPPSTD: c++11
- - SWIGLANG: lua
- CPPSTD: c++11
- - SWIGLANG: perl5
- CPPSTD: c++11
- - SWIGLANG: php
- CPPSTD: c++11
- CSTD: gnu11
- - SWIGLANG: python
- CPPSTD: c++11
- - SWIGLANG: r
- CPPSTD: c++11
- SWIGLANG: ruby
CPPSTD: c++11
- - SWIGLANG: scilab
- CPPSTD: c++11
- - SWIGLANG: tcl
+ - SWIGLANG: ruby
CPPSTD: c++11
- # c++14 testing
- - SWIGLANG: csharp
- CPPSTD: c++14
- - SWIGLANG: go
- VER: '1.17'
- CPPSTD: c++14
- CSTD: gnu11
- - SWIGLANG: guile
- CPPSTD: c++14
- - SWIGLANG: java
- CPPSTD: c++14
- - SWIGLANG: javascript
- ENGINE: node
- VER: '16'
- CPPSTD: c++14
- - SWIGLANG: lua
- CPPSTD: c++14
- - SWIGLANG: octave
- CPPSTD: c++14
- - SWIGLANG: perl5
- CPPSTD: c++14
- - SWIGLANG: php
- CPPSTD: c++14
- CSTD: gnu11
- - SWIGLANG: python
- CPPSTD: c++14
- - SWIGLANG: r
- CPPSTD: c++14
+ VER: '3.2'
- SWIGLANG: ruby
CPPSTD: c++14
- - SWIGLANG: scilab
- CPPSTD: c++14
- - SWIGLANG: tcl
- CPPSTD: c++14
- # c++17 testing (using gcc11)
- - SWIGLANG: csharp
- CPPSTD: c++17
- GCC: 11
- - SWIGLANG: go
- VER: '1.17'
- CPPSTD: c++17
- GCC: 11
- CSTD: gnu17
- - SWIGLANG: guile
- CPPSTD: c++17
- GCC: 11
- - SWIGLANG: java
- CPPSTD: c++17
- GCC: 11
- - SWIGLANG: javascript
- ENGINE: node
- VER: '18'
- CPPSTD: c++17
- GCC: 11
- - SWIGLANG: lua
- CPPSTD: c++17
- GCC: 11
- - SWIGLANG: octave
- CPPSTD: c++17
- GCC: 11
- - SWIGLANG: perl5
- CPPSTD: c++17
- GCC: 11
- - SWIGLANG: php
- CPPSTD: c++17
- CSTD: gnu17
- GCC: 11
- - SWIGLANG: python
- CPPSTD: c++17
- GCC: 11
- - SWIGLANG: r
- CPPSTD: c++17
- GCC: 11
- SWIGLANG: ruby
CPPSTD: c++17
GCC: 11
- - SWIGLANG: scilab
- CPPSTD: c++17
- GCC: 11
- - SWIGLANG: tcl
- CPPSTD: c++17
- GCC: 11
- # c++20 testing (using gcc12)
- # ubuntu-22.04 is currently experimental on Github Actions, so limit to just one language for now
- - SWIGLANG: python
- CPPSTD: c++20
- GCC: 12
- os: ubuntu-22.04
- # Experimental languages (these are allowed to fail)
- - SWIGLANG: mzscheme
- continue-on-error: true
- #- SWIGLANG: ocaml
- # CPPSTD: c++17
- # GCC: 11
- # continue-on-error: true
- # os: ubuntu-18.04 # ocaml-4.08 in ubuntu-20.04 not yet working
# Run all of them, as opposed to aborting when one fails
fail-fast: false
diff --git a/.github/workflows/nuget.yml b/.github/workflows/nuget.yml
deleted file mode 100644
index 40ab4244c..000000000
--- a/.github/workflows/nuget.yml
+++ /dev/null
@@ -1,62 +0,0 @@
-name: Windows Nuget Build
-
-on:
- push:
- paths-ignore:
- - 'CHANGES*'
- - 'Doc/**'
- - 'appveyor.yml'
- pull_request:
- branches: master
- paths-ignore:
- - 'CHANGES*'
- - 'Doc/**'
- - 'appveyor.yml'
-
-permissions:
- contents: read # to fetch code (actions/checkout)
-
-jobs:
- build:
-
- runs-on: windows-2019
-
- steps:
- - name: Checkout
- uses: actions/checkout@v2
- with:
- submodules: recursive
-
- - name: Install Dependencies
- shell: powershell
- run: |
- nuget install CMake-win64 -Version 3.15.5 -OutputDirectory C:\Tools\CMake
- nuget install Bison -Version 3.7.4 -OutputDirectory C:\Tools\bison
- nuget install PCRE2 -Version 10.39 -OutputDirectory C:\Tools\pcre2
-
- - name: Build
- shell: powershell
- run: |
- $env:PATH="C:\Tools\CMake\CMake-win64.3.15.5\bin;C:\Tools\bison\Bison.3.7.4\bin;" + $env:PATH
- $PCRE_ROOT="C:\Tools\pcre2\PCRE2.10.39.0"
- $PCRE_PLATFORM="x64"
- $WORKING_DIR=(Get-Location).ToString() -replace "\\","/"
- cmake -G "Visual Studio 16 2019" -A "x64" `
- -DCMAKE_INSTALL_PREFIX="$WORKING_DIR/install2" `
- -DCMAKE_C_FLAGS="/DPCRE2_STATIC" `
- -DCMAKE_CXX_FLAGS="/DPCRE2_STATIC" `
- -DPCRE2_INCLUDE_DIR="$PCRE_ROOT/include" `
- -DPCRE2_LIBRARY="$PCRE_ROOT/lib/pcre2-8-static.lib" `
- -S . -B build
- cmake --build build --config Release
-
- - name: Install
- shell: powershell
- run: |
- cmake --install build --config Release
-
- - name: Test
- shell: powershell
- working-directory: install2/bin
- run: |
- swig.exe -version
diff --git a/Tools/CI-linux-environment.sh b/Tools/CI-linux-environment.sh
index e854c5b0e..dba8c726c 100644
--- a/Tools/CI-linux-environment.sh
+++ b/Tools/CI-linux-environment.sh
@@ -25,7 +25,11 @@ case "$SWIGLANG" in
"ruby")
if ! command -v rvm; then
set +x
- source $HOME/.rvm/scripts/rvm
+ if [ -f /etc/profile.d/rvm.sh ] ; then
+ source /etc/profile.d/rvm.sh
+ else
+ source $HOME/.rvm/scripts/rvm
+ fi
set -x
fi
;;
diff --git a/Tools/CI-linux-install.sh b/Tools/CI-linux-install.sh
index 456f5bc42..c02f5dffd 100644
--- a/Tools/CI-linux-install.sh
+++ b/Tools/CI-linux-install.sh
@@ -117,32 +117,35 @@ case "$SWIGLANG" in
$RETRY sudo apt-get -qq install r-base
;;
"ruby")
- if ! command -v rvm; then
+ if [[ "$VER" ]]; then
case "$VER" in
- 1.9 | 2.0 | 2.1 | 2.2 | 2.3 )
- $RETRY sudo apt-get -qq install libgdbm-dev libncurses5-dev libyaml-dev libssl1.0-dev
+ 3.1 | 3.2 )
+ # Ruby 3.1+ support is currently only rvm master (2023-04-19)
+ # YOLO
+ curl -sSL https://rvm.io/mpapis.asc | gpg --import -
+ curl -sSL https://rvm.io/pkuczynski.asc | gpg --import -
+ curl -sSL https://get.rvm.io | bash -s stable
+ set +x
+ $RETRY rvm get master
+ rvm reload
+ rvm list known
+ source $HOME/.rvm/scripts/rvm
+ set -x
+ ;;
+ * )
+ # Install from PPA as that also contains packages needed for the build.
+ sudo apt-add-repository -y ppa:rael-gc/rvm
+ sudo apt-get update
+ sudo apt-get install rvm
+ sudo usermod -a -G rvm $USER
+ set +x
+ source /etc/profile.d/rvm.sh
+ set -x
;;
esac
- # YOLO
- curl -sSL https://rvm.io/mpapis.asc | gpg --import -
- curl -sSL https://rvm.io/pkuczynski.asc | gpg --import -
- curl -sSL https://get.rvm.io | bash -s stable
set +x
- source $HOME/.rvm/scripts/rvm
- set -x
- fi
- case "$VER" in
- 2.7 | 3.0 | 3.1 )
- # Ruby 2.7+ support is currently only rvm master (30 Dec 2019)
- set +x
- $RETRY rvm get master
- rvm reload
- rvm list known
- set -x
- ;;
- esac
- if [[ "$VER" ]]; then
$RETRY rvm install $VER
+ set -x
fi
;;
"scilab")