Skip to content
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
82 changes: 82 additions & 0 deletions .github/workflows/deploy-profiling.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: deploy-profiling
on:
workflow_dispatch:
inputs:
tag:
description: 'Tag suffix for the profiling image (e.g., "profiling" or "profiling-v1.2.3")'
required: false
default: 'profiling'

jobs:
deploy-profiling:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
# Without this the fetch depth defaults to 1, which only includes the most recent commit. We want to know the full history so that `git describe` can give more information when it is invoked in the orderbook's crate build script.
fetch-depth: '0'
persist-credentials: false

- uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set image tag
id: tag
run: |
if [ -n "${{ github.event.inputs.tag }}" ]; then
echo "tag=${{ github.event.inputs.tag }}" >> $GITHUB_OUTPUT
else
echo "tag=profiling" >> $GITHUB_OUTPUT
fi
echo "sha_tag=profiling-${GITHUB_SHA::7}" >> $GITHUB_OUTPUT

- name: Profiling services image metadata
id: meta_services
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=raw,value=${{ steps.tag.outputs.tag }}
type=raw,value=${{ steps.tag.outputs.sha_tag }}
labels: |
org.opencontainers.image.licenses=GPL-3.0-or-later
org.opencontainers.image.description=CoW Protocol Services with jemalloc profiling enabled

- name: Profiling services image build
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
with:
context: .
file: Dockerfile
push: true
tags: ${{ steps.meta_services.outputs.tags }}
labels: ${{ steps.meta_services.outputs.labels }}
build-args: |
CARGO_BUILD_FEATURES=--features jemalloc-profiling

- name: Profiling migration image metadata
id: meta_migration
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804 # v5.7.0
with:
images: ghcr.io/${{ github.repository }}-migration
tags: |
type=raw,value=${{ steps.tag.outputs.tag }}
type=raw,value=${{ steps.tag.outputs.sha_tag }}
labels: |
org.opencontainers.image.licenses=GPL-3.0-or-later

- name: Profiling migration image build
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
with:
context: .
file: Dockerfile
target: migrations
push: true
tags: ${{ steps.meta_migration.outputs.tags }}
labels: ${{ steps.meta_migration.outputs.labels }}
117 changes: 103 additions & 14 deletions Cargo.lock

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

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ derivative = "2.2.0"
derive_more = { version = "1.0.0", features = ["full"] }
ethcontract = { git = "https://github.com/cowprotocol/ethcontract-rs", rev = "8e112a88988040cde6110379ee6d1be768a13244", default-features = false, features = ["aws-kms"] }
mimalloc = "0.1.43"
tikv-jemallocator = { version = "0.6", features = ["unprefixed_malloc_on_supported_platforms", "profiling"] }
jemalloc_pprof = { version = "0.8", features = ["symbolize"] }
ethcontract-generate = { git = "https://github.com/cowprotocol/ethcontract-rs", rev = "8e112a88988040cde6110379ee6d1be768a13244", default-features = false }
ethcontract-mock = { git = "https://github.com/cowprotocol/ethcontract-rs", rev = "8e112a88988040cde6110379ee6d1be768a13244", default-features = false }
ethereum-types = "0.14.1"
Expand Down
Loading
Loading