From e0c897b7c1cc1c6d77a669bfac51d7a5a50e616f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Mr=C3=A1zek?= Date: Sat, 24 Feb 2024 10:01:43 +0100 Subject: [PATCH] Update CI to use KiCAD 8 --- .github/actions/setup-kicad/action.yml | 4 ++-- .github/actions/setup-kicad/setup.sh | 28 +++++++++++++++++++++++++- .github/workflows/test-kikit.yml | 2 +- 3 files changed, 30 insertions(+), 4 deletions(-) diff --git a/.github/actions/setup-kicad/action.yml b/.github/actions/setup-kicad/action.yml index 5be100d8..b17843ce 100644 --- a/.github/actions/setup-kicad/action.yml +++ b/.github/actions/setup-kicad/action.yml @@ -4,9 +4,9 @@ author: 'Jan "yaqwsx" Mrázek' inputs: kicad-version: description: "Version of KiCAD, currently supported v5, v6, and nightly" - default: 'v6' + default: 'v8' runs: using: 'composite' steps: - run: '.github/actions/setup-kicad/setup.sh ${{ inputs.kicad-version }}' - shell: bash \ No newline at end of file + shell: bash diff --git a/.github/actions/setup-kicad/setup.sh b/.github/actions/setup-kicad/setup.sh index efaca347..c6054945 100755 --- a/.github/actions/setup-kicad/setup.sh +++ b/.github/actions/setup-kicad/setup.sh @@ -37,6 +37,32 @@ case $1 in echo "PYTHONPATH=/usr/lib/kicad/lib/python3/dist-packages:${PYTHONPATH}" >> $GITHUB_ENV echo "LD_LIBRARY_PATH=/usr/lib/kicad/lib/x86_64-linux-gnu/:${LD_LIBRARY_PATH}" >> $GITHUB_ENV ;; + 'v8') + sudo add-apt-repository --yes ppa:kicad/kicad-8.0-releases + sudo apt-get update + sudo apt-get install --yes --no-install-recommends kicad + # The Pcbnew module is located in + # - /usr/lib/kicad/lib/python3/dist-packages + # - instead of /usr/lib/python3/dist-packages/pcbnew.py + # Let's add it to PYTHONPATH and also set LD_LIBRARY_PATH + echo "PYTHONPATH=/usr/lib/kicad/lib/python3/dist-packages:${PYTHONPATH}" >> $GITHUB_ENV + echo "LD_LIBRARY_PATH=/usr/lib/kicad/lib/x86_64-linux-gnu/:${LD_LIBRARY_PATH}" >> $GITHUB_ENV + echo "PYTHONPATH=/usr/lib/kicad/lib/python3/dist-packages/:/usr/lib/kicad/local/lib/python3.10/dist-packages:/usr/lib/kicad/local/lib/python3.11/dist-packages:/usr/lib/kicad/local/lib/python3.12/dist-packages" >> $GITHUB_ENV + echo "LD_LIBRARY_PATH=/usr/lib/kicad/lib/x86_64-linux-gnu:/usr/lib/kicad/lib/" >> $GITHUB_ENV + ;; + 'v8-testing') + sudo add-apt-repository --yes ppa:kicad/kicad-8.0-nightly + sudo apt-get update + sudo apt-get install --yes --no-install-recommends kicad + # The Pcbnew module is located in + # - /usr/lib/kicad/lib/python3/dist-packages + # - instead of /usr/lib/python3/dist-packages/pcbnew.py + # Let's add it to PYTHONPATH and also set LD_LIBRARY_PATH + echo "PYTHONPATH=/usr/lib/kicad/lib/python3/dist-packages:${PYTHONPATH}" >> $GITHUB_ENV + echo "LD_LIBRARY_PATH=/usr/lib/kicad/lib/x86_64-linux-gnu/:${LD_LIBRARY_PATH}" >> $GITHUB_ENV + echo "PYTHONPATH=/usr/lib/kicad/lib/python3/dist-packages/:/usr/lib/kicad/local/lib/python3.10/dist-packages:/usr/lib/kicad/local/lib/python3.11/dist-packages:/usr/lib/kicad/local/lib/python3.12/dist-packages" >> $GITHUB_ENV + echo "LD_LIBRARY_PATH=/usr/lib/kicad/lib/x86_64-linux-gnu:/usr/lib/kicad/lib/" >> $GITHUB_ENV + ;; 'nightly') sudo add-apt-repository --yes ppa:kicad/kicad-dev-nightly sudo apt-get update @@ -49,7 +75,7 @@ case $1 in ;; *) - echo "Invalid version '$1' passed. Only 'v5', 'v6' and 'nightly' supported" >&2 + echo "Invalid version '$1' passed. Only 'v5', 'v6', 'v7', 'v7-testing', 'v8', 'v8-testing' and 'nightly' supported" >&2 exit 1 ;; esac diff --git a/.github/workflows/test-kikit.yml b/.github/workflows/test-kikit.yml index 74fe518e..5af2d283 100644 --- a/.github/workflows/test-kikit.yml +++ b/.github/workflows/test-kikit.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - kicad-version: [v6, v7, v7-testing, nightly] + kicad-version: [v7, v7-testing, v8-testing, nightly] steps: - uses: actions/checkout@v4 - uses: ./.github/actions/setup-kicad