Skip to content

Commit c4fa072

Browse files
duhowSuperDisk
authored andcommitted
use make with multiple jobs
1 parent 1d42d4d commit c4fa072

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.github/scripts/build-ffmpeg.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,14 @@ pushd lame-3.100
66
./configure --prefix="`realpath ..`/lame-install" --disable-dependency-tracking \
77
--enable-static --disable-shared --enable-nasm --disable-gtktest \
88
--disable-decoder --disable-frontend
9-
make
9+
10+
if [ "$(uname)" = "Darwin" ]; then
11+
JOBS=$(sysctl -n hw.ncpu)
12+
else
13+
JOBS=$(nproc)
14+
fi
15+
16+
make -j${JOBS}
1017
make install
1118
popd
1219

@@ -28,4 +35,4 @@ fi
2835
--enable-muxer=wav --enable-libmp3lame --enable-encoder=libmp3lame --enable-muxer=mp3 \
2936
--extra-cflags="-I`realpath ../lame-install/include`" \
3037
--extra-ldflags="-L`realpath ../lame-install/lib`"
31-
make
38+
make -j${JOBS}

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
--disable-power --disable-hidapi --disable-sensor --disable-filesystem \
6363
--disable-timers --disable-atomic --disable-file --disable-misc \
6464
--disable-locale --disable-loadso --disable-cpuinfo
65-
make
65+
make -j$(sysctl -n hw.ncpu)
6666
cp build/.libs/libSDL2.a /usr/local/lib
6767
popd
6868

0 commit comments

Comments
 (0)