Skip to content

Commit 9013e9e

Browse files
committed
remove macOS static build support and use scratch
1 parent e6d068e commit 9013e9e

File tree

4 files changed

+11
-32
lines changed

4 files changed

+11
-32
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -52,28 +52,6 @@ jobs:
5252
run: |
5353
./build-ffmpeg --cleanup
5454
55-
build-macos-static:
56-
name: full static build in native macOS
57-
runs-on: macos-10.15
58-
steps:
59-
- name: Checkout code
60-
uses: actions/checkout@v2
61-
62-
- name: build ffmpeg
63-
run: |
64-
while sleep 300; do echo "=====[ $SECONDS seconds still running ]====="; done &
65-
SKIPINSTALL=yes VERBOSE=yes ./build-ffmpeg --build --full-static
66-
kill %1
67-
- name: check shared library
68-
run: |
69-
otool -L ./workspace/bin/ffmpeg
70-
- name: test run ffmepg
71-
run: |
72-
./workspace/bin/ffmpeg -buildconf
73-
- name: clean up
74-
run: |
75-
./build-ffmpeg --cleanup
76-
7755
build-docker:
7856
name: build in docker
7957
runs-on: ubuntu-20.04
@@ -131,12 +109,10 @@ jobs:
131109
id: cuda_ubuntu_centos_pull
132110
run: |
133111
docker pull nvidia/cuda:11.1-devel-ubuntu20.04
134-
docker pull centos:8
135112
- name: run if cuda_ubuntu_centos_pull failed
136113
if: failure() && steps.cuda_ubuntu_centos_pull.outcome == 'failure'
137114
run: |
138115
docker pull nvidia/cuda:11.1-devel-ubuntu20.04
139-
docker pull centos:8
140116
- name: build ffmpeg
141117
run: |
142118
docker build -t ffmpeg:cuda-static -f full-static.dockerfile .

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ Options:
126126
--version Display version information
127127
-b, --build Starts the build process
128128
-c, --cleanup Remove all working dirs
129-
-f, --full-static Complete static build of ffmpeg (eg. glibc, pthreads etc...) **not recommend**
129+
-f, --full-static Complete static build of ffmpeg (eg. glibc, pthreads etc...) **only Linux**
130130
Note: Because of the NSS (Name Service Switch), glibc does not recommend static links.
131131
```
132132

build-ffmpeg

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# https://github.com/markus-perl/ffmpeg-build-script
44

55
PROGNAME=$(basename "$0")
6-
VERSION=1.18
6+
VERSION=1.19
77
CWD=$(pwd)
88
PACKAGES="$CWD/packages"
99
WORKSPACE="$CWD/workspace"
@@ -150,7 +150,7 @@ usage () {
150150
echo " --version Display version information"
151151
echo " -b, --build Starts the build process"
152152
echo " -c, --cleanup Remove all working dirs"
153-
echo " -f, --full-static Complete static build of ffmpeg (eg. glibc, pthreads etc...) **not recommend**"
153+
echo " -f, --full-static Complete static build of ffmpeg (eg. glibc, pthreads etc...) **only Linux**"
154154
echo " Note: Because of the NSS (Name Service Switch), glibc does not recommend static links."
155155
echo ""
156156
}
@@ -174,6 +174,10 @@ while (( $# > 0 )); do
174174
cleanup
175175
fi
176176
if [[ "$1" == "--full-static" || "$1" =~ 'f' ]]; then
177+
if [[ "$OSTYPE" == "darwin"* ]]; then
178+
echo "Error: full-static mode is available only Linux."
179+
exit 1
180+
fi
177181
LDEXEFLAGS="-static"
178182
fi
179183
shift

full-static.dockerfile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,14 @@ RUN apt-get update \
1010
WORKDIR /app
1111
COPY ./build-ffmpeg /app/build-ffmpeg
1212

13-
RUN SKIPINSTALL=yes /app/build-ffmpeg --build --full-static
13+
RUN AUTOINSTALL=yes /app/build-ffmpeg --build --full-static
14+
RUN ldd /app/workspace/bin/ffmpeg ; exit 0
15+
RUN ldd /app/workspace/bin/ffprobe ; exit 0
1416

15-
FROM centos:8
17+
FROM scratch
1618

1719
COPY --from=build /app/workspace/bin/ffmpeg /usr/bin/ffmpeg
1820
COPY --from=build /app/workspace/bin/ffprobe /usr/bin/ffprobe
1921

20-
RUN ldd /usr/bin/ffmpeg ; exit 0
21-
RUN ldd /usr/bin/ffprobe ; exit 0
22-
2322
CMD ["--help"]
2423
ENTRYPOINT ["/usr/bin/ffmpeg"]

0 commit comments

Comments
 (0)