Skip to content

Commit

Permalink
Merge branch 'development' into rates-single-recipient
Browse files Browse the repository at this point in the history
  • Loading branch information
joemonem committed Nov 29, 2024
2 parents 43b7085 + 1f3b0d4 commit d3fa200
Show file tree
Hide file tree
Showing 19 changed files with 413 additions and 366 deletions.
8 changes: 8 additions & 0 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,11 @@ pull_request_rules:
backport:
branches:
- v1.1.x
- name: backport to release/3 branch
conditions:
- base=development
- label=backport/release/3
actions:
backport:
branches:
- release/3
45 changes: 44 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
name: Build Contracts & Schemas

on:
pull_request:
branches: [main, development]
workflow_dispatch:
inputs:
network:
description: "Network to deploy to"
required: true
type: string
kernel_address:
description: "Kernel address"
required: false
type: string
deploy_os:
description: "Deploy OS"
required: false
type: boolean
contracts:
description: "Contracts to deploy"
required: false
type: string

jobs:
build:
Expand Down Expand Up @@ -51,3 +67,30 @@ jobs:
name: schema
path: ./schemas/
if-no-files-found: error

trigger-deploy:
needs: [build, build-schemas]
if: github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- name: Trigger Deploy Workflow
uses: actions/github-script@v7
with:
github-token: ${{ secrets.CI_PAT }}
script: |
try {
await github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'deploy.yml',
ref: github.ref,
inputs: {
network: '${{ inputs.network }}',
kernel_address: '${{ inputs.kernel_address }}',
deploy_os: '${{ inputs.deploy_os }}',
contracts: '${{ inputs.contracts }}'
}
});
} catch (error) {
core.setFailed(`Failed to trigger deploy workflow: ${error.message}`);
}
111 changes: 101 additions & 10 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: Deploy OS

on:
workflow_dispatch:
inputs:
Expand All @@ -16,7 +15,7 @@ on:
required: false
type: boolean
contracts:
description: "Contracts to deploy (e.g. splitter, validator-staking)"
description: "Contracts to deploy"
required: false
type: string

Expand All @@ -26,16 +25,45 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Build Contracts
run: |
sudo make version-map
make version-map
make build
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: contracts
path: ./artifacts/
if-no-files-found: error


build_schemas:
if: contains('["crnbarr93", "SlayerAnsh", "joemonem", "DimitrijeDragasevic", "cowboy0015"]', github.actor)
runs-on: ubuntu-latest
outputs:
schema_url: ${{ steps.upload-schemas.outputs.artifact-url }}
steps:
- uses: actions/checkout@v4
- name: Build Schemas
run: |
set -eo pipefail
make schemas || {
echo "Schema build failed"
exit 1
}
- name: Upload Schemas to Temp
id: upload-schemas
uses: actions/upload-artifact@v4
with:
name: temp-schemas
path: ./schemas/
retention-days: 1
if-no-files-found: error

build_deploy_script:
if: contains('["crnbarr93", "SlayerAnsh", "joemonem", "DimitrijeDragasevic", "cowboy0015"]', github.actor)
runs-on: ubuntu-latest
Expand All @@ -49,9 +77,10 @@ jobs:
name: deploy
path: ./target/release/andromeda-deploy
if-no-files-found: error

deploy:
runs-on: ubuntu-latest
needs: [build_contracts, build_deploy_script]
needs: [build_contracts, build_schemas, build_deploy_script]
env:
DEPLOYMENT_CHAIN: ${{ inputs.network }}
DEPLOYMENT_KERNEL_ADDRESS: ${{ inputs.kernel_address }}
Expand Down Expand Up @@ -80,9 +109,71 @@ jobs:
run: |
chmod +x ./andromeda-deploy
./andromeda-deploy
- name: Upload Deployment Report
uses: actions/upload-artifact@v4
with:
name: deployment-report
path: ./deployment-reports/
if-no-files-found: error
trigger-schema-parser:
needs: [deploy, build_schemas]
runs-on: ubuntu-latest
steps:
- name: Set Branch Based on Kernel
id: check-kernel
run: |
KERNEL_ADDRESS="${{ inputs.kernel_address }}"
TESTNET_KERNELS="${{ vars.TESTNET_KERNELS }}"
TESTNET_STAGING_KERNELS="${{ vars.TESTNET_STAGING_KERNELS }}"
if [[ "${KERNEL_ADDRESS}" == "${TESTNET_KERNELS}" ]]; then
echo "branch=develop" >> $GITHUB_OUTPUT
elif [[ "${KERNEL_ADDRESS}" == "${TESTNET_STAGING_KERNELS}" ]]; then
echo "branch=testnet-staging" >> $GITHUB_OUTPUT
else
echo "Error: Kernel not found in known configurations"
exit 1
fi
- name: Checkout Schema Parser
uses: actions/checkout@v4
with:
repository: andromedaprotocol/schema-parser
ref: ${{ steps.check-kernel.outputs.branch }}
token: ${{ secrets.CI_PAT }}

