Skip to content

Commit

Permalink
Merge branch 'v1.3-dev' into feat/abci-req-resp-dump
Browse files Browse the repository at this point in the history
  • Loading branch information
lklimek authored Sep 5, 2024
2 parents 6d7ce5a + 7f350a6 commit aa5a291
Show file tree
Hide file tree
Showing 57 changed files with 1,459 additions and 138 deletions.
11 changes: 11 additions & 0 deletions .cargo/config-release.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This is a config file used by Docker build process when building release version of drive-abci.
# Hopefully it can be removed once profile-rustflags is stabilized, see https://github.com/rust-lang/cargo/issues/10271

[target.aarch64-unknown-linux-musl]
rustflags = ["-C", "target-feature=-crt-static"]

[target.x86_64-unknown-linux-musl]
rustflags = ["-C", "target-feature=-crt-static"]

[target.aarch64-unknown-linux-gnu]
linker = "aarch64-linux-gnu-gcc"
47 changes: 21 additions & 26 deletions .github/workflows/release-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,16 @@ on:
type: string
description: Image target. i.e. drive-abci, dapi
required: true
tag:
type: string
description: Image tag, i.e. v0.1.0; note it can be inherited from 'workflow_dispatch' event
default: ${{ github.event.inputs.tag || github.event.release.tag_name }}
cargo_profile:
type: string
description: Cargo profile. i.e. release, dev
default: release
env:
DIGEST_NAME: digests-${{ inputs.image_org }}-${{ inputs.image_name }}-${{ github.sha }}
DIGEST_NAME: digests-${{ inputs.image_org }}-${{ inputs.image_name }}-${{ inputs.tag }}-${{ inputs.cargo_profile }}-${{ github.sha }}
DIGEST_DIR_PATH: /tmp/digests

