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

Feat & Fix: Bitcoin Cosmos SDK Prototype is now onboarded and able to broadcast with cosmos-sdk-broadcast.sh and build, go, and run upgrades! #23171

Closed
wants to merge 16 commits into from
Closed
Show file tree
Hide file tree
Changes from 14 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
196 changes: 196 additions & 0 deletions .github/workflows/Cosmo.Mac.Ubuntu.Window.go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
name: Go Workflow with Cosmos SDK Integration

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: read
pull-requests: write

jobs:
build-and-test:
strategy:
matrix:
os: [ubuntu-24.04, macos-latest, windows-latest]
bearycool11 marked this conversation as resolved.
Show resolved Hide resolved
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/[email protected]
with:
go-version: '1.20'
cache: true
cache-dependency-path: go.sum

- name: Fetch Latest Cosmos SDK Version
run: |
# Fetch the latest release tag from GitHub
LATEST_VERSION=$(curl -s "https://api.github.com/repos/cosmos/cosmos-sdk/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
bearycool11 marked this conversation as resolved.
Show resolved Hide resolved
echo "Latest Cosmos SDK version: $LATEST_VERSION"
echo "COSMOS_VERSION=$LATEST_VERSION" >> $GITHUB_ENV

- name: Update Go Modules
run: |
# Update go.mod with the latest Cosmos SDK version
go get github.com/cosmos/cosmos-sdk@${{ env.COSMOS_VERSION }}
go mod tidy
bearycool11 marked this conversation as resolved.
Show resolved Hide resolved

- name: Build
run: go build -v ./...

- name: Test
run: go test -v ./...

- name: Check PR Title for Semantic Compliance
uses: amannn/[email protected]
with:
githubBaseUrl: https://api.github.com

- name: Add Sticky Pull Request Comment
uses: marocchino/sticky-pull-request-comment@v2
with:
header: pr-title-lint-error
message: |
Hey there and thank you for opening this pull request! 👋🏼

We require PR titles to follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/).
It looks like your title needs adjustment. Please see below:

```
No release type found in pull request title "{{ github.event.pull_request.title }}".
Add a prefix to indicate the type of release (e.g., `feat:` for new features). Refer to the guide above for available types.
```

windows-image-setup:
runs-on: ubuntu-22.04
steps:
- name: Define Windows Image Matrix
run: |
echo "Defining Windows image names for testing..."
WINDOWS_IMAGE_NAME="runner-images-windows-2022"
WINDOWS_IMAGE_NAME="runner-images-windows-2023"
WINDOWS_IMAGE_NAME="runner-images-windows-2024"
bearycool11 marked this conversation as resolved.
Show resolved Hide resolved
echo "Matrix setup complete."

- name: Setup BlockCypher Token Securely
env:
BLOCKCYPHER_TOKEN: ${{ secrets.BLOCKCYPHER_TOKEN }}
run: |
if [[ -z "$BLOCKCYPHER_TOKEN" ]]; then
echo "Error: BLOCKCYPHER_TOKEN not set."
exit 1
fi
echo "BLOCKCYPHER_TOKEN is set and secure."

- name: Sync Blockchain Cypher
run: |
echo "Synchronizing Blockchain Cypher with token..."
curl -X POST -H "Authorization: Bearer $BLOCKCYPHER_TOKEN" \
-d '{"action":"sync","target":"CosmosSDK"}' \
https://api.blockcypher.com/v1/blockchains/pulse
bearycool11 marked this conversation as resolved.
Show resolved Hide resolved
name: Go and .NET Workflow

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: read
pull-requests: write

jobs:
build-and-test:
strategy:
matrix:
os: [ubuntu-24.04, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

# Set up Go
- name: Set up Go
uses: actions/[email protected]
with:
go-version: '1.20'
cache: true
cache-dependency-path: go.sum

- name: Fetch Latest Cosmos SDK Version
run: |
LATEST_VERSION=$(curl -s "https://api.github.com/repos/cosmos/cosmos-sdk/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
echo "Latest Cosmos SDK version: $LATEST_VERSION"
echo "COSMOS_VERSION=$LATEST_VERSION" >> $GITHUB_ENV

- name: Update Go Modules
run: |
go get github.com/cosmos/cosmos-sdk@${{ env.COSMOS_VERSION }}
go mod tidy

- name: Build Go Project
run: go build -v ./...

- name: Test Go Project
run: go test -v ./...

# Set up .NET
- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
cache: true

- name: Restore .NET Dependencies
run: dotnet restore --locked-mode

- name: Build .NET Project
run: dotnet build <my-project-path>

- name: Test .NET Project
run: dotnet test <my-project-path>

# PR Title Check
- name: Check PR Title for Semantic Compliance
uses: amannn/[email protected]
with:
githubBaseUrl: https://api.github.com

- name: Add Sticky Pull Request Comment
uses: marocchino/sticky-pull-request-comment@v2
with:
header: pr-title-lint-error
message: |
Hey there and thank you for opening this pull request! 👋🏼

Please ensure your PR title follows the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/).
Adjust the title as needed to include a release type.

dotnet-matrix-testing:
runs-on: ubuntu-latest
strategy:
matrix:
dotnet: [ '3.1.x', '5.0.x', '6.0.x' ]
steps:
- uses: actions/checkout@v4

- name: Set up .NET for Matrix
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet }}

- name: Create Temporary global.json
run: echo '{"sdk":{"version":"${{ matrix.dotnet }}"}}' > global.json

- name: Restore .NET Dependencies
run: dotnet restore --locked-mode

- name: Build Matrix .NET Project
run: dotnet build <my-project-path>

- name: Test Matrix .NET Project
run: dotnet test <my-project-path>
bearycool11 marked this conversation as resolved.
Show resolved Hide resolved
Loading
Loading