publish on snap

This commit is contained in:
Cory Schwartz 2021-06-03 20:45:54 -07:00
parent bf468762b6
commit 0fba816846
2 changed files with 79 additions and 21 deletions

View File

@ -530,6 +530,34 @@ jobs:
name: Publish release name: Publish release
command: ./scripts/publish-release.sh 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: build-and-push-image:
description: build and push docker images to public AWS ECR registry description: build and push docker images to public AWS ECR registry
executor: aws-cli/default executor: aws-cli/default
@ -766,13 +794,13 @@ workflows:
only: only:
- master - master
- build-debug - build-debug
- build-all: - build-all
requires: # requires:
- test-short # - test-short
filters: # filters:
tags: # tags:
only: # only:
- /^v\d+\.\d+\.\d+(-rc\d+)?$/ # - /^v\d+\.\d+\.\d+(-rc\d+)?$/
- build-ntwk-calibration: - build-ntwk-calibration:
requires: requires:
- test-short - test-short
@ -861,3 +889,25 @@ workflows:
tags: tags:
only: only:
- /^v\d+\.\d+\.\d+(-rc\d+)?$/ - /^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

View File

@ -1,28 +1,36 @@
name: lotus name: lotus-filecoin
base: core18 base: core20
version: '1.8.0' version: latest
summary: filecoin daemon/client summary: filecoin daemon/client
description: | description: |
Filecoin is a peer-to-peer network that stores files on the internet 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 with built-in economic incentives to ensure files are stored reliably over time
grade: devel grade: devel
confinement: devmode # use 'strict' once you have the right plugs and slots confinement: strict
parts: parts:
libs: lotus:
plugin: dump plugin: make
source: ./ source: ./
organize: build-snaps:
'lotus' : bin/ - go
'lotus-*' : bin/ - rustup
build-packages:
- git
- jq
- libhwloc-dev
- ocl-icd-opencl-dev
- pkg-config
stage-packages: stage-packages:
- libhwloc15
- ocl-icd-libopencl1 - ocl-icd-libopencl1
- libhwloc1 override-build: |
- libgcc1 LDFLAGS="" make lotus lotus-miner lotus-worker
cp lotus lotus-miner lotus-worker $SNAPCRAFT_PART_INSTALL
apps: apps:
lotus: lotus:
command: bin/lotus command: lotus
lotus-miner: lotus-miner:
command: bin/lotus-miner command: lotus-miner
lotus-worker: lotus-worker:
command: bin/lotus-worker command: lotus-worker