Changeset 22a737b in mod_gnutls for .github/workflows/build.yml


Ignore:
Timestamp:
Jun 25, 2020, 4:01:21 AM (7 weeks ago)
Author:
Fiona Klute <fiona.klute@…>
Branches:
master
Children:
2b3a2814
Parents:
ed493e6
Message:

Detect usable loopback IPs during ./configure

File:
1 edited

Legend:

Unmodified
Added
Removed
  • .github/workflows/build.yml

    red493e6 r22a737b  
    3737          cat /etc/hosts
    3838      - name: find usable IPs for tests
    39         shell: python3 {0}
    4039        run: |
    41           import socket
    42           def try_connect(sockaddr):
    43               af, socktype, proto, canonname, sa = sockaddr
    44               try:
    45                   s = socket.socket(af, socktype, proto)
    46                   s.connect(sa)
    47               except:
    48                   return False
    49               finally:
    50                   s.close()
    51               return True
    52 
    53           test_ips = []
    54           for name in ['localhost', socket.gethostname()]:
    55               addrs = list(map(lambda t: t[-1][0], filter(try_connect, socket.getaddrinfo(name, 123, proto=socket.IPPROTO_UDP))))
    56               print(f'{name}: {addrs}')
    57               test_ips += addrs
    58           # IPv6 addresses must be enclosed in square brackets
    59           test_ips = [f'[{i}]' if ':' in i else i for i in test_ips]
    60           print(f'::set-env name=test_ips::{" ".join(test_ips)}')
     40          echo "::set-env name=test_ips::$(python3 test/check_test_ips.py localhost $(hostname))"
    6141      - name: set prefix for container-specific artifacts
    6242        # this is because upload-artifact doesn't like ":" in file names
Note: See TracChangeset for help on using the changeset viewer.