aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/test.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/test.yml')
-rw-r--r--.github/workflows/test.yml120
1 files changed, 120 insertions, 0 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