Skip to content

Update hardware-ci.yml #140

Update hardware-ci.yml

Update hardware-ci.yml #140

Workflow file for this run

name: pslab-hardware
on:
push:
branches: [ docker ]
jobs:
build:
runs-on: ubuntu-latest
container:
image: kicad/kicad
steps:
- name: Download project files
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install kibot
run: |
wget https://set-soft.github.io/debian/kibot.list
sudo cp kibot.list /etc/apt/sources.list.d/
wget https://set-soft.github.io/debian/kibot.gpg
sudo cp kibot.gpg /etc/apt/
sudo apt-get update
sudo apt install kibot kidiff
- name: Install dependencies
run: |
pip install pcb-tools image
sudo apt install xvfb recordmydesktop xdotool libmagickwand-dev librsvg2-bin imagemagick poppler-utils
- name: Change Imagemagic Policy
run: sudo sed -i 's/<policy domain="coder" rights="none" pattern="PDF"/<policy domain="coder" rights="read|write" pattern="PDF"/g' /etc/ImageMagick-6/policy.xml
- name: Update kibot configuration
run: |
commit_id=$(git ls-remote https://github.com/fossasia/pslab-hardware.git refs/heads/pslab-v6 | cut -f 1)
commit_id_escaped=$(sed 's/[&/\]/\\&/g' <<< "$commit_id")
sed -i "s/old: 'HEAD'/old: '$commit_id_escaped'/g" schematics/CI.kibot.yaml
- name: Run build
run: |
cd schematics
sudo kibot -v