File: weekly.yaml

package info (click to toggle)
python-scrapli 2023.7.30-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,536 kB
  • sloc: python: 14,459; makefile: 72
file content (67 lines) | stat: -rw-r--r-- 2,679 bytes parent folder | download | duplicates (3)
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
name: Weekly Build

on:
  schedule:
    # weekly at 0300 PST/1000 UTC on Sunday
    - cron: '0 10 * * 0'
  workflow_dispatch:

jobs:
  darglint:
    runs-on: ${{ matrix.os }}
    strategy:
      max-parallel: 1
      matrix:
        os: [ubuntu-latest]
        version: ["3.11"]
    steps:
      - uses: actions/checkout@v3
        with:
          ref: main
      - name: set up python ${{ matrix.version }}
        uses: actions/setup-python@v4
        with:
          python-version: ${{ matrix.version }}
      - name: setup test env
        run: |
          python -m pip install --upgrade pip
          python -m pip install --upgrade setuptools wheel
          python -m pip install nox
      - name: run nox darglint
        run: python -m nox -s darglint

  build_posix:
    runs-on: ${{ matrix.os }}
    strategy:
      max-parallel: 10
      matrix:
        os: [ubuntu-latest, macos-latest]
        version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
    steps:
      - uses: actions/checkout@v3
      - name: set up python ${{ matrix.version }}
        uses: actions/setup-python@v4
        with:
          python-version: ${{ matrix.version }}
      - name: get friendly (for nox) python version
        # not super friendly looking, but easy way to get major.minor version so we can easily exec only the specific
        # version we are targeting with nox, while still having versions like 3.9.0a4
        run: |
          echo "FRIENDLY_PYTHON_VERSION=$(python -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')")" >> $GITHUB_ENV
      - name: ensure openssl installed for macos
        # openssl missing/being linked incorrectly causes ssh2-python install failures
        if: matrix.os == 'macos-latest'
        run: |
          brew install openssl libssh2
      - name: setup test env
        run: |
          python -m pip install --upgrade pip
          python -m pip install --upgrade setuptools wheel
          python -m pip install nox
      - name: run nox
        # TERM is needed needed to make the terminal a tty (i think? without this system ssh is super broken)
        # libssh2/ssh2-python were getting libssh2 linked incorrectly/weirdly and libraries were trying to be loaded
        # from the temp dir that pip used for installs. setting the DYLD_LIBRARY_PATH envvar seems to solve this even
        # if it feels horribly hacky. afaik, this is ignored on linux, so it will only matter on the macos builds
        # https://stackoverflow.com/questions/71356491/python3-on-mac-having-trouble-loading-libssh2
        run: TERM=xterm DYLD_LIBRARY_PATH=/usr/local/lib python -m nox -p $FRIENDLY_PYTHON_VERSION -k "not darglint"