- name: Download Schemas
uses: actions/download-artifact@v4
with:
name: temp-schemas
path: "packages/schema-parser/schema"

- uses: pnpm/action-setup@v4
with:
version: 8

- uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'pnpm'

- name: Process Schema
working-directory: packages/schema-parser
run: |
set -eo pipefail
echo "Installing dependencies..."
pnpm install
echo "Processing schema..."
npm run start
echo "Flattening schema..."
npm run flatten
echo "Exporting schema..."
npm run export
- name: Commit and Push Changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
if [[ -n $(git status --porcelain) ]]; then
git add .
git commit -m "chore: Update schema for kernel: ${{ inputs.kernel_address }}"
git push
else
echo "No changes to commit"
fi
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Release Contracts
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
- "release/[0-9]+"

jobs:
optimize:
Expand Down
13 changes: 10 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Added Curve ADO [(#515)](https://github.com/andromedaprotocol/andromeda-core/pull/515)
### Changed

### Fixed

## Release 3

### Added

- Added IBC Registry ADO [(#566)](https://github.com/andromedaprotocol/andromeda-core/pull/566)
- Added Denom Validation in IBC Registry ADO [(#571)](https://github.com/andromedaprotocol/andromeda-core/pull/571)
- Added Kernel ICS20 Transfer with Optional ExecuteMsg [(#577)](https://github.com/andromedaprotocol/andromeda-core/pull/577)
- Added IBC Denom Wrap/Unwrap [(#579)](https://github.com/andromedaprotocol/andromeda-core/pull/579)
- Added deployment script/CI workflow for OS [(#616)](https://github.com/andromedaprotocol/andromeda-core/pull/616)
- Added deployable interfaces to all ADOs [(#620)](https://github.com/andromedaprotocol/andromeda-core/pull/620)
- Added MultiSig ADO [(#619)](https://github.com/andromedaprotocol/andromeda-core/pull/619)
- Added Validator Staking ADO [(#330)](https://github.com/andromedaprotocol/andromeda-core/pull/330)
- Added Restake and Redelegate to Validator Staking [(#622)](https://github.com/andromedaprotocol/andromeda-core/pull/622)

### Changed

Expand All @@ -35,7 +44,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Added Validator Staking ADO [(#330)](https://github.com/andromedaprotocol/andromeda-core/pull/330)
- Added `Asset` enum [(#415)](https://github.com/andromedaprotocol/andromeda-core/pull/415)
- Added `ADOBaseVersion` query to all ADOs [(#416)](https://github.com/andromedaprotocol/andromeda-core/pull/416)
- Staking: Added ability to remove/replace reward token [(#418)](https://github.com/andromedaprotocol/andromeda-core/pull/418)
Expand All @@ -54,7 +62,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added BuyNow option for Auction [(#533)](https://github.com/andromedaprotocol/andromeda-core/pull/533)
- Include ADOBase Version in Schema [(#574)](https://github.com/andromedaprotocol/andromeda-core/pull/574)
- Added multi-hop support for IBC [(#604)](https://github.com/andromedaprotocol/andromeda-core/pull/604)
- Added Restake and Redelegate to Validator Staking [(#622)](https://github.com/andromedaprotocol/andromeda-core/pull/622)

### Changed

Expand Down
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions contracts/finance/andromeda-validator-staking/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "andromeda-validator-staking"
version = "0.3.0-b.1"
version = "0.3.0"
edition = "2021"
rust-version = "1.75.0"

Expand Down Expand Up @@ -30,4 +30,4 @@ chrono = "0.3"
cw-multi-test = { workspace = true, optional = true }
andromeda-testing = { workspace = true }
cw-orch = { workspace = true }
cw-orch-daemon = "0.24.2"
cw-orch-daemon = "0.24.2"
2 changes: 1 addition & 1 deletion contracts/finance/andromeda-vesting/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "andromeda-vesting"
version = "3.0.4-b.1"
version = "3.0.4"
edition = "2021"
rust-version = "1.75.0"

Expand Down
Loading

0 comments on commit d3fa200

Please sign in to comment.