jobs:
Expand All @@ -29,9 +37,9 @@ jobs:
strategy:
matrix:
include:
- runner: [ "self-hosted", "linux", "x64", "ubuntu-platform" ]
- runner: ["self-hosted", "linux", "x64", "ubuntu-platform"]
platform: linux/amd64
- runner: [ "self-hosted", "linux", "arm64", "ubuntu-platform" ]
- runner: ["self-hosted", "linux", "arm64", "ubuntu-platform"]
platform: linux/arm64
steps:
- name: Check out repo
Expand All @@ -52,10 +60,10 @@ jobs:
with:
image_name: ${{ inputs.image_name }}
image_org: ${{ inputs.image_org }}
image_version: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || github.event.release.tag_name }}
image_version: ${{ inputs.tag }}
target: ${{ inputs.target }}
platform: ${{ matrix.platform }}
cargo_profile: release
cargo_profile: ${{ inputs.cargo_profile }}
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
region: ${{ secrets.AWS_REGION }}
Expand Down Expand Up @@ -92,29 +100,17 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Get image version
uses: actions/github-script@v6
id: version
with:
result-encoding: string
script: |
return (
context.eventName === 'workflow_dispatch'
? '${{ github.event.inputs.tag }}'
: context.payload.release.tag_name
);
- name: Set suffix
uses: actions/github-script@v6
id: suffix
with:
result-encoding: string
script: |
const fullTag = '${{ steps.version.outputs.result }}';
const fullTag = '${{ inputs.tag }}';
if (fullTag.includes('-')) {
const [, fullSuffix] = fullTag.split('-');
const [suffix] = fullSuffix.split('.');
return `-${suffix}`;
const suffixes = fullTag.split('-').slice(1);
const firstElements = suffixes.map(suffix => suffix.split('.')[0]);
return `-${firstElements.join('-')}`;
} else {
return '';
}
Expand All @@ -125,10 +121,10 @@ jobs:
with:
images: ${{ inputs.image_org }}/${{ inputs.image_name }}
tags: |
type=match,pattern=v(\d+),group=1,value=${{ steps.version.outputs.result }}
type=match,pattern=v(\d+.\d+),group=1,value=${{ steps.version.outputs.result }}
type=match,pattern=v(\d+.\d+.\d+),group=1,value=${{ steps.version.outputs.result }}
type=match,pattern=v(.*),group=1,value=${{ steps.version.outputs.result }},suffix=
type=match,pattern=v(.*),group=1,value=${{ inputs.tag }},priority=910,suffix=
type=match,pattern=v(\d+),group=1,value=${{ inputs.tag }}
type=match,pattern=v(\d+.\d+),group=1,value=${{ inputs.tag }}
type=match,pattern=v(\d+.\d+.\d+),group=1,value=${{ inputs.tag }}
flavor: |
suffix=${{ steps.suffix.outputs.result }},onlatest=true
latest=${{ github.event_name == 'release' }}
Expand All @@ -138,7 +134,6 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Create manifest list and push
working-directory: ${{ env.DIGEST_DIR_PATH }}
run: |
Expand Down
37 changes: 33 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
tag:
description: "Version (i.e. v0.22.3-pre.2)"
required: true
only_drive:
type: boolean
description: Only build Drive image
default: false

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -17,7 +21,7 @@ concurrency:
jobs:
release-npm:
name: Release NPM packages
runs-on: [ "self-hosted", "linux", "arm64", "ubuntu-platform" ]
runs-on: ["self-hosted", "linux", "arm64", "ubuntu-platform"]
timeout-minutes: 15
if: github.event_name != 'workflow_dispatch'
steps:
Expand Down Expand Up @@ -81,7 +85,7 @@ jobs:
with:
result-encoding: string
script: |
const fullTag = context.payload.release.tag_name;
const fullTag = "${{ inputs.tag }}" || context.payload.release.tag_name;
if (fullTag.includes('-')) {
const [, fullSuffix] = fullTag.split('-');
const [suffix] = fullSuffix.split('.');
Expand All @@ -96,10 +100,15 @@ jobs:
with:
result-encoding: string
script: |
const tag = context.payload.release.tag_name;
const tag = "${{ inputs.tag }}" || context.payload.release.tag_name;
const [, major, minor] = tag.match(/^v([0-9]+)\.([0-9]+)/);
return (tag.includes('-') ? `${major}.${minor}-${{steps.suffix.outputs.result}}` : 'latest');
- name: Show NPM release tag
run: |
echo "NPM suffix: ${{ steps.suffix.outputs.result }}"
echo "NPM release tag: ${{ steps.tag.outputs.result }}"
- name: Configure NPM auth token
run: yarn config set npmAuthToken ${{ secrets.NPM_TOKEN }}

Expand Down Expand Up @@ -136,40 +145,60 @@ jobs:
image_org: dashpay
image_name: drive
target: drive-abci
tag: ${{ inputs.tag || github.event.release.tag_name }}

release-drive-image-debug:
name: Release Drive debug image
secrets: inherit
uses: ./.github/workflows/release-docker-image.yml
with:
name: Drive
image_org: dashpay
image_name: drive
target: drive-abci
cargo_profile: dev
tag: ${{ inputs.tag || github.event.release.tag_name }}-debug

release-dapi-image:
name: Release DAPI image
if: ${{ !inputs.only_drive }}
secrets: inherit
uses: ./.github/workflows/release-docker-image.yml
with:
name: DAPI
image_org: dashpay
image_name: dapi
target: dapi
tag: ${{ inputs.tag || github.event.release.tag_name }}

release-test-suite-image:
name: Release Test Suite image
if: ${{ !inputs.only_drive }}
secrets: inherit
uses: ./.github/workflows/release-docker-image.yml
with:
name: Test Suite
image_org: dashpay
image_name: platform-test-suite
target: test-suite
tag: ${{ inputs.tag || github.event.release.tag_name }}

release-dashmate-helper-image:
name: Release Dashmate Helper image
secrets: inherit
if: ${{ !inputs.only_drive }}
uses: ./.github/workflows/release-docker-image.yml
with:
name: Dashmate Helper
image_org: dashpay
image_name: dashmate-helper
target: dashmate-helper
tag: ${{ inputs.tag || github.event.release.tag_name }}

release-dashmate-packages:
name: Release Dashmate packages
runs-on: ${{ matrix.os }}
if: ${{ !inputs.only_drive }}
needs: release-npm
permissions:
id-token: write # s3 cache
Expand All @@ -190,7 +219,7 @@ jobs:
- name: Check out repo
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-depth: 0

- name: Configure AWS credentials and bucket region
uses: aws-actions/configure-aws-credentials@v4
Expand Down
28 changes: 25 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,31 @@
## [1.2.0-rc.1](https://github.com/dashpay/platform/compare/v1.1.1...v1.2.0-rc.1) (2024-08-30)
## [1.2.0](https://github.com/dashpay/platform/compare/v1.1.1...v1.2.0) (2024-08-30)


### ⚠ BREAKING CHANGES
### Features

* **dapi:** serve even if tenderdash is not connected ([#2086](https://github.com/dashpay/platform/issues/2086))
* **dashmate:** validate SSL certificate files ([#2089](https://github.com/dashpay/platform/issues/2089))
* platform status endpoint ([#2088](https://github.com/dashpay/platform/issues/2088))
* script to check which nodes are updated to v1.1 ([#2083](https://github.com/dashpay/platform/issues/2083))


### Bug Fixes

* **dashmate:** docker-compose version is obsolete ([#2073](https://github.com/dashpay/platform/issues/2073))
* replay issue when round is 0 on replay. ([#2091](https://github.com/dashpay/platform/issues/2091))
* security vulnerability in webpack ([#2090](https://github.com/dashpay/platform/issues/2090))


### Miscellaneous Chores

* **dashmate:** update tenderdash version ([#2093](https://github.com/dashpay/platform/issues/2093))
* **dashmate:** update tenderdash version to 1.2.0 ([#2078](https://github.com/dashpay/platform/issues/2078))
* update rust to 1.80 ([#2070](https://github.com/dashpay/platform/issues/2070))



## [1.2.0-rc.1](https://github.com/dashpay/platform/compare/v1.1.1...v1.2.0-rc.1) (2024-08-30)

* replay issue when round is 0 on replay. (#2091)

### Features

Expand Down
Loading

0 comments on commit aa5a291

Please sign in to comment.