aboutsummaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2020-08-12 18:25:16 +0900
committerKazuki Yamaguchi <k@rhe.jp>2020-08-12 18:34:04 +0900
commit9b46c6a603b07ba4f930b4afb58a7ae76c86eadd (patch)
treef80bee3f91fc0622811e14f5f6e2f094f8e24c38 /.github
parent0b5ae0f22b57f8232fbeb4751766abe99b222c6c (diff)
downloadruby-openssl-9b46c6a603b07ba4f930b4afb58a7ae76c86eadd.tar.gz
.github/workflows/test.yml: use GitHub Actions
.github/workflows/test.yml is copied from current master's (last update by commit 0a2e8c67f252), and then the LibreSSL versions to run test with are adjusted for Ruby/OpenSSL 2.1.
Diffstat (limited to '.github')
-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