diff options
-rw-r--r-- | .github/workflows/test.yml | 120 | ||||
-rw-r--r-- | .travis.yml | 39 | ||||
-rw-r--r-- | appveyor.yml | 26 |
3 files changed, 120 insertions, 65 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..a4a41cbd --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,120 @@ +name: CI + +on: [push, pull_request] + +jobs: + test: + name: >- + ${{ matrix.os }} ${{ matrix.ruby }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ ubuntu-latest, macos-latest ] + ruby: [ head, 2.7, 2.6, 2.5, 2.4, 2.3 ] + steps: + - name: repo checkout + uses: actions/checkout@v2 + + - name: load ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + + - name: depends + run: rake install_dependencies + + - name: compile + run: rake compile -- --enable-debug + + - name: test + run: rake test TESTOPTS="-v --no-show-detail-immediately" OSSL_MDEBUG=1 + + test-windows: + name: >- + ${{ matrix.os }} ${{ matrix.ruby }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ windows-latest ] + ruby: [ mswin, mingw, 2.7, 2.6, 2.5, 2.4, 2.3 ] + steps: + - name: repo checkout + uses: actions/checkout@v2 + + - name: load ruby, install/update gcc, install openssl + uses: MSP-Greg/setup-ruby-pkgs@v1 + with: + ruby-version: ${{ matrix.ruby }} + mingw: _upgrade_ openssl + + - name: depends + run: rake install_dependencies + + # SSL_DIR is set as needed by MSP-Greg/setup-ruby-pkgs + # only used with mswin + - name: compile + run: rake compile -- --enable-debug $env:SSL_DIR + + - name: test + run: rake test TESTOPTS="-v --no-show-detail-immediately" OSSL_MDEBUG=1 + + test-openssls: + name: >- + ${{ matrix.openssl }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ ubuntu-latest ] + ruby: [ 2.7 ] + openssl: + - openssl-1.0.1u # EOL + - openssl-1.0.2u # EOL + - openssl-1.1.0l # EOL + - openssl-1.1.1g + - libressl-2.5.5 # EOL + - libressl-3.1.3 + - libressl-3.2.0 + steps: + - name: repo checkout + uses: actions/checkout@v2 + + - name: prepare openssl + run: | + mkdir -p tmp/build-openssl && cd tmp/build-openssl + case ${{ matrix.openssl }} in + openssl-*) + curl -OL https://ftp.openssl.org/source/${{ matrix.openssl }}.tar.gz + tar xf ${{ matrix.openssl }}.tar.gz && cd ${{ matrix.openssl }} + # shared is required for 1.0.x. + ./Configure --prefix=$HOME/.openssl/${{ matrix.openssl }} \ + shared linux-x86_64 + make depend + ;; + libressl-*) + curl -OL https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/${{ matrix.openssl }}.tar.gz + tar xf ${{ matrix.openssl }}.tar.gz && cd ${{ matrix.openssl }} + ./configure --prefix=$HOME/.openssl/${{ matrix.openssl }} + ;; + *) + false + ;; + esac + make -j4 + make install_sw + + - name: load ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + + - name: depends + run: rake install_dependencies + + - name: compile + run: rake compile -- --enable-debug --with-openssl-dir=$HOME/.openssl/${{ matrix.openssl }} + + - name: test + run: rake test TESTOPTS="-v --no-show-detail-immediately" OSSL_MDEBUG=1 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d00e2bdb..00000000 --- a/.travis.yml +++ /dev/null @@ -1,39 +0,0 @@ -language: c -sudo: required -group: edge -dist: trusty -services: - - docker -before_install: - - sudo apt-get -qq update -install: - - sudo sh -c "curl -L https://github.com/docker/compose/releases/download/1.8.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose" - - sudo chmod +x /usr/local/bin/docker-compose -script: - - docker -v - - docker-compose -v - - docker-compose build --no-cache - - docker-compose run test -matrix: - fast_finish: true - include: - - env: RUBY_VERSION=ruby-2.3 OPENSSL_VERSION=openssl-1.0.2 - - env: RUBY_VERSION=ruby-2.4 OPENSSL_VERSION=openssl-1.0.2 - - env: RUBY_VERSION=ruby-2.5 OPENSSL_VERSION=openssl-1.0.1 - - env: RUBY_VERSION=ruby-2.5 OPENSSL_VERSION=openssl-1.0.2 - - env: RUBY_VERSION=ruby-2.5 OPENSSL_VERSION=openssl-1.1.0 - - env: RUBY_VERSION=ruby-2.5 OPENSSL_VERSION=openssl-1.1.1 - - env: RUBY_VERSION=ruby-2.5 OPENSSL_VERSION=libressl-2.5 - - env: RUBY_VERSION=ruby-2.5 OPENSSL_VERSION=libressl-2.6 - - env: RUBY_VERSION=ruby-2.5 OPENSSL_VERSION=libressl-2.7 - - language: ruby - rvm: ruby-head - before_install: - - "rake install_dependencies" - script: - - "rake compile -- --enable-debug" - - "rake test" - allow_failures: - - language: ruby - rvm: ruby-head - - env: RUBY_VERSION=ruby-2.5 OPENSSL_VERSION=openssl-1.1.1 diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 18484fb9..00000000 --- a/appveyor.yml +++ /dev/null @@ -1,26 +0,0 @@ ---- -clone_depth: 10 -install: - - ps: | - $Env:PATH = "C:\Ruby${Env:ruby_version}\bin;${Env:PATH}" - if ($Env:ruby_version -match "^23" ) { - # RubyInstaller; download OpenSSL headers from OpenKnapsack Project - $Env:openssl_dir = "C:\Ruby${Env:ruby_version}" - appveyor DownloadFile http://dl.bintray.com/oneclick/OpenKnapsack/x64/openssl-1.0.2j-x64-windows.tar.lzma - 7z e openssl-1.0.2j-x64-windows.tar.lzma - 7z x -y -oC:\Ruby${Env:ruby_version} openssl-1.0.2j-x64-windows.tar - } else { - # RubyInstaller2; openssl package seems to be installed already - $Env:openssl_dir = "C:\msys64\mingw64" - } - - ruby -v - - rake install_dependencies -build_script: - - rake -rdevkit compile -- --with-openssl-dir=%openssl_dir% --enable-debug -test_script: - - rake test OSSL_MDEBUG=1 -deploy: off -environment: - matrix: - - ruby_version: "23-x64" # RI - - ruby_version: "24-x64" # RI2 |