Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buildscripts/automake for GitHub actions #51

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.sh -crlf
*.ac -crlf
*.am -crlf
44 changes: 44 additions & 0 deletions .github/workflows/automake-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Automake CI

on:
push:
pull_request:
branches: [ "master" ]

jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- name: check dependencies
run: |
if [[ "${{ matrix.os}}" == "macos-latest" ]]; then
brew install automake autoconf libtool
else
sudo apt-get update
sudo apt-get install autoconf libtool build-essential
fi
- name: autoreconf
run: |
autoupdate -f
autoreconf -i -f
- name: configure
run: ./configure
- name: make
run: make
- name: make check
run: make check
- name: make distcheck
run: make distcheck
- name: test
run: |
./h264_analyze samples/JM_cqm_cabac.264 > tmp1.out
diff -u samples/JM_cqm_cabac.out tmp1.out
./h264_analyze samples/x264_test.264 > tmp2.out
diff -u samples/x264_test.out tmp2.out
./h264_analyze samples/riverbed-II-360p-48961.264 > tmp3.out
diff -u samples/riverbed-II-360p-48961.out tmp3.out
1 change: 1 addition & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ pkginclude_HEADERS = h264_stream.h h264_sei.h h264_avcc.h bs.h

clean-local:
rm -rf *.pc
rm -f libh264bitstream-uninstalled.sh libh264bitstream.pc.in

pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libh264bitstream.pc
1 change: 1 addition & 0 deletions Makefile.unix
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ libh264bitstream.a: h264_stream.c h264_nal.c h264_stream.h h264_slice_data.c h26

clean:
rm -f *.o libh264bitstream.a $(BINARIES)
rm -f libh264bitstream-uninstalled.sh libh264bitstream.pc.in

dox: h264_stream.c h264_stream.h bs.h Doxyfile
doxygen Doxyfile
Expand Down
13 changes: 7 additions & 6 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AC_INIT(h264bitstream, 0.2.0, [email protected])
AC_INIT([h264bitstream],[0.2.0],[[email protected]])

AC_CONFIG_SRCDIR(./h264_stream.c)

Expand All @@ -11,9 +11,9 @@ AC_CANONICAL_TARGET
EXTRA_CFLAGS='-std=c99 -Wno-error'

if test ${target_os%%.*} = darwin9; then
EXTRA_CFLAGS="-force_cpusubtype_ALL -mmacosx-version-min=10.4 -arch i386 -arch ppc -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.4u.sdk"
CFLAGS+=${EXTRA_CFLAGS}
am_cv_CC_dependencies_compiler_type=gcc
EXTRA_CFLAGS="-force_cpusubtype_ALL -mmacosx-version-min=10.4 -arch i386 -arch ppc -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.4u.sdk"
CFLAGS+=${EXTRA_CFLAGS}
am_cv_CC_dependencies_compiler_type=gcc
fi


Expand All @@ -23,9 +23,10 @@ AM_INIT_AUTOMAKE([foreign])

AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_LD
AC_PROG_INSTALL
AC_PROG_LIBTOOL

LT_INIT
LT_PATH_LD

AC_CHECK_FUNCS(getopt_long, , AC_MSG_WARN(getopt_long not found. Long options will not work.) )

Expand Down