Skip to content

Commit

Permalink
publish on snap
Browse files Browse the repository at this point in the history
  • Loading branch information
Cory Schwartz committed Jun 4, 2021
1 parent bf46876 commit 0fba816
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 21 deletions.
64 changes: 57 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,34 @@ jobs:
name: Publish release
command: ./scripts/publish-release.sh

publish-snapcraft:
description: build and push snapcraft
machine:
image: ubuntu-2004:202104-01
resource_class: 2xlarge
parameters:
channel:
type: string
default: "edge"
description: snapcraft channel
steps:
- checkout
- run:
name: install snapcraft
command: sudo snap install snapcraft --classic
- run:
name: create snapcraft config file
command: |
mkdir -p ~/.config/snapcraft
echo "$SNAPCRAFT_LOGIN_FILE" | base64 -d > ~/.config/snapcraft/snapcraft.cfg
- run:
name: build snap
command: snapcraft --use-lxd
- run:
name: publish snap
command: snapcraft push *.snap --release << parameters.channel >>


build-and-push-image:
description: build and push docker images to public AWS ECR registry
executor: aws-cli/default
Expand Down Expand Up @@ -766,13 +794,13 @@ workflows:
only:
- master
- build-debug
- build-all:
requires:
- test-short
filters:
tags:
only:
- /^v\d+\.\d+\.\d+(-rc\d+)?$/
- build-all
# requires:
# - test-short
# filters:
# tags:
# only:
# - /^v\d+\.\d+\.\d+(-rc\d+)?$/
- build-ntwk-calibration:
requires:
- test-short
Expand Down Expand Up @@ -861,3 +889,25 @@ workflows:
tags:
only:
- /^v\d+\.\d+\.\d+(-rc\d+)?$/
- publish-snapcraft:
name: publish-snapcraft-stable
channel: stable
filters:
branches:
ignore:
- /.*/
tags:
only:
- /^v\d+\.\d+\.\d+(-rc\d+)?$/
nightly:
triggers:
- schedule:
cron: "0 0 * * *"
filters:
branches:
only:
- master
jobs:
- publish-snapcraft:
name: publish-snapcraft-nightly
channel: edge
36 changes: 22 additions & 14 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,36 @@
name: lotus
base: core18
version: '1.8.0'
name: lotus-filecoin
base: core20
version: latest
summary: filecoin daemon/client
description: |
Filecoin is a peer-to-peer network that stores files on the internet
with built-in economic incentives to ensure files are stored reliably over time
grade: devel
confinement: devmode # use 'strict' once you have the right plugs and slots
confinement: strict

parts:
libs:
plugin: dump
lotus:
plugin: make
source: ./
organize:
'lotus' : bin/
'lotus-*' : bin/
build-snaps:
- go
- rustup
build-packages:
- git
- jq
- libhwloc-dev
- ocl-icd-opencl-dev
- pkg-config
stage-packages:
- libhwloc15
- ocl-icd-libopencl1
- libhwloc1
- libgcc1
override-build: |
LDFLAGS="" make lotus lotus-miner lotus-worker
cp lotus lotus-miner lotus-worker $SNAPCRAFT_PART_INSTALL
apps:
lotus:
command: bin/lotus
command: lotus
lotus-miner:
command: bin/lotus-miner
command: lotus-miner
lotus-worker:
command: bin/lotus-worker
command: lotus-worker

0 comments on commit 0fba816

Please sign in to comment.