aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/interop-tests.yml
blob: 65e273f0e08c01163e3e2a540f75c313786b5431 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# Notes:
# /__w/openssl is the path that github bind-mounts into the container so the ci
# filesystem for this job can be reached.  Please note that any changes made to
# this job involving file system paths should be made prefixed with, or relative
# to that directory
name: Interoperability tests with GnuTLS, NSS and OpenSSH
on:
  schedule:
    - cron: '55 02 * * *'
  workflow_dispatch:

permissions: {}

jobs:
  test:
    if: github.repository == 'openssl/openssl'
    runs-on: ubuntu-22.04
    container:
      image: docker.io/fedora:43
      options: --sysctl net.ipv6.conf.lo.disable_ipv6=0
    timeout-minutes: 90
    strategy:
      fail-fast: false
      matrix:
        COMPONENT: [gnutls, nss]
    env:
      COMPONENT: ${{ matrix.COMPONENT }}
    steps:
      - uses: actions/checkout@v6
        with:
          persist-credentials: false
      - name: Display environment
        run: export
      - name : Install needed tools
        run: |
          dnf -y install perl gcc make \
                 rpmdevtools dnf-utils \
                 tmt-all beakerlib \
                 crypto-policies-scripts
      - name: install interop tests
        run: |
          cd ${GITHUB_WORKSPACE}
          git clone --branch=openssl-v0.2 --depth=1 https://gitlab.com/redhat-crypto/tests/interop.git
      - name: build openssl as an rpm
        run: |
          mkdir -p /build/SPECS && cd /build && echo -e "%_topdir /build\n%_lto_cflags %{nil}" >~/.rpmmacros && rpmdev-setuptree
          cd /build && cp ${GITHUB_WORKSPACE}/interop/openssl/openssl.spec SPECS/ && \
          cd SPECS/ && source ${GITHUB_WORKSPACE}/VERSION.dat && \
          sed -i "s/SOVERSION/$SHLIB_VERSION/" openssl.spec && \
          sed -i "s/^Version: .*\$/Version: $MAJOR.$MINOR.$PATCH/" openssl.spec
          yum-builddep -y /build/SPECS/openssl.spec # just for sure nothing is missing
          mkdir -p /build/SOURCES
          tar --transform "s/^__w\/openssl\/openssl/openssl-$MAJOR.$MINOR.$PATCH/" -czf /build/SOURCES/openssl-$MAJOR.$MINOR.$PATCH.tar.gz "$GITHUB_WORKSPACE"
          rpmbuild -bb /build/SPECS/openssl.spec
          rpm -i --force /build/RPMS/x86_64/openssl-*
          cp ${GITHUB_WORKSPACE}/interop/openssl/openssl.cnf /etc/pki/tls/openssl.cnf
      - name: Run interop tests
        run: |
          cd interop
          tmt run -av plans -n interop tests -f "tag: interop-openssl & tag: interop-$COMPONENT" provision -h local --feeling-safe execute -h tmt --interactive
          openssl version
          echo "Finished - important to prevent unwanted output truncating"
  openssh_interop:
    if: github.repository == 'openssl/openssl'
    name: "openssh interop ${{ matrix.branch.openssl }}"
    strategy:
      fail-fast: false
      matrix:
        branch: [
          { openssl: 'master', openssh: 'openssl-master', openssl_config: 'no-docs'},
          { openssl: 'openssl-4.0', openssh: 'openssl-4.0', openssl_config: 'no-docs'},
          { openssl: 'openssl-3.6', openssh: 'openssl-3.6', openssl_config: 'no-docs'},
          { openssl: 'openssl-3.5', openssh: 'openssl-3.5', openssl_config: 'no-docs'},
          { openssl: 'openssl-3.4', openssh: 'openssl-3.4', openssl_config: 'no-docs'},
          { openssl: 'openssl-3.0', openssh: 'openssl-3.0', openssl_config: ''}
        ]
    runs-on: ubuntu-latest
    env:
      EPHEMERAL_VM: yes
      TEST_SSH_UNSAFE_PERMISSIONS: 1
      TEST_SSH_HOSTBASED_AUTH: yes
    steps:
    - name: install dependencies
      run: |
        sudo apt-get update
        sudo apt-get -yq install autoconf zlib1g-dev
    - uses: actions/checkout@v6
      with:
        persist-credentials: false
        repository: openssh/openssh-portable
        fetch-depth: 1
    - name: setup ci
      run: sh ./.github/setup_ci.sh ${{ matrix.branch.openssh }} ubuntu-latest
    - name: autoreconf
      run: autoreconf
    - name: configure
      run: sh ./.github/configure.sh ${{ matrix.branch.openssh }}
    - name: make
      run: |
        make clean
        make -s -j4
    - name: run tests
      run: sh ./.github/run_test.sh