Skip to content

Update Jemalloc library for linux #22

Update Jemalloc library for linux

Update Jemalloc library for linux #22

Workflow file for this run

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