From cea53cfe768b952b67d71bc57e138affde679e2c Mon Sep 17 00:00:00 2001 From: "Travis F. Collins" Date: Tue, 1 Aug 2023 08:39:28 -0600 Subject: [PATCH 1/2] Switch CI to use docker images Signed-off-by: Travis F. Collins --- .github/workflows/test.yml | 67 ++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 36 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3ebf461b0..ae0893daf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,47 +5,41 @@ on: [push, pull_request] jobs: Test: runs-on: ubuntu-latest + strategy: + fail-fast: false matrix: - python-version: [3.7, 3.8, 3.9, "3.10"] + python-version: ["3_7", "3_8", "3_9", "3_10", "3_11"] + + container: + image: ghcr.io/sdgtt/dockerfiles/pyadi-iio-python-${{ matrix.python-version }}-ci + options: --user root + credentials: + username: ${{ github.actor }} + password: ${{ secrets.GH_IMAGE_REPO_TOKEN }} steps: - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - - name: Install dependencies - run: | - bash ./.github/scripts/install_libiio.sh - bash ./.github/scripts/install_pydeps.sh - bash ./.github/scripts/install_part_libs.sh - - name: Test run: pytest -v --cov=adi Test-Emulated-HW: runs-on: ubuntu-latest + strategy: fail-fast: false matrix: - python-version: [3.7, 3.8, 3.9, "3.10"] + python-version: ["3_7", "3_8", "3_9", "3_10", "3_11"] + + container: + image: ghcr.io/sdgtt/dockerfiles/pyadi-iio-python-${{ matrix.python-version }}-ci + options: --user root + credentials: + username: ${{ github.actor }} + password: ${{ secrets.GH_IMAGE_REPO_TOKEN }} steps: - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - - name: Install dependencies - run: | - bash ./.github/scripts/install_libiio.sh - bash ./.github/scripts/install_part_libs.sh - bash ./.github/scripts/install_iioemu.sh - bash ./.github/scripts/install_pydeps.sh - sudo apt install -y python3-tk - name: Test run: | @@ -71,28 +65,29 @@ jobs: Lint: runs-on: ubuntu-latest + strategy: fail-fast: false matrix: - python-version: [3.7, 3.8, 3.9, "3.10"] + python-version: ["3_7", "3_8", "3_9", "3_10", "3_11"] + + container: + image: ghcr.io/sdgtt/dockerfiles/pyadi-iio-python-${{ matrix.python-version }}-ci + options: --user root + credentials: + username: ${{ github.actor }} + password: ${{ secrets.GH_IMAGE_REPO_TOKEN }} steps: - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - - name: Install dependencies - run: | - bash ./.github/scripts/install_libiio.sh - bash ./.github/scripts/install_part_libs.sh - bash ./.github/scripts/install_pydeps.sh - name: Lint run: | + git --version + ls -lh pre-commit run --all-files 2> /dev/null ec=$? + cat /github/home/.cache/pre-commit/pre-commit.log git diff -U0 > log.txt && cat log.txt exit $ec From 1516085fb67602b2db857401086fc668017634f4 Mon Sep 17 00:00:00 2001 From: "Travis F. Collins" Date: Tue, 1 Aug 2023 13:44:45 -0600 Subject: [PATCH 2/2] Switch CI to use docker images Signed-off-by: Travis F. Collins --- .github/workflows/test.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ae0893daf..2d49bc0b5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,7 +5,7 @@ on: [push, pull_request] jobs: Test: runs-on: ubuntu-latest - + strategy: fail-fast: false matrix: @@ -83,11 +83,9 @@ jobs: - name: Lint run: | - git --version - ls -lh + git config --global --add safe.directory `pwd` pre-commit run --all-files 2> /dev/null ec=$? - cat /github/home/.cache/pre-commit/pre-commit.log git diff -U0 > log.txt && cat log.txt exit $ec