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:
@@ -264,52 +264,6 @@ jobs:
|
|||||||
make localnet-start
|
make localnet-start
|
||||||
./scripts/localnet-blocks-test.sh 40 5 10 localhost
|
./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:
|
deploy_docs:
|
||||||
<<: *docs_deploy
|
<<: *docs_deploy
|
||||||
steps:
|
steps:
|
||||||
@@ -430,14 +384,6 @@ workflows:
|
|||||||
- localnet:
|
- localnet:
|
||||||
requires:
|
requires:
|
||||||
- setup_dependencies
|
- setup_dependencies
|
||||||
- snap-edge:
|
|
||||||
requires:
|
|
||||||
- setup_dependencies
|
|
||||||
filters:
|
|
||||||
branches:
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
- develop
|
|
||||||
- upload_coverage:
|
- upload_coverage:
|
||||||
requires:
|
requires:
|
||||||
- test_cover
|
- test_cover
|
||||||
|
|||||||
@@ -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
|
@goviz -i github.com/cosmos/cosmos-sdk/cmd/gaia/cmd/gaiad -d 2 | dot -Tpng -o dependency-graph.png
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f devtools-stamp vendor-deps snapcraft.yaml
|
rm -f devtools-stamp vendor-deps snapcraft-local.yaml
|
||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
rm -rf vendor/
|
rm -rf vendor/
|
||||||
@@ -256,14 +256,9 @@ localnet-stop:
|
|||||||
########################################
|
########################################
|
||||||
### Packaging
|
### Packaging
|
||||||
|
|
||||||
snapcraft.yaml: snapcraft.yaml.in
|
snapcraft-local.yaml: snapcraft-local.yaml.in
|
||||||
sed "s/@VERSION@/${VERSION}/g" < $< > $@
|
sed "s/@VERSION@/${VERSION}/g" < $< > $@
|
||||||
|
|
||||||
build-snap-edge: snapcraft.yaml
|
|
||||||
snapcraft clean
|
|
||||||
snapcraft
|
|
||||||
|
|
||||||
|
|
||||||
# To avoid unintended conflicts with file names, always add to .PHONY
|
# To avoid unintended conflicts with file names, always add to .PHONY
|
||||||
# unless there is a reason not to.
|
# unless there is a reason not to.
|
||||||
# https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html
|
# 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 \
|
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_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 \
|
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 @@
|
|||||||
|
|
||||||
[](https://github.com/cosmos/cosmos-sdk/releases/latest)
|
[](https://github.com/cosmos/cosmos-sdk/releases/latest)
|
||||||
[](https://circleci.com/gh/cosmos/cosmos-sdk/tree/master)
|
[](https://circleci.com/gh/cosmos/cosmos-sdk/tree/master)
|
||||||
|
[](https://build.snapcraft.io/user/cosmos/cosmos-sdk)
|
||||||
[](https://codecov.io/gh/cosmos/cosmos-sdk)
|
[](https://codecov.io/gh/cosmos/cosmos-sdk)
|
||||||
[](https://goreportcard.com/report/github.com/cosmos/cosmos-sdk)
|
[](https://goreportcard.com/report/github.com/cosmos/cosmos-sdk)
|
||||||
[](https://github.com/cosmos/cosmos-sdk/blob/master/LICENSE)
|
[](https://github.com/cosmos/cosmos-sdk/blob/master/LICENSE)
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
name: gaia # you probably want to 'snapcraft register <name>'
|
name: gaia
|
||||||
# base: core18 # the base snap is the execution environment for this snap
|
version: git
|
||||||
version: '@VERSION@' # just for humans, typically '1.2+git' or '1.3.2'
|
|
||||||
summary: Gaia Daemon # 79 char long summary
|
summary: Gaia Daemon # 79 char long summary
|
||||||
description: |
|
description: |
|
||||||
This snap provides the Gaia daemon gaiad and the command line
|
This snap provides the Gaia daemon gaiad and the command line
|
||||||
tool gaiacli.
|
tool gaiacli.
|
||||||
grade: devel # must be 'stable' to release into candidate/stable channels
|
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:
|
apps:
|
||||||
gaiad:
|
gaiad:
|
||||||
@@ -24,17 +23,12 @@ parts:
|
|||||||
rootdir=$(pwd)
|
rootdir=$(pwd)
|
||||||
gitroot=$(git rev-parse --show-toplevel)
|
gitroot=$(git rev-parse --show-toplevel)
|
||||||
cd ${gitroot} && git archive \
|
cd ${gitroot} && git archive \
|
||||||
-o ${rootdir}/gaia-@VERSION@.tar.gz \
|
-o ${rootdir}/gaia-git.tar.gz \
|
||||||
--format tar.gz -9 --prefix gaia-@VERSION@/ HEAD
|
--format tar.gz -9 --prefix gaia-git/ HEAD
|
||||||
cd ${rootdir}
|
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
|
mkdir -p go/src/github.com/cosmos bin
|
||||||
mv gaia-@VERSION@/ go/src/github.com/cosmos/cosmos-sdk/
|
mv gaia-git/ 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
|
|
||||||
|
|
||||||
build-snaps: [go]
|
build-snaps: [go]
|
||||||
override-build: |
|
override-build: |
|
||||||
Reference in New Issue
Block a user