forked from fossasia/pslab-hardware
-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (37 loc) · 1.45 KB
/
hardware-ci.yml
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
name: pslab-hardware
on:
push:
branches: [ docker ]
jobs:
build:
runs-on: ubuntu-latest
container:
image: ghcr.io/inti-cmnb/kicad7_auto:dev_1.6.4-a8c0a20_k7.0.8_d12.1
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