Skip to content

Commit

Permalink
separate workflow file for tokio console builds
Browse files Browse the repository at this point in the history
  • Loading branch information
jstuczyn committed Oct 15, 2024
1 parent e91f002 commit 4c7864f
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Build Nym-Api (temp/memory-profiling) + TOKIO CONSOLE

on:
workflow_dispatch:
inputs:
enable_jemalloc:
description: "True to enable jemalloc allocator"
required: false
default: true
type: boolean


jobs:
publish-nym:
strategy:
fail-fast: false
matrix:
platform: [ubuntu-22.04-16-core]
runs-on: ${{ matrix.platform }}
env:
RUSTFLAGS: "--cfg tokio_unstable"

steps:
- uses: actions/checkout@v3

- name: Install Dependencies (Linux)
run: sudo apt-get update && sudo apt-get -y install ripgrep libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libudev-dev squashfs-tools libjemalloc-dev
continue-on-error: true

- name: Check out repository code
uses: actions/checkout@v4
with:
repository: nymtech/nym
ref: temp/memory-profiling

- name: Install Rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: Maybe build nym-api with jemalloc
uses: actions-rs/cargo@v1
with:
command: build
args: --bin nym-api --release --features=memory-prof
if: github.event_name == 'workflow_dispatch' && inputs.enable_jemalloc == true

- name: Maybe build nym-api WITHOUT jemalloc
uses: actions-rs/cargo@v1
with:
command: build
args: --bin nym-api --release
if: github.event_name == 'workflow_dispatch' && inputs.enable_jemalloc == false

- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: my-artifact
path: |
target/release/nym-api
retention-days: 30
12 changes: 1 addition & 11 deletions .github/workflows/temp-build-nym-api-aero-mem-prof.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
name: Build Nym-Api (temp/memory-profiling)
name: Build Nym-Api (temp/memory-profiling) NO TOKIO CONSOLE

on:
workflow_dispatch:
inputs:
add_tokio_unstable:
description: 'True build RUSTFLAGS="--cfg tokio_unstable"'
required: true
default: false
type: boolean
enable_jemalloc:
description: "True to enable jemalloc allocator"
required: false
Expand Down Expand Up @@ -41,11 +36,6 @@ jobs:
with:
toolchain: stable

- name: Sets env vars for tokio if set in manual dispatch inputs
run: |
echo "RUSTFLAGS='--cfg tokio_unstable'" >> $GITHUB_ENV
if: github.event_name == 'workflow_dispatch' && inputs.add_tokio_unstable == true

- name: Maybe build nym-api with jemalloc
uses: actions-rs/cargo@v1
with:
Expand Down

0 comments on commit 4c7864f

Please sign in to comment.