Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit 5873407

Browse files
authored
Enable Github Actions to build with Linux and MacOS (#3)
1 parent 88b3eea commit 5873407

File tree

3 files changed

+62
-0
lines changed

3 files changed

+62
-0
lines changed

.github/workflows/main.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Pt.1 Build with GCC
2+
# Controls when the action will run. Triggers the workflow on push or pull request
3+
# events but only for the master branch
4+
on:
5+
push:
6+
branches: [ n4.3.1-p1-ci ]
7+
pull_request:
8+
branches: [ n4.3.1-p1-ci ]
9+
10+
jobs:
11+
linux-build_with_docker:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Build FFMpeg
16+
shell: bash
17+
run: |
18+
bash build-with-docker.sh
19+
- uses: actions/upload-artifact@master
20+
with:
21+
name: ffmpeg-linux
22+
path: ffmpeg
23+
macos-build:
24+
runs-on: macos-latest
25+
steps:
26+
- uses: actions/checkout@v2
27+
- name: Build FFMpeg
28+
shell: bash
29+
run: |
30+
# Make sure to use gcc-8 instead of the default gcc
31+
shopt -s expand_aliases
32+
alias gcc='gcc-8'
33+
bash build.sh
34+
- uses: actions/upload-artifact@master
35+
with:
36+
name: ffmpeg-macos
37+
path: ffmpeg
38+
# Not working with error messsage:
39+
# C:\ProgramData\Chocolatey\lib\mingw\tools\install\mingw64\x86_64-w64-mingw32\bin\ar.exe: libavfilter/vsink_null: No such file or directory
40+
# windows-build:
41+
# runs-on: windows-latest
42+
# steps:
43+
# - uses: actions/checkout@v2
44+
# - name: Build FFMpeg
45+
# shell: bash
46+
# run: |
47+
# bash build.sh

build-with-docker.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash -x
2+
3+
FLAGS=""
4+
# Attach TTY only when available, this is for running in Gihub Actions
5+
if [ -t 1 ]; then FLAGS="-it"; fi
6+
7+
docker pull gcc:8
8+
docker run $FLAGS \
9+
-v $PWD:/usr/src \
10+
gcc:8 \
11+
sh -c 'cd /usr/src && bash ./build.sh'

build.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
3+
./configure --disable-x86asm
4+
make -j

0 commit comments

Comments
 (0)