From 79c744fff43ae10c8caa5981e27fd16e5243a0db Mon Sep 17 00:00:00 2001 From: auricom <27022259+auricom@users.noreply.github.com> Date: Tue, 24 Sep 2024 09:46:22 +0200 Subject: [PATCH] wip --- .github/scripts/prepare-matrices.py | 17 +- .github/workflows/build-applications.yaml | 102 +++-- .github/workflows/nightlies-scheduled.yaml | 8 +- .../nightly-1-release-cosmos-sdk.yaml | 404 ------------------ .../nightly-2-test-cosmos-sdk-comet.yml | 135 ------ .../workflows/nightly-3-release-ibc-go.yml | 386 ----------------- apps/cosmos-sdk-comet/metadata.yaml | 4 +- {containers => apps}/cosmos-sdk/Dockerfile | 0 {containers => apps}/cosmos-sdk/ci/goss.yaml | 0 {containers => apps}/cosmos-sdk/entrypoint.sh | 0 apps/cosmos-sdk/metadata.yaml | 6 +- apps/ibc-go/metadata.yaml | 2 +- metadata.rules.cue | 15 +- output | 1 + 14 files changed, 94 insertions(+), 986 deletions(-) delete mode 100644 .github/workflows/nightly-1-release-cosmos-sdk.yaml delete mode 100644 .github/workflows/nightly-2-test-cosmos-sdk-comet.yml delete mode 100644 .github/workflows/nightly-3-release-ibc-go.yml rename {containers => apps}/cosmos-sdk/Dockerfile (100%) rename {containers => apps}/cosmos-sdk/ci/goss.yaml (100%) rename {containers => apps}/cosmos-sdk/entrypoint.sh (100%) create mode 100644 output diff --git a/.github/scripts/prepare-matrices.py b/.github/scripts/prepare-matrices.py index 3643e7d..7b893a6 100644 --- a/.github/scripts/prepare-matrices.py +++ b/.github/scripts/prepare-matrices.py @@ -84,6 +84,7 @@ def get_app_metadata(subdir, meta, forRelease=False, channels=None): platformToBuild["goss_args"] = "tail -f /dev/null" if channel["tests"].get("type", "web") == "cli" else "" platformToBuild["tests_enabled"] = channel["tests"]["enabled"] and platform in TESTABLE_PLATFORMS + platformToBuild["tests_command"] = channel["tests"]["command"] platformToBuild["build_command"] = toBuild["build_command"] platformToBuild["build_artifacts"] = meta["build_artifacts"] @@ -118,10 +119,10 @@ def get_app_metadata(subdir, meta, forRelease=False, channels=None): elif os.path.isfile(os.path.join("./apps", app, "metadata.json")): meta = load_metadata_file_json(os.path.join("./apps", app, "metadata.json")) - appsToBuild = get_app_metadata(os.path.join("./apps", app), meta, forRelease, channels=channels) - if appsToBuild is not None: - appsToBuild["apps"].extend(appsToBuild["apps"]) - appsToBuild["appsPlatforms"].extend(appsToBuild["appsPlatforms"]) + appToBuild = get_app_metadata(os.path.join("./apps", app), meta, forRelease, channels=channels) + if appToBuild is not None: + appsToBuild["apps"].extend(appToBuild["apps"]) + appsToBuild["appsPlatforms"].extend(appToBuild["appsPlatforms"]) else: for subdir, dirs, files in os.walk("./apps"): for file in files: @@ -133,8 +134,8 @@ def get_app_metadata(subdir, meta, forRelease=False, channels=None): else: continue if meta is not None: - appsToBuild = get_app_metadata(subdir, meta, forRelease) - if appsToBuild is not None: - appsToBuild["apps"].extend(appsToBuild["apps"]) - appsToBuild["appsPlatforms"].extend(appsToBuild["appsPlatforms"]) + appToBuild = get_app_metadata(subdir, meta, forRelease) + if appToBuild is not None: + appsToBuild["apps"].extend(appToBuild["apps"]) + appsToBuild["appsPlatforms"].extend(appToBuild["appsPlatforms"]) print(json.dumps(appsToBuild)) \ No newline at end of file diff --git a/.github/workflows/build-applications.yaml b/.github/workflows/build-applications.yaml index 1d6ed02..23a47d2 100644 --- a/.github/workflows/build-applications.yaml +++ b/.github/workflows/build-applications.yaml @@ -19,7 +19,6 @@ on: required: false default: false type: boolean - push: jobs: prepare: @@ -32,17 +31,8 @@ jobs: shell: bash run: echo "LOWERCASE_REPO_OWNER=${GITHUB_REPOSITORY_OWNER,,}" >> $GITHUB_ENV - # - name: Generate Token - # uses: actions/create-github-app-token@v1 - # id: app-token - # with: - # app-id: "${{ secrets.BOT_APP_ID }}" - # private-key: "${{ secrets.BOT_APP_PRIVATE_KEY }}" - - name: Checkout uses: actions/checkout@v4 - with: - token: "${{ steps.app-token.outputs.token }}" - name: Setup Python uses: actions/setup-python@v5 @@ -70,16 +60,16 @@ jobs: echo "${matrices}" build-platform-app: - name: Build/Test ${{ matrix.app.name }} (${{ matrix.app.platform }}) + name: Build/Test ${{ matrix.app.name }} ${{ matrix.app.channel }} (${{ matrix.app.platform }}) needs: prepare runs-on: ubuntu-latest - if: ${{ toJSON(fromJSON(needs.prepare.outputs.matrices).appPlatforms) != '[]' && toJSON(fromJSON(needs.prepare.outputs.matrices).appPlatforms) != '' }} + if: ${{ toJSON(fromJSON(needs.prepare.outputs.matrices).appsPlatforms) != '[]' && toJSON(fromJSON(needs.prepare.outputs.matrices).appsPlatforms) != '' }} outputs: date: ${{ steps.archive.outputs.date }} strategy: fail-fast: false matrix: - app: "${{ fromJSON(needs.prepare.outputs.matrices).appPlatforms }}" + app: "${{ fromJSON(needs.prepare.outputs.matrices).appsPlatforms }}" permissions: contents: read packages: write @@ -107,15 +97,11 @@ jobs: check-latest: true - name: Update go modules - # Disable dependencies updates for v0.52.x - if: matrix.major-version != 'v0.52.x' + if: ${{ matrix.app.update_modules }} run: | set -x - ls -l - ls -l ../ - ls -l ../../ cd ${{ matrix.app.repository }}/${{ matrix.app.path }} - COSMOSSDK_BRANCH=${{ matrix.app.branch }} ../../nightly-stack/.github/scripts/update-go-modules.sh + COSMOSSDK_BRANCH=${{ matrix.app.branch }} ../../../nightly-stack/.github/scripts/update-go-modules.sh - name: show output of modified go.sum and go.mod run: | @@ -141,18 +127,22 @@ jobs: - name: Run and monitor application shell: bash # no arm64 runners as of now : https://github.com/orgs/community/discussions/19197 - if: ${{ matrix.app.target_arch == 'amd64' }} + if: ${{ matrix.app.tests_enabled }} run: | set -oue pipefail set -x + if [[ -z "${{ matrix.app.tests_command }}" ]]; then + echo "tests_command is empty. Please check metadata.yaml" + exit 1 + fi + # Set the timeout to 60 seconds TIMEOUT=60 START_TIME=$(date +%s) - cd cosmos-sdk - make init-simapp - simd start > ./output.log 2>1 & + cd ${{ matrix.app.repository }}/${{ matrix.app.path }} + ${{ matrix.app.tests_command }} > ./output.log 2>1 & APP_PID=$! @@ -180,26 +170,34 @@ jobs: done - name: Create archive + if: ${{ matrix.image.publish_artifacts }} id: archive run: | set -oue pipefail set -x + date=$(date +'%Y%m%d') + echo "date=$date" >> $GITHUB_ENV + echo "date=$date" >> $GITHUB_OUTPUT + # Create archive - SIMD_PATH=$(find $(go env GOPATH)/bin | tail -n 1) - mv $SIMD_PATH ${{ github.workspace }}/${{ env.RELEASE_NAME }}-${{ matrix.major-version }}-$date-${{ matrix.go-arch }} + BINARY_PATH=$(find $(go env GOPATH)/bin | tail -n 1) + mv $BINARY_PATH ${{ github.workspace }}/${{ matrix.app.name }}-${{ matrix.app.channel }}-$date-${{ matrix.app.target_arch }} - name: Upload Artifact + if: ${{ matrix.image.publish_artifacts }} uses: actions/upload-artifact@v4 with: - name: ${{ env.RELEASE_NAME }}-${{ matrix.major-version }}-${{ env.date }}-${{ matrix.go-arch }} - path: ${{ github.workspace }}/${{ env.RELEASE_NAME }}-${{ matrix.major-version }}-${{ env.date }}-${{ matrix.go-arch }} + name: ${{ matrix.app.name }}-${{ matrix.app.channel }}-${{ env.date }}-${{ matrix.app.target_arch }} + path: ${{ github.workspace }}/${{ matrix.app.name }}-${{ matrix.app.channel }}-${{ env.date }}-${{ matrix.app.target_arch }} retention-days: 10 - name: Setup Docker Buildx + if: ${{ matrix.image.publish_artifacts }} uses: docker/setup-buildx-action@v3 - name: Login to GitHub Container Registry + if: ${{ matrix.image.publish_artifacts }} uses: docker/login-action@v3 with: registry: ghcr.io @@ -213,33 +211,57 @@ jobs: version: v0.4.4 - name: Lowercase repository owner + if: ${{ matrix.image.publish_artifacts }} shell: bash run: echo "LOWERCASE_REPO_OWNER=${GITHUB_REPOSITORY_OWNER,,}" >> "${GITHUB_ENV}" - name: Prepare Build Outputs + if: ${{ matrix.image.publish_artifacts }} id: prepare-build-outputs shell: bash run: | - image_name="ghcr.io/${{ env.LOWERCASE_REPO_OWNER }}/${{ env.RELEASE_NAME }}" + image_name="ghcr.io/${{ env.LOWERCASE_REPO_OWNER }}/${{ matrix.app.name }}" outputs="type=image,name=${image_name},push-by-digest=true,name-canonical=true,push=true" echo "image_name=${image_name}" >> $GITHUB_OUTPUT echo "outputs=${outputs}" >> $GITHUB_OUTPUT - uses: actions/download-artifact@v4 + if: ${{ matrix.image.publish_artifacts }} with: - name: ${{ env.RELEASE_NAME }}-${{ matrix.major-version }}-${{ env.date }}-${{ matrix.go-arch }} + name: ${{ matrix.app.name }}-${{ matrix.app.channel }}-${{ env.date }}-${{ matrix.app.target_arch }} path: nightly-stack/containers/cosmos-sdk + # - name: Build Image + # uses: docker/build-push-action@v6 + # id: build-image + # with: + # build-args: |- + # BINARY=${{ matrix.app.name }}-${{ matrix.app.channel }}-${{ env.date }}-${{ matrix.app.target_arch }} + # context: ./nightly-stack/containers/cosmos-sdk + # file: ./nightly-stack/containers/cosmos-sdk/Dockerfile + # platforms: ${{ matrix.app.target_arch }} + # outputs: ${{ steps.prepare-build-outputs.outputs.outputs }} + # cache-from: type=gha + # cache-to: type=gha,mode=max + # labels: |- + # org.opencontainers.image.title=${{ steps.prepare-build-outputs.outputs.image_name }} + # org.opencontainers.image.url=https://ghcr.io/${{ env.LOWERCASE_REPO_OWNER }}/${{ steps.prepare-build-outputs.outputs.image_name }} + # org.opencontainers.image.source=https://github.com/${{ env.LOWERCASE_REPO_OWNER }}/containers + # org.opencontainers.image.version=${{ matrix.app.channel }} + # org.opencontainers.image.revision=${{ github.sha }} + # org.opencontainers.image.vendor=${{ env.LOWERCASE_REPO_OWNER }} + - name: Build Image uses: docker/build-push-action@v6 id: build-image + if: ${{ matrix.image.publish_artifacts }} with: build-args: |- - BINARY=${{ env.RELEASE_NAME }}-${{ matrix.major-version }}-${{ env.date }}-${{ matrix.go-arch }} - context: ./nightly-stack/containers/cosmos-sdk - file: ./nightly-stack/containers/cosmos-sdk/Dockerfile - platforms: ${{ matrix.go-arch }} + BINARY=${{ matrix.app.name }}-${{ matrix.app.channel }}-${{ env.date }}-${{ matrix.app.target_arch }} + context: ./nightly-stack/${{ matrix.app.context }} + file: ./nightly-stack/${{ matrix.app.dockerfile }} + platforms: ${{ matrix.app.target_arch }} outputs: ${{ steps.prepare-build-outputs.outputs.outputs }} cache-from: type=gha cache-to: type=gha,mode=max @@ -247,13 +269,13 @@ jobs: org.opencontainers.image.title=${{ steps.prepare-build-outputs.outputs.image_name }} org.opencontainers.image.url=https://ghcr.io/${{ env.LOWERCASE_REPO_OWNER }}/${{ steps.prepare-build-outputs.outputs.image_name }} org.opencontainers.image.source=https://github.com/${{ env.LOWERCASE_REPO_OWNER }}/containers - org.opencontainers.image.version=${{ matrix.major-version }} + org.opencontainers.image.version=${{ matrix.app.channel }} org.opencontainers.image.revision=${{ github.sha }} org.opencontainers.image.vendor=${{ env.LOWERCASE_REPO_OWNER }} - name: Run Goss Tests id: dgoss - if: ${{ matrix.go-arch == 'amd64' }} + if: ${{ matrix.image.tests_enabled }} && ${{ matrix.image.publish_artifacts }} env: CONTAINER_RUNTIME: docker GOSS_FILES_PATH: ${{ github.workspace }}/nightly-stack/containers/cosmos-sdk/ci @@ -269,17 +291,19 @@ jobs: dgoss run ${image_name} - name: Export Digest + if: ${{ matrix.image.publish_artifacts }} id: export-digest shell: bash run: | - mkdir -p /tmp/${{ env.RELEASE_NAME }}/digests + mkdir -p /tmp/${{ matrix.app.name }}/digests digest="${{ steps.build-image.outputs.digest }}" - echo "${{ env.RELEASE_NAME }}" > "/tmp/${{ env.RELEASE_NAME }}/digests/${digest#sha256:}" + echo "${{ matrix.app.name }}" > "/tmp/${{ matrix.app.name }}/digests/${digest#sha256:}" - name: Upload Digest + if: ${{ matrix.image.publish_artifacts }} uses: actions/upload-artifact@v4 with: - name: ${{ env.RELEASE_NAME }}-${{ matrix.major-version }}-${{ matrix.go-arch }} - path: /tmp/${{ env.RELEASE_NAME }}/* + name: ${{ matrix.app.name }}-${{ matrix.app.channel }}-${{ matrix.app.target_arch }} + path: /tmp/${{ matrix.app.name }}/* if-no-files-found: error retention-days: 1 \ No newline at end of file diff --git a/.github/workflows/nightlies-scheduled.yaml b/.github/workflows/nightlies-scheduled.yaml index df0f1a0..b37fb20 100644 --- a/.github/workflows/nightlies-scheduled.yaml +++ b/.github/workflows/nightlies-scheduled.yaml @@ -16,22 +16,24 @@ on: default: all schedule: - cron: "0 0 * * *" + pull_request: jobs: simple-checks: name: Simple Checks - uses: .github/workflows/simple-checks.yaml + uses: ./.github/workflows/simple-checks.yaml build-images: name: Build Images needs: simple-checks - uses: .github/workflows/build-applications.yaml + uses: ./.github/workflows/build-applications.yaml secrets: inherit permissions: contents: read packages: write with: - appsToBuild: ${{ inputs.appsToBuild }} + # appsToBuild: ${{ inputs.appsToBuild }} + appsToBuild: all publishArtifacts: true sendNotifications: true diff --git a/.github/workflows/nightly-1-release-cosmos-sdk.yaml b/.github/workflows/nightly-1-release-cosmos-sdk.yaml deleted file mode 100644 index d387444..0000000 --- a/.github/workflows/nightly-1-release-cosmos-sdk.yaml +++ /dev/null @@ -1,404 +0,0 @@ -name: Nightly builds of SimApp (Cosmos-SDK) -# CI (Continuous Integration) workflow that creates nightly builds of SimApp (Cosmos-SDK). -# 1. Builds multi-arch and multiples major versions in parallel -# 2. Checks that the output binary is working correctly by initiating a testchain and verifying that blocks are procuced -# OUTPUTS: -# - One github workflow artefact for each binary -# - One multi-arch tag for each major version on the container image -on: - schedule: - - cron: 0 0 * * * # Every day at 0:00 UTC - workflow_dispatch: - pull_request: - - -permissions: - packages: write - contents: write - -env: - RELEASE_NAME: cosmos-sdk - -concurrency: - group: ${{ github.workflow }} - cancel-in-progress: true - -jobs: - update-dependencies-cosmossdk: - runs-on: ubuntu-latest - continue-on-error: true - strategy: - matrix: - major-version: [main, v0.50.x, v0.52.x] - outputs: - major-version: ${{ toJson(matrix.major-version) }} - steps: - - uses: actions/checkout@v4 - with: - repository: cosmos/cosmos-sdk - ref: ${{ matrix.major-version == 'main' && 'main' || format('refs/heads/release/{0}', matrix.major-version) }} - token: ${{ github.token }} - path: cosmos-sdk - - - uses: actions/checkout@v4 - with: - path: nightly-stack - - - uses: actions/setup-go@v5 - with: - go-version: "1.23" - check-latest: true - - - name: Update cosmos-sdk modules to HEAD/main - # Disable dependencies updates for v0.52.x - if: matrix.major-version != 'v0.52.x' - run: | - cd cosmos-sdk/simapp - COSMOSSDK_BRANCH=${{ matrix.major-version == 'main' && 'main' || format('refs/heads/release/{0}', matrix.major-version) }} ../../nightly-stack/.github/scripts/update-go-dependencies.sh - - - name: show output of modified go.sum and go.mod - run: | - echo "############" - echo "# go.mod" - echo "############" - cat cosmos-sdk/simapp/go.mod - echo -e "\n\n" - echo "############" - echo "# go.mod" - echo "############" - cat cosmos-sdk/simapp/go.sum - - - name: Upload go.mod and go.sum - # Disable dependencies updates for v0.52.x - if: matrix.major-version != 'v0.52.x' - uses: actions/upload-artifact@v4 - with: - name: go-files-${{ matrix.major-version }} - path: | - cosmos-sdk/simapp/go.mod - cosmos-sdk/simapp/go.sum - - build-cosmossdk: - runs-on: ubuntu-latest - needs: update-dependencies-cosmossdk - continue-on-error: true - outputs: - date: ${{ steps.archive.outputs.date }} - strategy: - matrix: - go-arch: [amd64, arm64] - major-version: [main, v0.50.x, v0.52.x] - steps: - - uses: actions/checkout@v4 - with: - repository: cosmos/cosmos-sdk - ref: ${{ matrix.major-version == 'main' && 'main' || format('refs/heads/release/{0}', matrix.major-version) }} - token: ${{ github.token }} - path: cosmos-sdk - - - uses: actions/checkout@v4 - with: - path: nightly-stack - - - uses: actions/setup-go@v5 - with: - go-version: "1.23" - check-latest: true - - - name: Download go.mod and go.sum - uses: actions/download-artifact@v4 - # Disable dependencies updates for v0.52.x - if: matrix.major-version != 'v0.52.x' - with: - name: go-files-${{ matrix.major-version }} - path: cosmos-sdk/simapp - - - name: Create application binary - id: build - run: | - cd cosmos-sdk/simapp - go mod tidy - cd ../ - GOARCH=${{ matrix.go-arch }} make install - echo "gobin=$(go env GOPATH)/bin" >> $GITHUB_OUTPUT - - - name: Run and monitor application - shell: bash - # no arm64 runners as of now : https://github.com/orgs/community/discussions/19197 - if: ${{ matrix.go-arch == 'amd64' }} - run: | - set -oue pipefail - set -x - - # Set the timeout to 60 seconds - TIMEOUT=60 - START_TIME=$(date +%s) - - cd cosmos-sdk - make init-simapp - simd start > ./output.log 2>1 & - APP_PID=$! - - - while true; do - CURRENT_TIME=$(date +%s) - ELAPSED_TIME=$((CURRENT_TIME - START_TIME)) - - if [ $ELAPSED_TIME -ge $TIMEOUT ]; then - echo "Timeout reached. Application did not produce the success pattern within 60 seconds." - kill $APP_PID - cat ./output.log - exit 1 - fi - - # Check that 4th block is produced to validate the application - if simd query block-results 4; then - echo "Block #4 has been committed. Application is working correctly." - kill $APP_PID - exit 0 - else - echo "Block height is not greater than 4." - fi - - sleep 3 - done - - - name: Create archive - id: archive - run: | - set -oue pipefail - set -x - - date=$(date +'%Y%m%d') - echo "date=$date" >> $GITHUB_ENV - echo "date=$date" >> $GITHUB_OUTPUT - - # Create archive - SIMD_PATH=$(find $(go env GOPATH)/bin | tail -n 1) - mv $SIMD_PATH ${{ github.workspace }}/${{ env.RELEASE_NAME }}-${{ matrix.major-version }}-$date-${{ matrix.go-arch }} - - - name: Upload Artifact - uses: actions/upload-artifact@v4 - with: - name: ${{ env.RELEASE_NAME }}-${{ matrix.major-version }}-${{ env.date }}-${{ matrix.go-arch }} - path: ${{ github.workspace }}/${{ env.RELEASE_NAME }}-${{ matrix.major-version }}-${{ env.date }}-${{ matrix.go-arch }} - retention-days: 10 - - - name: Setup Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Login to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: "${{ github.actor }}" - password: "${{ secrets.GITHUB_TOKEN }}" - - - name: Setup Goss - if: ${{ matrix.go-arch == 'amd64' }} - uses: e1himself/goss-installation-action@v1 - with: - version: v0.4.4 - - - name: Lowercase repository owner - shell: bash - run: echo "LOWERCASE_REPO_OWNER=${GITHUB_REPOSITORY_OWNER,,}" >> "${GITHUB_ENV}" - - - name: Prepare Build Outputs - id: prepare-build-outputs - shell: bash - run: | - image_name="ghcr.io/${{ env.LOWERCASE_REPO_OWNER }}/${{ env.RELEASE_NAME }}" - outputs="type=image,name=${image_name},push-by-digest=true,name-canonical=true,push=true" - - echo "image_name=${image_name}" >> $GITHUB_OUTPUT - echo "outputs=${outputs}" >> $GITHUB_OUTPUT - - - uses: actions/download-artifact@v4 - with: - name: ${{ env.RELEASE_NAME }}-${{ matrix.major-version }}-${{ env.date }}-${{ matrix.go-arch }} - path: nightly-stack/containers/cosmos-sdk - - - name: Build Image - uses: docker/build-push-action@v6 - id: build-image - with: - build-args: |- - BINARY=${{ env.RELEASE_NAME }}-${{ matrix.major-version }}-${{ env.date }}-${{ matrix.go-arch }} - context: ./nightly-stack/containers/cosmos-sdk - file: ./nightly-stack/containers/cosmos-sdk/Dockerfile - platforms: ${{ matrix.go-arch }} - outputs: ${{ steps.prepare-build-outputs.outputs.outputs }} - cache-from: type=gha - cache-to: type=gha,mode=max - labels: |- - org.opencontainers.image.title=${{ steps.prepare-build-outputs.outputs.image_name }} - org.opencontainers.image.url=https://ghcr.io/${{ env.LOWERCASE_REPO_OWNER }}/${{ steps.prepare-build-outputs.outputs.image_name }} - org.opencontainers.image.source=https://github.com/${{ env.LOWERCASE_REPO_OWNER }}/containers - org.opencontainers.image.version=${{ matrix.major-version }} - org.opencontainers.image.revision=${{ github.sha }} - org.opencontainers.image.vendor=${{ env.LOWERCASE_REPO_OWNER }} - - - name: Run Goss Tests - id: dgoss - if: ${{ matrix.go-arch == 'amd64' }} - env: - CONTAINER_RUNTIME: docker - GOSS_FILES_PATH: ${{ github.workspace }}/nightly-stack/containers/cosmos-sdk/ci - GOSS_OPTS: --retry-timeout 60s --sleep 2s --color --format documentation - GOSS_SLEEP: 2 - GOSS_FILES_STRATEGY: cp - CONTAINER_LOG_OUTPUT: goss_container_log_output - shell: bash - run: | - set -x - ls -l ${{ github.workspace }}/nightly-stack/containers/cosmos-sdk/ci/goss.yaml - image_name="${{ steps.prepare-build-outputs.outputs.image_name }}@${{ steps.build-image.outputs.digest }}" - dgoss run ${image_name} - - - name: Export Digest - id: export-digest - shell: bash - run: | - mkdir -p /tmp/${{ env.RELEASE_NAME }}/digests - digest="${{ steps.build-image.outputs.digest }}" - echo "${{ env.RELEASE_NAME }}" > "/tmp/${{ env.RELEASE_NAME }}/digests/${digest#sha256:}" - - - name: Upload Digest - uses: actions/upload-artifact@v4 - with: - name: ${{ env.RELEASE_NAME }}-${{ matrix.major-version }}-${{ matrix.go-arch }} - path: /tmp/${{ env.RELEASE_NAME }}/* - if-no-files-found: error - retention-days: 1 - - merge: - name: Merge cosmos-sdk - runs-on: ubuntu-latest - needs: [build-cosmossdk] - if: ${{ always() }} - strategy: - matrix: - major-version: [main, v0.50.x, v0.52.x] - steps: - - name: Set variables - id: variables - shell: bash - run: | - set -x - echo "LOWERCASE_REPO_OWNER=${GITHUB_REPOSITORY_OWNER,,}" >> $GITHUB_ENV - major_version_clean=${{ matrix.major-version }} - major_version_clean=${major_version_clean#v} - major_version_clean=${major_version_clean%.x} - echo "LOWERCASE_REPO_OWNER=${GITHUB_REPOSITORY_OWNER,,}" >> $GITHUB_ENV - echo "MAJOR_VERSION_CLEAN=${major_version_clean}" >> $GITHUB_OUTPUT - - - name: Download Digests - uses: actions/download-artifact@v4 - with: - pattern: "${{ env.RELEASE_NAME }}-${{ matrix.major-version }}-{amd64,arm64}" - merge-multiple: true - path: /tmp/cosmos-sdk - - - name: Setup Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Login to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: "${{ github.actor }}" - password: "${{ secrets.GITHUB_TOKEN }}" - - - name: Log Files - working-directory: /tmp/cosmos-sdk/digests - shell: bash - run: | - ls -la - cat * - - - name: Merge Manifests - id: merge - working-directory: /tmp/cosmos-sdk/digests - shell: bash - run: | - set -x - docker buildx imagetools create \ - --tag ghcr.io/${{ env.LOWERCASE_REPO_OWNER }}/${{ env.RELEASE_NAME }}:${{ steps.variables.outputs.MAJOR_VERSION_CLEAN }} \ - $(printf 'ghcr.io/${{ env.LOWERCASE_REPO_OWNER }}/${{ env.RELEASE_NAME }}@sha256:%s ' *) - - - name: Inspect image - id: inspect - shell: bash - run: | - docker buildx imagetools inspect ghcr.io/${{ env.LOWERCASE_REPO_OWNER }}/${{ env.RELEASE_NAME }}:${{ steps.variables.outputs.MAJOR_VERSION_CLEAN }} - - - name: Build successful - id: build-success - if: ${{ always() && steps.merge.outcome == 'success' && steps.inspect.outcome == 'success' }} - shell: bash - run: | - echo "message=🎉 ${{ env.RELEASE_NAME }} (${{ needs.build-cosmos-sdk.outputs.date }})" >> $GITHUB_OUTPUT - echo "color=0x00FF00" >> $GITHUB_OUTPUT - - - name: Build failed - id: build-failed - if: ${{ always() && (steps.merge.outcome == 'failure' || steps.inspect.outcome == 'failure') }} - shell: bash - run: | - echo "message=💥 ${{ env.RELEASE_NAME }} (${{ needs.build-cosmos-sdk.outputs.date }})" >> $GITHUB_OUTPUT - echo "color=0xFF0000" >> $GITHUB_OUTPUT - - # Summarize matrix https://github.community/t/status-check-for-a-matrix-jobs/127354/7 - build_success: - name: Build matrix success - runs-on: ubuntu-latest - needs: [merge] - if: ${{ always() }} - steps: - - name: Check build matrix status - if: ${{ needs.merge.result != 'success' && needs.merge.result != 'skipped' }} - shell: bash - run: exit 1 - - build-cosmossdk-notify-success: - needs: merge - runs-on: ubuntu-latest - if: ${{ success() }} - steps: - - uses: actions/checkout@v4 - - name: Get previous workflow status - uses: cosmos/cosmos-sdk/.github/actions/last-workflow-status@main - id: last_status - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - - - name: Notify Slack on success - if: ${{ steps.last_status.outputs.last_status == 'failure' }} - uses: rtCamp/action-slack-notify@v2.3.0 - env: - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} - SLACK_CHANNEL: nightly-stack-build - SLACK_USERNAME: Nightly Builds - SLACK_ICON_EMOJI: ":white_check_mark:" - SLACK_COLOR: good - SLACK_MESSAGE: ${{ env.RELEASE_NAME }} is passing - SLACK_FOOTER: "" - - build-cosmossdk-notify-failure: - permissions: - contents: none - needs: merge - runs-on: ubuntu-latest - if: ${{ failure() }} - steps: - - name: Notify Slack on failure - uses: rtCamp/action-slack-notify@v2.3.0 - env: - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} - SLACK_CHANNEL: nightly-stack-build - SLACK_USERNAME: Nightly Builds - SLACK_ICON_EMOJI: ":skull:" - SLACK_COLOR: danger - SLACK_MESSAGE: ${{ env.RELEASE_NAME }} is failing - SLACK_FOOTER: "" diff --git a/.github/workflows/nightly-2-test-cosmos-sdk-comet.yml b/.github/workflows/nightly-2-test-cosmos-sdk-comet.yml deleted file mode 100644 index 96236b7..0000000 --- a/.github/workflows/nightly-2-test-cosmos-sdk-comet.yml +++ /dev/null @@ -1,135 +0,0 @@ -name: Test Cosmos-SDK + Comet -# Test workflow that creates nightly builds of SimApp (Cosmos-SDK) with latest commits on cometBFT (main branch) -# 1. Builds multi-arch -# 2. Checks that the output binary is working correctly by initiating a testchain and verifying that blocks are procuced - -on: - schedule: - - cron: 0 0 * * * # Every day at 0:00 UTC - workflow_dispatch: - -permissions: - contents: read - -env: - RELEASE_NAME: Cosmos-SDK@main + CometBFT@main - -concurrency: - group: ${{ github.workflow }} - cancel-in-progress: true - -jobs: - build-cosmossdk-comet: - runs-on: ubuntu-latest - strategy: - matrix: - go-arch: [amd64, arm64] - steps: - - uses: actions/checkout@v4 - with: - repository: cosmos/cosmos-sdk - ref: main - token: ${{ github.token }} - - - uses: actions/setup-go@v5 - with: - go-version: "1.23" - check-latest: true - - - name: Get cometbft v1.x SHA - id: cometbft - run: | - head=$(git ls-remote https://github.com/cometbft/cometbft.git v1.x | awk '{print $1}') - echo "head=$head" >> $GITHUB_OUTPUT - - - name: Go get cometbft@HEAD - id: build - run: | - cd simapp - go get github.com/cometbft/cometbft@${{ steps.cometbft.outputs.head }} - go mod tidy - - - name: Build application - run: | - GOARCH=${{ matrix.go-arch }} make install - - name: Run and monitor application - shell: bash - # no arm64 runners as of now : https://github.com/orgs/community/discussions/19197 - if: ${{ matrix.go-arch == 'amd64' }} - run: | - set -oue pipefail - set -x - - # Set the timeout to 60 seconds - TIMEOUT=60 - START_TIME=$(date +%s) - - make init-simapp - simd start > ./output.log 2>1 & - APP_PID=$! - - - while true; do - CURRENT_TIME=$(date +%s) - ELAPSED_TIME=$((CURRENT_TIME - START_TIME)) - - if [ $ELAPSED_TIME -ge $TIMEOUT ]; then - echo "Timeout reached. Application did not produce the success pattern within 60 seconds." - kill $APP_PID - cat ./output.log - exit 1 - fi - - # Check that 4th block is produced to validate the application - if simd query block-results 4; then - echo "Block #4 has been committed. Application is working correctly." - kill $APP_PID - exit 0 - else - echo "Block height is not greater than 4." - fi - - sleep 3 - done - - build-cosmossdk-comet-notify-success: - needs: build-cosmossdk-comet - runs-on: ubuntu-latest - if: ${{ success() }} - steps: - - uses: actions/checkout@v4 - - name: Get previous workflow status - uses: cosmos/cosmos-sdk/.github/actions/last-workflow-status@main - id: last_status - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - - - name: Notify Slack on success - if: ${{ steps.last_status.outputs.last_status == 'failure' }} - uses: rtCamp/action-slack-notify@v2.3.0 - env: - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} - SLACK_CHANNEL: nightly-stack-build - SLACK_USERNAME: Nightly Builds - SLACK_ICON_EMOJI: ":white_check_mark:" - SLACK_COLOR: good - SLACK_MESSAGE: ${{ env.RELEASE_NAME }} is passing - SLACK_FOOTER: "" - - build-cosmossdk-comet-notify-failure: - permissions: - contents: none - needs: build-cosmos-sdk-comet - runs-on: ubuntu-latest - if: ${{ failure() }} - steps: - - name: Notify Slack on failure - uses: rtCamp/action-slack-notify@v2.3.0 - env: - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} - SLACK_CHANNEL: nightly-stack-build - SLACK_USERNAME: Nightly Builds - SLACK_ICON_EMOJI: ":skull:" - SLACK_COLOR: danger - SLACK_MESSAGE: ${{ env.RELEASE_NAME }} is failing - SLACK_FOOTER: "" diff --git a/.github/workflows/nightly-3-release-ibc-go.yml b/.github/workflows/nightly-3-release-ibc-go.yml deleted file mode 100644 index 349e888..0000000 --- a/.github/workflows/nightly-3-release-ibc-go.yml +++ /dev/null @@ -1,386 +0,0 @@ -name: Release IBC-go -# CI (Continuous Integration) workflow that creates nightly builds of SimApp (IBC-go). -# 1. Builds multi-arch and multiples major versions in parallel -# 2. Checks that the output binary is working correctly by initiating a testchain and verifying that blocks are procuced -# OUTPUTS: -# - One github workflow artefact for each binary -# - One multi-arch tag for each major version on the container image -on: - schedule: - - cron: 0 0 * * * # Every day at 0:00 UTC - workflow_dispatch: - pull_request: - - -permissions: - packages: write - contents: write - -env: - RELEASE_NAME: IBC-go@main + cosmos-sdk modules@HEAD - COSMOSSDK_BRANCH: refs/heads/release/v0.50.x - -concurrency: - group: ${{ github.workflow }} - cancel-in-progress: true - -jobs: - - update-dependencies-ibc: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - repository: cosmos/ibc-go - ref: main - token: ${{ github.token }} - path: ibc-go - - - uses: actions/checkout@v4 - with: - path: nightly-stack - - - uses: actions/setup-go@v5 - with: - go-version: "1.23" - check-latest: true - - - name: Update cosmos-sdk modules to HEAD/main - run: | - cd ibc-go/simapp - ../../nightly-stack/.github/scripts/update-go-dependencies.sh - - - name: show output of modified go.sum and go.mod - run: | - echo "############" - echo "# go.mod" - echo "############" - cat ibc-go/simapp/go.mod - echo -e "\n\n" - echo "############" - echo "# go.mod" - echo "############" - cat ibc-go/simapp/go.sum - - - name: Upload go.mod and go.sum - uses: actions/upload-artifact@v4 - with: - name: go-files - path: | - ibc-go/simapp/go.mod - ibc-go/simapp/go.sum - - build-ibc: - runs-on: ubuntu-latest - needs: update-dependencies-ibc - outputs: - date: ${{ steps.archive.outputs.date }} - strategy: - matrix: - go-arch: [amd64, arm64] - steps: - - uses: actions/checkout@v4 - with: - repository: cosmos/ibc-go - ref: main - token: ${{ github.token }} - path: ibc-go - - - uses: actions/checkout@v4 - with: - path: nightly-stack - - - uses: actions/setup-go@v5 - with: - go-version: "1.23" - check-latest: true - - - name: Download go.mod and go.sum - uses: actions/download-artifact@v4 - with: - name: go-files - path: ibc-go/simapp - - - name: Create application binary - id: build - run: | - cd ibc-go/simapp - go mod tidy - cd .. - GOARCH=${{ matrix.go-arch }} make build - echo "gobin=$(go env GOPATH)/bin" >> $GITHUB_OUTPUT - - - name: Run and monitor application - shell: bash - # no arm64 runners as of now : https://github.com/orgs/community/discussions/19197 - if: ${{ matrix.go-arch == 'amd64' }} - run: | - set -oue pipefail - set -x - - # Set the timeout to 60 seconds - TIMEOUT=60 - START_TIME=$(date +%s) - - cd ibc-go - make init-simapp - simd start > ./output.log 2>1 & - APP_PID=$! - - - while true; do - CURRENT_TIME=$(date +%s) - ELAPSED_TIME=$((CURRENT_TIME - START_TIME)) - - if [ $ELAPSED_TIME -ge $TIMEOUT ]; then - echo "Timeout reached. Application did not produce the success pattern within 60 seconds." - kill $APP_PID - cat ./output.log - exit 1 - fi - - # Check that 4th block is produced to validate the application - if simd query block-results 4; then - echo "Block #4 has been committed. Application is working correctly." - kill $APP_PID - exit 0 - else - echo "Block height is not greater than 4." - fi - - sleep 3 - done - - - name: Create archive - id: archive - run: | - set -oue pipefail - set -x - - date=$(date +'%Y%m%d') - echo "date=$date" >> $GITHUB_ENV - echo "date=$date" >> $GITHUB_OUTPUT - - # Create archive - SIMD_PATH=$(find $(go env GOPATH)/bin | tail -n 1) - mv $SIMD_PATH ${{ github.workspace }}/${{ env.RELEASE_NAME }}-$date-${{ matrix.go-arch }} - - - name: Upload Artifact - uses: actions/upload-artifact@v4 - with: - name: ${{ env.RELEASE_NAME }}-${{ env.date }}-${{ matrix.go-arch }} - path: ${{ github.workspace }}/${{ env.RELEASE_NAME }}-${{ env.date }}-${{ matrix.go-arch }} - retention-days: 10 - - - name: Setup Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Login to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: "${{ github.actor }}" - password: "${{ secrets.GITHUB_TOKEN }}" - - - name: Setup Goss - if: ${{ matrix.go-arch == 'amd64' }} - uses: e1himself/goss-installation-action@v1 - with: - version: v0.4.4 - - - name: Lowercase repository owner - shell: bash - run: echo "LOWERCASE_REPO_OWNER=${GITHUB_REPOSITORY_OWNER,,}" >> "${GITHUB_ENV}" - - - name: Prepare Build Outputs - id: prepare-build-outputs - shell: bash - run: | - image_name="ghcr.io/${{ env.LOWERCASE_REPO_OWNER }}/${{ env.RELEASE_NAME }}" - outputs="type=image,name=${image_name},push-by-digest=true,name-canonical=true,push=true" - - echo "image_name=${image_name}" >> $GITHUB_OUTPUT - echo "outputs=${outputs}" >> $GITHUB_OUTPUT - - - uses: actions/download-artifact@v4 - with: - name: ${{ env.RELEASE_NAME }}-${{ env.date }}-${{ matrix.go-arch }} - path: nightly-stack/containers/cosmos-sdk - - - name: Build Image - uses: docker/build-push-action@v6 - id: build-image - with: - build-args: |- - BINARY=${{ env.RELEASE_NAME }}-${{ env.date }}-${{ matrix.go-arch }} - context: ./nightly-stack/containers/cosmos-sdk - file: ./nightly-stack/containers/cosmos-sdk/Dockerfile - platforms: ${{ matrix.go-arch }} - outputs: ${{ steps.prepare-build-outputs.outputs.outputs }} - cache-from: type=gha - cache-to: type=gha,mode=max - labels: |- - org.opencontainers.image.title=${{ steps.prepare-build-outputs.outputs.image_name }} - org.opencontainers.image.url=https://ghcr.io/${{ env.LOWERCASE_REPO_OWNER }}/${{ steps.prepare-build-outputs.outputs.image_name }} - org.opencontainers.image.source=https://github.com/${{ env.LOWERCASE_REPO_OWNER }}/containers - org.opencontainers.image.version=main - org.opencontainers.image.revision=${{ github.sha }} - org.opencontainers.image.vendor=${{ env.LOWERCASE_REPO_OWNER }} - - - name: Run Goss Tests - id: dgoss - if: ${{ matrix.go-arch == 'amd64' }} - env: - CONTAINER_RUNTIME: docker - GOSS_FILES_PATH: ${{ github.workspace }}/nightly-stack/containers/cosmos-sdk/ci - GOSS_OPTS: --retry-timeout 60s --sleep 2s --color --format documentation - GOSS_SLEEP: 2 - GOSS_FILES_STRATEGY: cp - CONTAINER_LOG_OUTPUT: goss_container_log_output - shell: bash - run: | - set -x - ls -l ${{ github.workspace }}/nightly-stack/containers/cosmos-sdk/ci/goss.yaml - image_name="${{ steps.prepare-build-outputs.outputs.image_name }}@${{ steps.build-image.outputs.digest }}" - dgoss run ${image_name} - - - name: Export Digest - id: export-digest - shell: bash - run: | - mkdir -p /tmp/${{ env.RELEASE_NAME }}/digests - digest="${{ steps.build-image.outputs.digest }}" - echo "${{ env.RELEASE_NAME }}" > "/tmp/${{ env.RELEASE_NAME }}/digests/${digest#sha256:}" - - - name: Upload Digest - uses: actions/upload-artifact@v4 - with: - name: ${{ env.RELEASE_NAME }}-${{ matrix.go-arch }} - path: /tmp/${{ env.RELEASE_NAME }}/* - if-no-files-found: error - retention-days: 1 - - merge: - name: Merge cosmos-sdk - runs-on: ubuntu-latest - needs: [build-ibc] - if: ${{ always() }} - steps: - - name: Set variables - id: variables - shell: bash - run: | - set -x - echo "LOWERCASE_REPO_OWNER=${GITHUB_REPOSITORY_OWNER,,}" >> $GITHUB_ENV - echo "LOWERCASE_REPO_OWNER=${GITHUB_REPOSITORY_OWNER,,}" >> $GITHUB_ENV - echo "MAJOR_VERSION_CLEAN=main" >> $GITHUB_OUTPUT - - - name: Download Digests - uses: actions/download-artifact@v4 - with: - pattern: "${{ env.RELEASE_NAME }}-{amd64,arm64}" - merge-multiple: true - path: /tmp/cosmos-sdk - - - name: Setup Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Login to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: "${{ github.actor }}" - password: "${{ secrets.GITHUB_TOKEN }}" - - - name: Log Files - working-directory: /tmp/cosmos-sdk/digests - shell: bash - run: | - ls -la - cat * - - - name: Merge Manifests - id: merge - working-directory: /tmp/cosmos-sdk/digests - shell: bash - run: | - set -x - docker buildx imagetools create \ - --tag ghcr.io/${{ env.LOWERCASE_REPO_OWNER }}/${{ env.RELEASE_NAME }}:${{ steps.variables.outputs.MAJOR_VERSION_CLEAN }} \ - $(printf 'ghcr.io/${{ env.LOWERCASE_REPO_OWNER }}/${{ env.RELEASE_NAME }}@sha256:%s ' *) - - - name: Inspect image - id: inspect - shell: bash - run: | - docker buildx imagetools inspect ghcr.io/${{ env.LOWERCASE_REPO_OWNER }}/${{ env.RELEASE_NAME }}:${{ steps.variables.outputs.MAJOR_VERSION_CLEAN }} - - - name: Build successful - id: build-success - if: ${{ always() && steps.merge.outcome == 'success' && steps.inspect.outcome == 'success' }} - shell: bash - run: | - echo "message=🎉 ${{ env.RELEASE_NAME }} (${{ needs.build-wfl3.outputs.date }})" >> $GITHUB_OUTPUT - echo "color=0x00FF00" >> $GITHUB_OUTPUT - - - name: Build failed - id: build-failed - if: ${{ always() && (steps.merge.outcome == 'failure' || steps.inspect.outcome == 'failure') }} - shell: bash - run: | - echo "message=💥 ${{ env.RELEASE_NAME }} (${{ needs.build-wfl3.outputs.date }})" >> $GITHUB_OUTPUT - echo "color=0xFF0000" >> $GITHUB_OUTPUT - - # Summarize matrix https://github.community/t/status-check-for-a-matrix-jobs/127354/7 - build_success: - name: Build matrix success - runs-on: ubuntu-latest - needs: [merge] - if: ${{ always() }} - steps: - - name: Check build matrix status - if: ${{ needs.merge.result != 'success' && needs.merge.result != 'skipped' }} - shell: bash - run: exit 1 - - sims-notify-success: - needs: merge - runs-on: ubuntu-latest - if: ${{ success() }} - steps: - - uses: actions/checkout@v4 - - name: Get previous workflow status - uses: cosmos/cosmos-sdk/.github/actions/last-workflow-status@main - id: last_status - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - - - name: Notify Slack on success - if: ${{ steps.last_status.outputs.last_status == 'failure' }} - uses: rtCamp/action-slack-notify@v2.3.0 - env: - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} - SLACK_CHANNEL: nightly-stack-build - SLACK_USERNAME: Nightly Builds - SLACK_ICON_EMOJI: ":white_check_mark:" - SLACK_COLOR: good - SLACK_MESSAGE: ${{ env.RELEASE_NAME }} is passing - SLACK_FOOTER: "" - - sims-notify-failure: - permissions: - contents: none - needs: merge - runs-on: ubuntu-latest - if: ${{ failure() }} - steps: - - name: Notify Slack on failure - uses: rtCamp/action-slack-notify@v2.3.0 - env: - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} - SLACK_CHANNEL: nightly-stack-build - SLACK_USERNAME: Nightly Builds - SLACK_ICON_EMOJI: ":skull:" - SLACK_COLOR: danger - SLACK_MESSAGE: ${{ env.RELEASE_NAME }} is failing - SLACK_FOOTER: "" diff --git a/apps/cosmos-sdk-comet/metadata.yaml b/apps/cosmos-sdk-comet/metadata.yaml index 3994935..c1884f8 100644 --- a/apps/cosmos-sdk-comet/metadata.yaml +++ b/apps/cosmos-sdk-comet/metadata.yaml @@ -1,5 +1,5 @@ --- -app: cosmos-sdk +app: cosmos-sdk-comet repository: cosmos/cosmos-sdk path: simapp build_command: make install @@ -11,4 +11,4 @@ channels: update_modules: false tests: enabled: true - type: web + command: make init-simapp && simd start diff --git a/containers/cosmos-sdk/Dockerfile b/apps/cosmos-sdk/Dockerfile similarity index 100% rename from containers/cosmos-sdk/Dockerfile rename to apps/cosmos-sdk/Dockerfile diff --git a/containers/cosmos-sdk/ci/goss.yaml b/apps/cosmos-sdk/ci/goss.yaml similarity index 100% rename from containers/cosmos-sdk/ci/goss.yaml rename to apps/cosmos-sdk/ci/goss.yaml diff --git a/containers/cosmos-sdk/entrypoint.sh b/apps/cosmos-sdk/entrypoint.sh similarity index 100% rename from containers/cosmos-sdk/entrypoint.sh rename to apps/cosmos-sdk/entrypoint.sh diff --git a/apps/cosmos-sdk/metadata.yaml b/apps/cosmos-sdk/metadata.yaml index 943b4ec..94c640f 100644 --- a/apps/cosmos-sdk/metadata.yaml +++ b/apps/cosmos-sdk/metadata.yaml @@ -11,18 +11,18 @@ channels: update_modules: true tests: enabled: true - type: web + command: make init-simapp && simd start - name: v0.50.x branch: refs/heads/release/v0.50.x platforms: ["linux/amd64","linux/arm64"] update_modules: true tests: enabled: true - type: web + command: make init-simapp && simd start - name: v0.52.x branch: refs/heads/release/v0.52.x platforms: ["linux/amd64","linux/arm64"] update_modules: false tests: enabled: true - type: web + command: make init-simapp && simd start diff --git a/apps/ibc-go/metadata.yaml b/apps/ibc-go/metadata.yaml index 4e029dc..353fd75 100644 --- a/apps/ibc-go/metadata.yaml +++ b/apps/ibc-go/metadata.yaml @@ -11,4 +11,4 @@ channels: update_modules: true tests: enabled: true - type: web + command: make init-simapp && simd start diff --git a/metadata.rules.cue b/metadata.rules.cue index b0cff90..9f4eec6 100644 --- a/metadata.rules.cue +++ b/metadata.rules.cue @@ -1,16 +1,21 @@ + #Spec: { - app: #AppName - semver?: bool + app: #AppName + repository: string + path: string + build_command: string + build_artifacts: bool channels: [...#Channels] } #Channels: { - name: #ChannelName + name: #ChannelName platforms: [...#Platforms] - stable: bool + branch: string + update_modules?: bool tests: { enabled: bool - type?: =~"^(cli|web)$" + command: string } } diff --git a/output b/output new file mode 100644 index 0000000..be293c1 --- /dev/null +++ b/output @@ -0,0 +1 @@ +{"apps": [{"name": "cosmos-sdk", "repository": "cosmos/cosmos-sdk", "path": "simapp", "branch": "main", "update_modules": true, "build_command": "make install", "build_artifacts": true, "tags": [{"name": "main", "platforms": ["linux/amd64", "linux/arm64"], "branch": "main", "update_modules": true, "tests": {"enabled": true, "command": "make init-simapp && simd start"}}], "platforms": ["linux/amd64", "linux/arm64"]}, {"name": "cosmos-sdk", "repository": "cosmos/cosmos-sdk", "path": "simapp", "branch": "refs/heads/release/v0.50.x", "update_modules": true, "build_command": "make install", "build_artifacts": true, "tags": [{"name": "v0.50.x", "branch": "refs/heads/release/v0.50.x", "platforms": ["linux/amd64", "linux/arm64"], "update_modules": true, "tests": {"enabled": true, "command": "make init-simapp && simd start"}}], "platforms": ["linux/amd64", "linux/arm64"]}, {"name": "cosmos-sdk", "repository": "cosmos/cosmos-sdk", "path": "simapp", "branch": "refs/heads/release/v0.52.x", "update_modules": false, "build_command": "make install", "build_artifacts": true, "tags": [{"name": "v0.52.x", "branch": "refs/heads/release/v0.52.x", "platforms": ["linux/amd64", "linux/arm64"], "update_modules": false, "tests": {"enabled": true, "command": "make init-simapp && simd start"}}], "platforms": ["linux/amd64", "linux/arm64"]}, {"name": "ibc-go", "repository": "cosmos/ibc-go", "path": "simapp", "branch": "main", "update_modules": true, "build_command": "make build", "build_artifacts": true, "tags": [{"name": "main", "platforms": ["linux/amd64", "linux/arm64"], "branch": "main", "update_modules": true, "tests": {"enabled": true, "command": "make init-simapp && simd start"}}], "platforms": ["linux/amd64", "linux/arm64"]}, {"name": "cosmos-sdk-comet", "repository": "cosmos/cosmos-sdk", "path": "simapp", "branch": "main", "update_modules": false, "build_command": "make install", "build_artifacts": true, "tags": [{"name": "main", "platforms": ["linux/amd64", "linux/arm64"], "branch": "main", "update_modules": false, "tests": {"enabled": true, "command": "make init-simapp && simd start"}}], "platforms": ["linux/amd64", "linux/arm64"]}], "appsPlatforms": [{"name": "cosmos-sdk", "repository": "cosmos/cosmos-sdk", "path": "simapp", "branch": "main", "platform": "linux/amd64", "target_os": "linux", "target_arch": "amd64", "channel": "main", "label_type": "org.opencontainers.image", "dockerfile": "./apps/cosmos-sdk/Dockerfile", "context": "./apps/cosmos-sdk", "goss_config": "./apps/cosmos-sdk/ci/goss.yaml", "goss_args": "", "tests_enabled": true, "tests_command": "make init-simapp && simd start", "build_command": "make install", "build_artifacts": true, "update_modules": true}, {"name": "cosmos-sdk", "repository": "cosmos/cosmos-sdk", "path": "simapp", "branch": "main", "platform": "linux/arm64", "target_os": "linux", "target_arch": "arm64", "channel": "main", "label_type": "org.opencontainers.image", "dockerfile": "./apps/cosmos-sdk/Dockerfile", "context": "./apps/cosmos-sdk", "goss_config": "./apps/cosmos-sdk/ci/goss.yaml", "goss_args": "", "tests_enabled": false, "tests_command": "make init-simapp && simd start", "build_command": "make install", "build_artifacts": true, "update_modules": true}, {"name": "cosmos-sdk", "repository": "cosmos/cosmos-sdk", "path": "simapp", "branch": "refs/heads/release/v0.50.x", "platform": "linux/amd64", "target_os": "linux", "target_arch": "amd64", "channel": "v0.50.x", "label_type": "org.opencontainers.image", "dockerfile": "./apps/cosmos-sdk/Dockerfile", "context": "./apps/cosmos-sdk", "goss_config": "./apps/cosmos-sdk/ci/goss.yaml", "goss_args": "", "tests_enabled": true, "tests_command": "make init-simapp && simd start", "build_command": "make install", "build_artifacts": true, "update_modules": true}, {"name": "cosmos-sdk", "repository": "cosmos/cosmos-sdk", "path": "simapp", "branch": "refs/heads/release/v0.50.x", "platform": "linux/arm64", "target_os": "linux", "target_arch": "arm64", "channel": "v0.50.x", "label_type": "org.opencontainers.image", "dockerfile": "./apps/cosmos-sdk/Dockerfile", "context": "./apps/cosmos-sdk", "goss_config": "./apps/cosmos-sdk/ci/goss.yaml", "goss_args": "", "tests_enabled": false, "tests_command": "make init-simapp && simd start", "build_command": "make install", "build_artifacts": true, "update_modules": true}, {"name": "cosmos-sdk", "repository": "cosmos/cosmos-sdk", "path": "simapp", "branch": "refs/heads/release/v0.52.x", "platform": "linux/amd64", "target_os": "linux", "target_arch": "amd64", "channel": "v0.52.x", "label_type": "org.opencontainers.image", "dockerfile": "./apps/cosmos-sdk/Dockerfile", "context": "./apps/cosmos-sdk", "goss_config": "./apps/cosmos-sdk/ci/goss.yaml", "goss_args": "", "tests_enabled": true, "tests_command": "make init-simapp && simd start", "build_command": "make install", "build_artifacts": true, "update_modules": false}, {"name": "cosmos-sdk", "repository": "cosmos/cosmos-sdk", "path": "simapp", "branch": "refs/heads/release/v0.52.x", "platform": "linux/arm64", "target_os": "linux", "target_arch": "arm64", "channel": "v0.52.x", "label_type": "org.opencontainers.image", "dockerfile": "./apps/cosmos-sdk/Dockerfile", "context": "./apps/cosmos-sdk", "goss_config": "./apps/cosmos-sdk/ci/goss.yaml", "goss_args": "", "tests_enabled": false, "tests_command": "make init-simapp && simd start", "build_command": "make install", "build_artifacts": true, "update_modules": false}, {"name": "ibc-go", "repository": "cosmos/ibc-go", "path": "simapp", "branch": "main", "platform": "linux/amd64", "target_os": "linux", "target_arch": "amd64", "channel": "main", "label_type": "org.opencontainers.image", "dockerfile": "./apps/ibc-go/Dockerfile", "context": "./apps/ibc-go", "goss_config": "./apps/ibc-go/ci/goss.yaml", "goss_args": "", "tests_enabled": true, "tests_command": "make init-simapp && simd start", "build_command": "make build", "build_artifacts": true, "update_modules": true}, {"name": "ibc-go", "repository": "cosmos/ibc-go", "path": "simapp", "branch": "main", "platform": "linux/arm64", "target_os": "linux", "target_arch": "arm64", "channel": "main", "label_type": "org.opencontainers.image", "dockerfile": "./apps/ibc-go/Dockerfile", "context": "./apps/ibc-go", "goss_config": "./apps/ibc-go/ci/goss.yaml", "goss_args": "", "tests_enabled": false, "tests_command": "make init-simapp && simd start", "build_command": "make build", "build_artifacts": true, "update_modules": true}, {"name": "cosmos-sdk-comet", "repository": "cosmos/cosmos-sdk", "path": "simapp", "branch": "main", "platform": "linux/amd64", "target_os": "linux", "target_arch": "amd64", "channel": "main", "label_type": "org.opencontainers.image", "dockerfile": "./apps/cosmos-sdk-comet/Dockerfile", "context": "./apps/cosmos-sdk-comet", "goss_config": "./apps/cosmos-sdk-comet/ci/goss.yaml", "goss_args": "", "tests_enabled": true, "tests_command": "make init-simapp && simd start", "build_command": "make install", "build_artifacts": true, "update_modules": false}, {"name": "cosmos-sdk-comet", "repository": "cosmos/cosmos-sdk", "path": "simapp", "branch": "main", "platform": "linux/arm64", "target_os": "linux", "target_arch": "arm64", "channel": "main", "label_type": "org.opencontainers.image", "dockerfile": "./apps/cosmos-sdk-comet/Dockerfile", "context": "./apps/cosmos-sdk-comet", "goss_config": "./apps/cosmos-sdk-comet/ci/goss.yaml", "goss_args": "", "tests_enabled": false, "tests_command": "make init-simapp && simd start", "build_command": "make install", "build_artifacts": true, "update_modules": false}]}