2323 - i686-pc-windows-msvc
2424 - aarch64-pc-windows-msvc
2525 - aarch64-apple-darwin
26+ allocator : [null]
2627 include :
2728 - target : x86_64-unknown-linux-musl
2829 os : ubuntu-latest
4546 - target : aarch64-apple-darwin
4647 os : macos-latest
4748 name : rnacos-aarch64-apple-darwin-${GITHUB_REF#refs/*/}.tar.gz
49+ - target : x86_64-unknown-linux-musl
50+ allocator : mimalloc
51+ os : ubuntu-latest
52+ name : rnacos-x86_64-unknown-linux-musl-mimalloc-${GITHUB_REF#refs/*/}.tar.gz
4853 runs-on : ${{ matrix.os }}
4954 steps :
5055 # Largely inspired by https://github.com/starship/starship/blob/35a0a20f5c4fea6a08e1b91ff631b089eef8fc50/.github/workflows/deploy.yml
@@ -65,14 +70,20 @@ jobs:
6570 brew install gnu-tar
6671 echo "/usr/local/opt/gnu-tar/libexec/gnubin" >> $GITHUB_PATH
6772
68- - name : Build
69- if : matrix.target != 'x86_64-unknown-linux-musl'
70- run : cargo build --release
73+ - name : Build (default allocator)
74+ if : matrix.allocator != 'mimalloc'
75+ run : |
76+ if [ "${{ matrix.target }}" = "x86_64-unknown-linux-musl" ]; then
77+ cargo build --release --target ${{ matrix.target }}
78+ else
79+ cargo build --release
80+ fi
7181
72- - name : Build linux-musl
73- if : matrix.target == 'x86_64-unknown-linux-musl '
82+ - name : Build with mimalloc
83+ if : matrix.allocator == 'mimalloc '
7484 run : |
75- cargo build --release --target ${{ matrix.target }}
85+ cargo build --release --target ${{ matrix.target }} --features mimalloc
86+
7687 - name : Archive binary (windows)
7788 if : matrix.os == 'windows-latest'
7889 run : |
@@ -118,6 +129,11 @@ jobs:
118129 image : " rust-musl-cross:aarch64-musl"
119130 compatibility : " manylinux2014 musllinux_1_1"
120131 name : rnacos-aarch64-unknown-linux-musl-${GITHUB_REF#refs/*/}.tar.gz
132+ allocator : " "
133+ - target : " aarch64-unknown-linux-musl"
134+ image : " rust-musl-cross:aarch64-musl"
135+ name : rnacos-aarch64-unknown-linux-musl-mimalloc-${GITHUB_REF#refs/*/}.tar.gz
136+ allocator : " mimalloc"
121137 container :
122138 image : docker://ghcr.io/rust-cross/${{ matrix.platform.image }}
123139 env :
@@ -127,9 +143,15 @@ jobs:
127143 - uses : actions/checkout@v4
128144 - run : rustup target add --toolchain stable ${{ matrix.platform.target }}
129145 if : matrix.platform.target != 'powerpc64le-unknown-linux-musl' && matrix.platform.target != 's390x-unknown-linux-gnu'
130- - name : Build
146+ - name : Build default
147+ if : matrix.platform.allocator != 'mimalloc'
131148 run : |
132149 cargo build --release --target ${{ matrix.platform.target }}
150+
151+ - name : Build with mimalloc
152+ if : matrix.platform.allocator == 'mimalloc'
153+ run : |
154+ cargo build --release --target ${{ matrix.platform.target }} --features mimalloc
133155 - name : Archive binary
134156 run : |
135157 cp doc/conf/.env.example target/${{ matrix.platform.target }}/release/.env
0 commit comments