Skip to content

test-kikit

test-kikit #2107

Workflow file for this run

name: test-kikit
on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: '0 3 * * *'
jobs:
test:
name: "Run KiKit tests"
runs-on: ubuntu-22.04
strategy:
matrix:
kicad-version: [v7, v7-testing, v8, v8-testing]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-kicad
with:
kicad-version: ${{ matrix.kicad-version }}
- name: KiCAD version
run: python3 -c 'import pcbnew; print(pcbnew.GetBuildVersion())'
- name: Install dependencies and KiKit
run: |
sudo apt-get -qq install --yes --no-install-recommends \
zip inkscape make git libmagickwand-dev \
libgraphicsmagick1-dev libmagickcore-dev \
openscad bats
sudo python -m pip install PcbDraw
sudo env PYTHONPATH=$PYTHONPATH LD_LIBRARY_PATH=$LD_LIBRARY_PATH \
python -m pip install -e .\[dev\]
- run: make test
- run: sudo env PYTHONPATH=$PYTHONPATH LD_LIBRARY_PATH=$LD_LIBRARY_PATH make package
build-pcm:
name: Build PCM packages
runs-on: ubuntu-20.04
needs: test
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-kicad
with:
kicad-version: v6
- name: Build PCM package
run: make pcm
- name: Upload kikit-pcm package artifact
uses: actions/upload-artifact@v3
with:
name: kikit-pcm
path: build/pcm-kikit
retention-days: 7
- name: Upload kikit-lib-pcm package artifact
uses: actions/upload-artifact@v3
with:
name: kikit-lib-pcm
path: build/pcm-kikit-lib
retention-days: 7
deploy-docker:
name: "Deploy nightly Docker"
runs-on: ubuntu-22.04
needs: test
if: github.ref == 'refs/heads/master' && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
strategy:
matrix:
build-config:
- name: x64
suffix: ""
platform: linux/amd64
repo: ubuntu
kicad_version: "7.0"
additional_packages: ""
additional_python_packages: ""
- name: "m1"
suffix: -m1
platform: linux/arm64/v8
repo: arm64v8/ubuntu
kicad_version: "7.0"
additional_packages: gcc-aarch64-linux-gnu libgeos-dev
additional_python_packages: python3-dev
- name: "x64 v8"
suffix: "-v8"
platform: linux/amd64
repo: ubuntu
kicad_version: "8.0"
additional_packages: ""
additional_python_packages: ""
- name: "m1 v8"
suffix: -m1-v8
platform: linux/arm64/v8
repo: arm64v8/ubuntu
kicad_version: "8.0"
additional_packages: gcc-aarch64-linux-gnu libgeos-dev
additional_python_packages: python3-dev
steps:
- uses: actions/checkout@v4 # Required for kikit version estimation
with:
fetch-depth: 0 # = fetch all
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: . # We need path context, so .git gets included
push: true
tags: yaqwsx/kikit:nightly${{ matrix.build-config.suffix }}
platforms: ${{ matrix.build-config.platform }}
build-args: |
REPO=${{ matrix.build-config.repo }}
ADDITIONAL_PACKAGES=${{ matrix.build-config.additional_packages }}
ADDITIONAL_PYTHON_PACKAGES=${{ matrix.build-config.additional_python_packages }}
KICAD_VERSION=${{ matrix.build-config.kicad_version }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}