-
Notifications
You must be signed in to change notification settings - Fork 7
115 lines (98 loc) · 2.98 KB
/
jemalloc.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
on:
workflow_dispatch:
push:
branches:
- '**'
- '!main'
paths:
- misc/jemalloc/version
- .github/workflows/jemalloc.yml
name: Jemalloc
jobs:
version:
name: Version
timeout-minutes: 10
runs-on: ubuntu-latest
outputs:
version: ${{ steps.jemalloc-version.outputs.version }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Export jemalloc Version
id: jemalloc-version
run: cat misc/jemalloc/version | awk '{$1=$1};1' | { read version; echo "::set-output name=version::${version}"; }
build:
name: Build
timeout-minutes: 10
strategy:
matrix:
include:
- alias: linux
os: ubuntu-latest
runs-on: ${{ matrix.os }}
needs: version
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Checkout Jemalloc code
uses: actions/checkout@v4
with:
repository: jemalloc/jemalloc
ref: ${{needs.version.outputs.version}}
path: tmp
- name: Build Jemalloc
working-directory: tmp
run: |
autoconf
./configure --with-jemalloc-prefix='je_' --with-malloc-conf='background_thread:true,metadata_thp:auto,dirty_decay_ms:10000,muzzy_decay_ms:10000'
make build_lib_static
- name: Update lib
run: |
mkdir -p misc/jemalloc/lib/x86-64-${{ matrix.alias }}
cp tmp/lib/libjemalloc.a misc/jemalloc/lib/x86-64-${{ matrix.alias }}/
- name: Remove Jemalloc temporary folder
run: rm -Rf tmp
- name: Commit updated library
run: |
if [ -n "$(git status --porcelain)" ]; then
git config user.email "no-reply@github.com"
git config user.name "GitHub Actions"
git add .
git commit -am 'Update Jemalloc library for ${{ matrix.alias }}'
git pull --rebase
git push
fi
header:
name: Header
runs-on: ubuntu-latest
needs: version
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Checkout Jemalloc code
uses: actions/checkout@v2
with:
repository: jemalloc/jemalloc
ref: ${{needs.version.outputs.version}}
path: tmp
- name: Build headers
working-directory: tmp
run: |
autoconf
./configure --with-jemalloc-prefix='je_'
- name: Update headers
run: |
rm -Rf misc/jemalloc/include/jemalloc
cp -R tmp/include/jemalloc misc/jemalloc/include/
- name: Remove Jemalloc temporary folder
run: rm -Rf tmp
- name: Commit updated headers
run: |
if [ -n "$(git status --porcelain)" ]; then
git config user.email "no-reply@github.com"
git config user.name "GitHub Actions"
git add .
git commit -am 'Update Jemalloc headers'
git pull --rebase
git push
fi