-
Notifications
You must be signed in to change notification settings - Fork 7
75 lines (62 loc) · 2.23 KB
/
temp-build-nym-api-aero-mem-prof.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Build Nym-Api (temp/memory-profiling)
on:
workflow_dispatch:
inputs:
add_tokio_unstable:
description: 'True to add RUSTFLAGS="--cfg tokio_unstable"'
required: true
default: false
type: boolean
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 }}
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: 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: TEST print env1
run: echo ${{ toJSON(env) }}
- name: TEST print env2
run: echo ${{ env.CARGO_FEATURES }}
- name: Maybe build nym-api with jemalloc
uses: actions-rs/cargo@v1
with:
command: build
args: --bin nym-api --release --features=memory-prof ${{ env.CARGO_FEATURES }}
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 ${{ env.CARGO_FEATURES }}
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