Merge PR #3489: Build.snapcraft.io integration
* Migration from circleci.io to build.snapcraft.io * Add snapcraft build status badge * Remove build-snap-edge, keep snapcraft-local.yaml for local builds
This commit is contained in:
commit
1ae7cee4bf
|
@ -264,52 +264,6 @@ jobs:
|
|||
make localnet-start
|
||||
./scripts/localnet-blocks-test.sh 40 5 10 localhost
|
||||
|
||||
snap-edge:
|
||||
working_directory: /home/circleci/.snap_workspace/src/github.com/cosmos/cosmos-sdk
|
||||
machine: true
|
||||
environment:
|
||||
LC_ALL: C.UTF-8
|
||||
LANG: C.UTF-8
|
||||
GOPATH: /tmp/workspace
|
||||
GOBIN: /tmp/workspace/bin
|
||||
parallelism: 1
|
||||
steps:
|
||||
- checkout
|
||||
- attach_workspace:
|
||||
at: /tmp/workspace
|
||||
- run:
|
||||
name: Install prerequitistes
|
||||
command: |
|
||||
sudo sh -c "echo '#!/bin/sh' > /usr/sbin/update-initramfs"
|
||||
sudo sh -c "echo 'exit 0' >> /usr/sbin/update-initramfs"
|
||||
sudo apt update -y &>/dev/null
|
||||
sudo apt install -y build-essential snapd
|
||||
sudo snap install snapcraft --edge --classic
|
||||
- run:
|
||||
name: prepping snap build
|
||||
command: |
|
||||
/snap/bin/snapcraft version
|
||||
make snapcraft.yaml
|
||||
- run:
|
||||
name: build edge snap
|
||||
command: /snap/bin/snapcraft
|
||||
- run:
|
||||
name: Create credentials file
|
||||
command: |
|
||||
echo '[login.ubuntu.com]' > credentials
|
||||
echo "macaroon = $SNAPCRAFT_CREDENTIALS_MACAROON" >> credentials
|
||||
echo "unbound_discharge = $SNAPCRAFT_CREDENTIALS_UNBOUND_DISCHARGE" >> credentials
|
||||
echo "email = $SNAPCRAFT_CREDENTIALS_EMAIL" >> credentials
|
||||
- run:
|
||||
name: Authenticate snapcraft
|
||||
command: /snap/bin/snapcraft login --with credentials
|
||||
- run:
|
||||
name: Push/release snap
|
||||
command: /snap/bin/snapcraft push *.snap --release edge
|
||||
- run:
|
||||
name: Clean up credentials file
|
||||
command: rm -vf credentials
|
||||
|
||||
deploy_docs:
|
||||
<<: *docs_deploy
|
||||
steps:
|
||||
|
@ -430,14 +384,6 @@ workflows:
|
|||
- localnet:
|
||||
requires:
|
||||
- setup_dependencies
|
||||
- snap-edge:
|
||||
requires:
|
||||
- setup_dependencies
|
||||
filters:
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- develop
|
||||
- upload_coverage:
|
||||
requires:
|
||||
- test_cover
|
||||
|
|
11
Makefile
11
Makefile
|
@ -123,7 +123,7 @@ draw_deps: tools
|
|||
@goviz -i github.com/cosmos/cosmos-sdk/cmd/gaia/cmd/gaiad -d 2 | dot -Tpng -o dependency-graph.png
|
||||
|
||||
clean:
|
||||
rm -f devtools-stamp vendor-deps snapcraft.yaml
|
||||
rm -f devtools-stamp vendor-deps snapcraft-local.yaml
|
||||
|
||||
distclean: clean
|
||||
rm -rf vendor/
|
||||
|
@ -256,14 +256,9 @@ localnet-stop:
|
|||
########################################
|
||||
### Packaging
|
||||
|
||||
snapcraft.yaml: snapcraft.yaml.in
|
||||
snapcraft-local.yaml: snapcraft-local.yaml.in
|
||||
sed "s/@VERSION@/${VERSION}/g" < $< > $@
|
||||
|
||||
build-snap-edge: snapcraft.yaml
|
||||
snapcraft clean
|
||||
snapcraft
|
||||
|
||||
|
||||
# To avoid unintended conflicts with file names, always add to .PHONY
|
||||
# unless there is a reason not to.
|
||||
# https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html
|
||||
|
@ -274,4 +269,4 @@ build-linux build-docker-gaiadnode localnet-start localnet-stop \
|
|||
format check-ledger test_sim_gaia_nondeterminism test_sim_modules test_sim_gaia_fast \
|
||||
test_sim_gaia_custom_genesis_fast test_sim_gaia_custom_genesis_multi_seed \
|
||||
test_sim_gaia_multi_seed test_sim_gaia_import_export update_tools update_dev_tools \
|
||||
build-snap-edge devtools-clean
|
||||
devtools-clean
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
[![version](https://img.shields.io/github/tag/cosmos/cosmos-sdk.svg)](https://github.com/cosmos/cosmos-sdk/releases/latest)
|
||||
[![CircleCI](https://circleci.com/gh/cosmos/cosmos-sdk/tree/master.svg?style=shield)](https://circleci.com/gh/cosmos/cosmos-sdk/tree/master)
|
||||
[![Snap Status](https://build.snapcraft.io/badge/cosmos/cosmos-sdk.svg)](https://build.snapcraft.io/user/cosmos/cosmos-sdk)
|
||||
[![codecov](https://codecov.io/gh/cosmos/cosmos-sdk/branch/master/graph/badge.svg)](https://codecov.io/gh/cosmos/cosmos-sdk)
|
||||
[![Go Report Card](https://goreportcard.com/badge/github.com/cosmos/cosmos-sdk)](https://goreportcard.com/report/github.com/cosmos/cosmos-sdk)
|
||||
[![license](https://img.shields.io/github/license/cosmos/cosmos-sdk.svg)](https://github.com/cosmos/cosmos-sdk/blob/master/LICENSE)
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
name: gaia # you probably want to 'snapcraft register <name>'
|
||||
# base: core18 # the base snap is the execution environment for this snap
|
||||
version: '@VERSION@' # just for humans, typically '1.2+git' or '1.3.2'
|
||||
name: gaia
|
||||
version: git
|
||||
summary: Gaia Daemon # 79 char long summary
|
||||
description: |
|
||||
This snap provides the Gaia daemon gaiad and the command line
|
||||
tool gaiacli.
|
||||
grade: devel # must be 'stable' to release into candidate/stable channels
|
||||
confinement: strict # use 'strict' once you have the right plugs and slots
|
||||
confinement: strict
|
||||
|
||||
apps:
|
||||
gaiad:
|
||||
|
@ -24,17 +23,12 @@ parts:
|
|||
rootdir=$(pwd)
|
||||
gitroot=$(git rev-parse --show-toplevel)
|
||||
cd ${gitroot} && git archive \
|
||||
-o ${rootdir}/gaia-@VERSION@.tar.gz \
|
||||
--format tar.gz -9 --prefix gaia-@VERSION@/ HEAD
|
||||
-o ${rootdir}/gaia-git.tar.gz \
|
||||
--format tar.gz -9 --prefix gaia-git/ HEAD
|
||||
cd ${rootdir}
|
||||
tar xf gaia-@VERSION@.tar.gz ; rm -f gaia-@VERSION@.tar.gz
|
||||
tar xf gaia-git.tar.gz ; rm -f gaia-git.tar.gz
|
||||
mkdir -p go/src/github.com/cosmos bin
|
||||
mv gaia-@VERSION@/ go/src/github.com/cosmos/cosmos-sdk/
|
||||
|
||||
# Use the following instructions to build a package from a release.
|
||||
# wget https://github.com/cosmos/cosmos-sdk/archive/v@VERSION@.tar.gz
|
||||
# tar xvf v@VERSION@.tar.gz
|
||||
# rm v@VERSION@.tar.gz
|
||||
mv gaia-git/ go/src/github.com/cosmos/cosmos-sdk/
|
||||
|
||||
build-snaps: [go]
|
||||
override-build: |
|
Loading…
Reference in New Issue