32
32
container : fossa/haskell-static-alpine:ghc-9.8.2
33
33
project-file : cabal.project.ci.linux
34
34
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
35
38
36
39
# macos-latest pointed at macos-12 this before it was changed to ARM.
37
40
- os : macos-12
70
73
ghc-version : ${{ matrix.ghc }}
71
74
cabal-version : ' 3.10.3.0'
72
75
73
- # Set up Rust, this is mainly used for rust-cache .
76
+ # Set up Rust.
74
77
# This action installs the 'minimal' profile.
75
78
# Even on Linux ARM this is necessary because rust-cache uses it.
76
79
- uses : dtolnay/rust-toolchain@stable
@@ -97,17 +100,12 @@ jobs:
97
100
# Linux builds are run in Alpine, which builds them statically;
98
101
# using jemalloc reduces the performance impact of this
99
102
# 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 }}
102
107
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
111
109
112
110
# Run tests in release mode to reduce the need for rebuilds.
113
111
- name : Test Rust dependencies
0 commit comments