Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add .circleci/config.yml #534

Merged
merged 1 commit into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 73 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,14 @@ workflows:
- build-modules:
requires:
- build-branch
- build-schemas:
requires:
- build-branch
- merge-build-branch:
requires:
- build-framework
- build-modules
- build-schemas

modules-coverage:
when:
Expand Down Expand Up @@ -149,14 +153,6 @@ jobs:
command: |
set -e
./scripts/wasm-framework-ci.sh
- run:
name: Generate schemas
command: |
# Install deps
cargo install cargo-workspaces
cargo install just
# Run script
just schema
- save_cache:
paths:
# Cargo registry
Expand All @@ -174,9 +170,7 @@ jobs:
git pull
# Check for wasm changes
git add framework/artifacts --force
# Check for schema changes
git add schema --force
git commit -m 'Update framework WASM & Schemas [skip ci]' || true
git commit -m 'Update framework WASM' || true
git push origin "$CIRCLE_BRANCH-build" || true
- run:
name: Remove temporary branch if it failed during build framework
Expand Down Expand Up @@ -245,13 +239,80 @@ jobs:
failure_message: "**${CIRCLE_USERNAME}**'s modules WASM build failed. Please check why! 😭"
webhook: "${DISCORD_STATUS_WEBHOOK}"

build-schemas:
docker:
- image: cimg/rust:1.80.0
resource_class: xlarge
steps:
- setup_remote_docker
- checkout
- run:
name: "Check for newer workflow"
background: true
command: |
while true; do
sleep 5
LATEST_COMMIT=$(git ls-remote $CIRCLE_REPOSITORY_URL | grep "$CIRCLE_BRANCH$" | cut -f 1)
if [ "$LATEST_COMMIT" != "$CIRCLE_SHA1" ]; then
echo "more recent commit to branch, exiting"
# Remove temporary branch
git push origin --delete "$CIRCLE_BRANCH-build" || true
curl -X POST "https://circleci.com/api/v2/workflow/$CIRCLE_WORKFLOW_ID/cancel?circle-token=$CIRCLE_API_TOKEN"
fi
done
- run:
name: Checkout temporary branch
command: |
git fetch origin "$CIRCLE_BRANCH-build"
git checkout "$CIRCLE_BRANCH-build"
- restore_cache:
keys:
- cargocache-v2-build-rust:1.80.0-{{ checksum "framework/Cargo.lock" }}
- run:
name: Generate schemas
command: |
# Install deps
cargo install cargo-workspaces
cargo install just
# Run script
just schema
- run:
name: Commit and push schemas
command: |
git config --global user.name 'CircleCI'
git config --global user.email '[email protected]'
# Pull latest changes
git pull
# Check for schema changes
git add schema --force
git commit -m 'Update Schemas [skip ci]' || true
git push origin "$CIRCLE_BRANCH-build" || true
- run:
name: Remove temporary branch if it failed during build schemas
when: on_fail
command: git push origin --delete "$CIRCLE_BRANCH-build" || true
- discord/status:
fail_only: true
failure_message: "**${CIRCLE_USERNAME}**'s schemas build failed. Please check why! 😭"
webhook: "${DISCORD_STATUS_WEBHOOK}"

