Skip to content

Commit d4f71e5

Browse files
committed
Attempt to re-enable jemalloc on linux x86_64.
1 parent ce556e1 commit d4f71e5

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

.github/workflows/build-all.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ jobs:
3232
container: fossa/haskell-static-alpine:ghc-9.8.2
3333
project-file: cabal.project.ci.linux
3434
ghc: '9.8.2'
35+
# Non-Linux environments generally don't need `jemalloc`
36+
# and in particular Windows doesn't support it
37+
rust-features: jemalloc
3538

3639
# macos-latest pointed at macos-12 this before it was changed to ARM.
3740
- os: macos-12
@@ -70,7 +73,7 @@ jobs:
7073
ghc-version: ${{ matrix.ghc }}
7174
cabal-version: '3.10.3.0'
7275

73-
# Set up Rust, this is mainly used for rust-cache.
76+
# Set up Rust.
7477
# This action installs the 'minimal' profile.
7578
# Even on Linux ARM this is necessary because rust-cache uses it.
7679
- uses: dtolnay/rust-toolchain@stable
@@ -97,17 +100,12 @@ jobs:
97100
# Linux builds are run in Alpine, which builds them statically;
98101
# using jemalloc reduces the performance impact of this
99102
# over the default libc allocator (which performs very poorly in static builds).
100-
- name: Build Rust dependencies (Linux)
101-
if: ${{ matrix.os-name == 'Linux' }}
103+
- name: Build Rust dependencies
104+
if: ${{ matrix.os != 'LinuxARM' }}
105+
env:
106+
RUST_FEATURES: ${{ matrix.rust-features }}
102107
run: |
103-
cargo build --features jemalloc --release
104-
105-
# Non-Linux environments generally don't need `jemalloc`
106-
# and in particular Windows doesn't support it.
107-
# This purposely excludes the linux arm build.
108-
- name: Build Rust dependencies (non-Linux)
109-
if: ${{ ! contains(matrix.os-name, 'linux') }}
110-
run: cargo build --release
108+
cargo build ${RUST_FEATURES:+--features $RUST_FEATURES} --release
111109
112110
# Run tests in release mode to reduce the need for rebuilds.
113111
- name: Test Rust dependencies

0 commit comments

Comments
 (0)