Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for kicost #22

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
# Portions Copyright 2019 Productize SPRL
#
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#
#
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
#
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
#
#
# This docker configuration was originally based on https://github.com/productize/docker-kicad as of 301bf181b72c811e9644b83a895ec4a16f2fa1a0


FROM ubuntu:disco
FROM ubuntu:bionic
MAINTAINER Jesse Vincent <[email protected]>
LABEL Description="Minimal KiCad image based on Ubuntu"


ADD upstream/kicad-automation-scripts/kicad-ppa.pgp .

RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections && \
apt-get -y update && \
apt-get -y install gnupg2 && \
echo 'deb http://ppa.launchpad.net/js-reynaud/kicad-5.1/ubuntu disco main' >> /etc/apt/sources.list && \
echo 'deb http://ppa.launchpad.net/js-reynaud/kicad-5.1/ubuntu bionic main' >> /etc/apt/sources.list && \
apt-key add kicad-ppa.pgp && \
apt-get -y update && apt-get -y install --no-install-recommends kicad kicad-footprints kicad-symbols kicad-packages3d && \
apt-get -y purge gnupg2 && \
Expand Down Expand Up @@ -63,7 +64,7 @@ RUN apt-get -y update && \

COPY upstream/kiplot /opt/kiplot

RUN cd /opt/kiplot && pip3 install -e .
RUN cd /opt/kiplot && pip3 install -e .

COPY etc/kiplot /opt/etc/kiplot

Expand Down
13 changes: 8 additions & 5 deletions etc/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ OUTPUT_PATH := $(PROJECT_ABS_PATH)/$(OUTPUT_BASEDIR)


export DOCKER_VOLUMES := --volume $(DOCKER_VISIBLE_PATH):/kicad-project: \
--volume $(OUTPUT_PATH):/output:
--volume $(OUTPUT_PATH):/output:

# Infrastructure config

Expand All @@ -30,20 +30,20 @@ DOCKER_RUN := $(TOOLS_HOME)/bin/kicad-docker-run



all:
all:
@echo "This project does not have an 'all' target. You probably want 'fabrication-outputs'"

debug:
@echo "BOARD=$(BOARD)"
@echo "BOARD_SNAPSHOT_LABEL=$(BOARD_SNAPSHOT_LABEL)"
@echo "MAKEFILE_PATH=$(MAKEFILE_PATH)"

@echo "DOCKER_VISIBLE_PATH=$(DOCKER_VISIBLE_PATH)"
@echo "PROJECT_PATH=$(PROJECT_PATH)"
@echo "PROJECT_ABS_PATH=$(PROJECT_ABS_PATH)"
@echo "OUTPUT_PATH=$(OUTPUT_PATH)"

fabrication-outputs: dirs bom interactive-bom schematic gerbers archive
fabrication-outputs: dirs bom interactive-bom schematic gerbers kicost archive
@echo "Done. You can find your outputs in "
@echo $(OUTPUT_PATH)

Expand Down Expand Up @@ -72,8 +72,11 @@ interactive-bom: dirs
bom: dirs
$(DOCKER_RUN) python -m kicad-automation.eeschema.export_bom --schematic /kicad-project/$(SCHEMATIC_RELATIVE_PATH) --output_dir /output/bom/ export

kicost: bom
$(DOCKER_RUN) kicost --input /kicad-project/$(PROJECT_PATH)/$(BOARD).xml --output=/output/kicost.xlsx --overwrite

schematic-pdf: dirs
$(DOCKER_RUN) python -m kicad-automation.eeschema.schematic --schematic /kicad-project/$(SCHEMATIC_RELATIVE_PATH) --output_dir /output/schematic/pdf export --all_pages -f pdf
$(DOCKER_RUN) python -m kicad-automation.eeschema.schematic --schematic /kicad-project/$(SCHEMATIC_RELATIVE_PATH) --output_dir /output/schematic/pdf export --all_pages -f pdf
schematic-svg: dirs
$(DOCKER_RUN) python -m kicad-automation.eeschema.schematic --schematic /kicad-project/$(SCHEMATIC_RELATIVE_PATH) --output_dir /output/schematic/svg export --all_pages -f svg

Expand Down