merge-build-branch:
docker:
- image: cimg/base:2024.01
resource_class: small
steps:
- setup_remote_docker
- checkout
- run:
name: Import GPG Key
command: |
echo -e "$GPG_PRIVATE_KEY" | gpg --import
echo -e "trust\n5\ny\n" | gpg --command-fd 0 --edit-key 4C19E4CC17E67B7B
- run:
name: Configure Git for Signing
command: |
git config --global user.signingkey 4C19E4CC17E67B7B
git config --global commit.gpgSign true
- run:
name: "Merge build branch"
command: |
Expand All @@ -262,7 +323,7 @@ jobs:
git fetch origin "$CIRCLE_BRANCH-build"
# Merge artifacts to a branch
git merge "origin/$CIRCLE_BRANCH-build" --squash
git commit -m "Update WASM & Schemas [skip ci]" || echo "No changes to commit"
git commit -S -m "Update WASM & Schemas [skip ci]" || echo "No changes to commit"
git push origin $CIRCLE_BRANCH || true
# Delete temporary branch
git push origin --delete "$CIRCLE_BRANCH-build"
Expand Down
Binary file modified framework/artifacts/abstract_account-xion.wasm
Binary file not shown.
Binary file modified framework/artifacts/abstract_account.wasm
Binary file not shown.
4 changes: 2 additions & 2 deletions framework/artifacts/checksums.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
9b6394e85b956d66d8a286d541c6ef160ea52341635fa97c03f61a7563127864 abstract_account-xion.wasm
98274761e51dd60d0fb9bdba3672c8e6329edd4ce8af047481373fb9d7bbf4c0 abstract_account.wasm
3e0e10c4dbe5bfc83b9180288ca400bbc400e815cbf957fc63f0133910a59541 abstract_account-xion.wasm
378f78cfc073d1d2e0ca01234618ad2efc6b68898e2e6ecb0d88a0505922ba90 abstract_account.wasm
3541b83bb328bd6fe18c0868cd69f37bdf760975c706746e9a41365fdfef13d7 abstract_ans_host.wasm
c2cf261e856081b53ba075a5cd2ce41b4ac2ef92301dc078c06babf4a12d0806 abstract_ibc_client.wasm
9482a8b60432b0e3be375126c471713c75beeeed5d12165bba1ce2fa933f6895 abstract_ibc_host.wasm
Expand Down
Binary file modified modules/artifacts/abstract_cw_staking-archway.wasm
Binary file not shown.
Binary file modified modules/artifacts/abstract_cw_staking.wasm
Binary file not shown.
Binary file modified modules/artifacts/abstract_dex_adapter-archway.wasm
Binary file not shown.
Binary file modified modules/artifacts/abstract_dex_adapter.wasm
Binary file not shown.
Binary file modified modules/artifacts/abstract_money_market_adapter.wasm
Binary file not shown.
Binary file modified modules/artifacts/abstract_subscription.wasm
Binary file not shown.
Binary file modified modules/artifacts/abstract_tendermint_staking_adapter.wasm
Binary file not shown.
Binary file modified modules/artifacts/calendar_app.wasm
Binary file not shown.
Binary file modified modules/artifacts/challenge_app.wasm
Binary file not shown.
24 changes: 12 additions & 12 deletions modules/artifacts/checksums.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
e203ad08c73098c88ead17c96346d4cb516fb5b4a4c13face4454186cb742a14 abstract_cw_staking-archway.wasm
0ced3457ede78cc2bbb5c963845b360a150fa926ee96bd887eddbafd32b863d4 abstract_cw_staking.wasm
f67f994c0d619b0accdd71695ba59ffa232459e8e4b390097c035249e772f434 abstract_dex_adapter-archway.wasm
374ea24dc7889b89cf48431304b676b2049b0a3eedf9938583e612b044f0d4fd abstract_dex_adapter.wasm
2812763bd0045f870e4b490b80be67606023852696eda4a6d25888b8bd8c5fd2 abstract_money_market_adapter.wasm
f37f930886a67fc8b7b0befb733601ca13d5d20ae97d9af03baa8a5d25174517 abstract_subscription.wasm
0c733298f55575cfcfa59c34c7d8529a0a84795634edfacf0c409fc91239324a abstract_tendermint_staking_adapter.wasm
8121bfe8d25c7910d8ea09952aa5b4dcc3ea04691feb1b9a2aae40aa6ed9e5d5 calendar_app.wasm
a34e1cf144d13e17cfe6e1766800506967359023f421338b8f1fcc8fdff556e2 challenge_app.wasm
8301db0aafbec5be34449033a9bdfe4724f39f672e9d8c4d0fa4b4e466a156ea my_standalone.wasm
098835971622ded1071ba0ae476931d8ec085135eea5125a3c61982f46b9445e payment_app.wasm
055d1a4281ab7d0dd45ffe9323a12da59aac220d9d01a308b0a562cae58c9e61 ping_pong.wasm
567b6b93614d25c92965db7909594443f0047de007bb9b61870c722ea38ffc40 abstract_cw_staking-archway.wasm
82b77a2d85831ef2ef1c038d8ec6b49f435ad7ab5dd076b9380f1b78617af340 abstract_cw_staking.wasm
3fff9ea8dc692aed089a0357ed63dcd14c9599ca1c5a09244b12faf456a96d41 abstract_dex_adapter-archway.wasm
f78c45cfca67dd6e1098e6788b68822d338cba8f7a72253ef01a90d3b03f795e abstract_dex_adapter.wasm
88fae88cea2ec92df28f3964e551bdb951395f2d8fcc825ef9b3afde2188d1f8 abstract_money_market_adapter.wasm
ee03e8cc055cf9bc03b2a90bbbfbcc72c2cebb8dc59119d90540a25dd04ec8c2 abstract_subscription.wasm
fba2b0edb9b67abee5f4bfefa46b5ea1e9188de109bc163bd9d0cb2e5aa34173 abstract_tendermint_staking_adapter.wasm
b10703d82891192762306b505d59291bf99c4814f9cad7d628a2d457f6ac0c19 calendar_app.wasm
e91afb657296d1a54b1afc83afbeb432a575ba34516c7275e53231862a0bc38a challenge_app.wasm
74b3356185e4495bee4de173576069ba874b6d16b0dc77a46be8f6259346a521 my_standalone.wasm
413d0e86d1164a2528b216d8a9af89147bf60671931dcd1cdd219ce8bdc5095c payment_app.wasm
c6aef9f088ab4a97a0287613e1f4da66270e366e84ab3b5684cbe655e39846c3 ping_pong.wasm
Binary file modified modules/artifacts/my_standalone.wasm
Binary file not shown.
Binary file modified modules/artifacts/payment_app.wasm
Binary file not shown.
Binary file modified modules/artifacts/ping_pong.wasm
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"contract_name": "abstract-account",
"contract_version": "0.24.1",
"contract_version": "0.24.2",
"idl_version": "1.0.0",
"instantiate": {
"$schema": "http://json-schema.org/draft-07/schema#",
Expand Down Expand Up @@ -132,15 +132,14 @@
]
},
"AddAuthenticator": {
"description": "Note: Instead of transaction bytes address of the Abstract Account used",
"oneOf": [
{
"type": "object",
"required": [
"secp256_k1"
"Secp256K1"
],
"properties": {
"secp256_k1": {
"Secp256K1": {
"type": "object",
"required": [
"id",
Expand Down Expand Up @@ -168,10 +167,10 @@
{
"type": "object",
"required": [
"ed25519"
"Ed25519"
],
"properties": {
"ed25519": {
"Ed25519": {
"type": "object",
"required": [
"id",
Expand Down Expand Up @@ -199,10 +198,10 @@
{
"type": "object",
"required": [
"eth_wallet"
"EthWallet"
],
"properties": {
"eth_wallet": {
"EthWallet": {
"type": "object",
"required": [
"address",
Expand Down Expand Up @@ -230,10 +229,10 @@
{
"type": "object",
"required": [
"jwt"
"Jwt"
],
"properties": {
"jwt": {
"Jwt": {
"type": "object",
"required": [
"aud",
Expand Down Expand Up @@ -265,10 +264,10 @@
{
"type": "object",
"required": [
"secp256_r1"
"Secp256R1"
],
"properties": {
"secp256_r1": {
"Secp256R1": {
"type": "object",
"required": [
"id",
Expand Down Expand Up @@ -296,10 +295,10 @@
{
"type": "object",
"required": [
"passkey"
"Passkey"
],
"properties": {
"passkey": {
"Passkey": {
"type": "object",
"required": [
"credential",
Expand Down Expand Up @@ -790,7 +789,7 @@
"additionalProperties": false
},
{
"description": "Upgrade the module to a new version If module is `abstract::account` then the contract will do a self-migration. Self-migration is protected and only possible to the [`crate::objects::module_reference::ModuleReference::Account`] registered in Version Control",
"description": "Upgrade the module to a new version If module is `abstract::account` then the contract will do a self-migration. Self-migration is protected and only possible to the [`crate::objects::module_reference::ModuleReference::Account`] registered in Registry",
"type": "object",
"required": [
"upgrade"
Expand Down Expand Up @@ -1018,15 +1017,14 @@
],
"definitions": {
"AddAuthenticator": {
"description": "Note: Instead of transaction bytes address of the Abstract Account used",
"oneOf": [
{
"type": "object",
"required": [
"secp256_k1"
"Secp256K1"
],
"properties": {
"secp256_k1": {
"Secp256K1": {
"type": "object",
"required": [
"id",
Expand Down Expand Up @@ -1054,10 +1052,10 @@
{
"type": "object",
"required": [
"ed25519"
"Ed25519"
],
"properties": {
"ed25519": {
"Ed25519": {
"type": "object",
"required": [
"id",
Expand Down Expand Up @@ -1085,10 +1083,10 @@
{
"type": "object",
"required": [
"eth_wallet"
"EthWallet"
],
"properties": {
"eth_wallet": {
"EthWallet": {
"type": "object",
"required": [
"address",
Expand Down Expand Up @@ -1116,10 +1114,10 @@
{
"type": "object",
"required": [
"jwt"
"Jwt"
],
"properties": {
"jwt": {
"Jwt": {
"type": "object",
"required": [
"aud",
Expand Down Expand Up @@ -1151,10 +1149,10 @@
{
"type": "object",
"required": [
"secp256_r1"
"Secp256R1"
],
"properties": {
"secp256_r1": {
"Secp256R1": {
"type": "object",
"required": [
"id",
Expand Down Expand Up @@ -1182,10 +1180,10 @@
{
"type": "object",
"required": [
"passkey"
"Passkey"
],
"properties": {
"passkey": {
"Passkey": {
"type": "object",
"required": [
"credential",
Expand Down
Loading
Loading