Skip to content

Commit

Permalink
Snap build via CircleCI.
Browse files Browse the repository at this point in the history
  • Loading branch information
t-paul committed Jun 9, 2018
1 parent 4455a12 commit 5929496
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 0 deletions.
64 changes: 64 additions & 0 deletions .circleci/config.yml
@@ -0,0 +1,64 @@
defaults: &defaults
working_directory: ~/workspace
docker:
- image: snapcore/snapcraft:edge

version: 2
jobs:
build:
<<: *defaults
steps:
- checkout

- run:
name: Update index
command: apt update

- run:
name: Build snap
command: snapcraft

- persist_to_workspace:
root: ~/workspace
paths: ['*.snap']

release:
<<: *defaults
steps:
- checkout

- attach_workspace:
at: ~/workspace

- run:
name: Install prerequisites
command: |
sudo apt update
apt install -y openssl
- run:
name: Decrypt credentials
command: |
openssl aes-256-cbc -d \
-in .circleci/credentials.enc \
-out credentials \
-k $SNAPCRAFT_CREDENTIALS_KEY
- run:
name: Authenticate snapcraft
command: snapcraft login --with credentials

- run:
name: Push/release snap
command: snapcraft push *.snap --release edge

workflows:
version: 2
commit:
jobs:
- build
- release:
requires: [build]
filters:
branches:
only: master
Binary file added .circleci/credentials.enc
Binary file not shown.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,3 +1,4 @@
.uuid
/*.scad
**/out*.*
*.dmg
Expand Down
32 changes: 32 additions & 0 deletions snap/snapcraft.yaml
@@ -0,0 +1,32 @@
name: openscad-nightly
version: 'git'
summary: Script file based graphical CAD environment
description: |
OpenSCAD is a software for creating solid 3D CAD objects. It focuses on CAD
aspects rather than artistic ones.
.
OpenSCAD is not an interactive modeller. Instead it is something like a
3D-compiler that reads in a script file that describes the object and renders
the 3D model from this script. This gives the designer full control over the
modelling process and enables him to easily change any step in the modelling
process or make designes that are defined by configurable parameters.
.
NOTE: This is the development snapshot, automatically built from the source
repository.
grade: devel
confinement: devmode

parts:
openscad-nightly:
plugin: qmake
qt-version: qt5
project-files: [ "openscad.pro" ]
options: [ "PREFIX=/usr", "CONFIG+=experimental", "CONFIG-=debug", "SUFFIX=-nightly" ]
override-build: |
qmake PREFIX=/usr CONFIG+=experimental CONFIG-=debug SUFFIX=-nightly
sed -i 's/QINSTALL_PROGRAM\s*=.*/QINSTALL_PROGRAM = $(INSTALL_PROGRAM)/g' "$SNAPCRAFT_PART_INSTALL/../build/Makefile"
sed -i 's/QINSTALL\s*=.*/QINSTALL = $(INSTALL_DIR)/g' "$SNAPCRAFT_PART_INSTALL/../build/Makefile"
export TMPDIR="$SNAPCRAFT_PART_INSTALL"
make install INSTALL_ROOT="$SNAPCRAFT_PART_INSTALL"

0 comments on commit 5929496

Please sign in to comment.