初始化内容
This commit is contained in:
+134
@@ -0,0 +1,134 @@
|
||||
name: GitHub Actions
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- name: ubuntu-latest-clang-autotools
|
||||
os: ubuntu-latest
|
||||
cc: clang
|
||||
cxx: clang++
|
||||
build-system: autotools
|
||||
configure-opts: ''
|
||||
|
||||
- name: ubuntu-latest-gcc-cmake
|
||||
os: ubuntu-latest
|
||||
cc: gcc
|
||||
cxx: g++
|
||||
build-system: cmake
|
||||
configure-opts: ''
|
||||
|
||||
- name: ubuntu-latest-clang-cmake
|
||||
os: ubuntu-latest
|
||||
cc: clang
|
||||
cxx: clang++
|
||||
build-system: cmake
|
||||
configure-opts: ''
|
||||
|
||||
- name: macos-latest-clang-autotools
|
||||
os: macos-latest
|
||||
cc: clang
|
||||
cxx: clang++
|
||||
build-system: autotools
|
||||
configure-opts: ''
|
||||
|
||||
- name: macos-latest-clang-cmake
|
||||
os: macos-latest
|
||||
cc: clang
|
||||
cxx: clang++
|
||||
build-system: cmake
|
||||
configure-opts: ''
|
||||
|
||||
- name: windows-latest-cmake
|
||||
os: windows-latest
|
||||
build-system: cmake
|
||||
configure-opts: ''
|
||||
|
||||
- name: windows-latest-cmake-shared
|
||||
os: windows-latest
|
||||
build-system: cmake
|
||||
configure-opts: '-DBUILD_SHARED_LIBS=ON'
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
if: startsWith(matrix.build-system,'cmake')
|
||||
with:
|
||||
repository: xiph/ogg
|
||||
path: ./ogg
|
||||
|
||||
- name: Install MacOS dependencies
|
||||
if: startsWith(matrix.os,'macos') && !startsWith(matrix.build-system,'cmake')
|
||||
run: |
|
||||
brew update
|
||||
brew install automake pkg-config libogg
|
||||
|
||||
- name: Install Linux dependencies
|
||||
if: startsWith(matrix.os,'ubuntu')
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libtool-bin libogg-dev
|
||||
|
||||
- name: Install Windows dependencies
|
||||
if: startsWith(matrix.os,'windows')
|
||||
run: |
|
||||
choco install busybox
|
||||
|
||||
- name: Build with Autotools
|
||||
if: startsWith(matrix.build-system,'autotools')
|
||||
env:
|
||||
CC: ${{ matrix.cc }}
|
||||
CXX: ${{ matrix.cxx }}
|
||||
run: |
|
||||
./autogen.sh
|
||||
./configure ${{ matrix.configure-opts }}
|
||||
make
|
||||
make check
|
||||
|
||||
- name: Prepare CMake build directory
|
||||
if: startsWith(matrix.build-system,'cmake')
|
||||
env:
|
||||
CC: ${{ matrix.cc }}
|
||||
CXX: ${{ matrix.cxx }}
|
||||
run: mkdir cmake-build
|
||||
|
||||
- name: CMake generator
|
||||
if: startsWith(matrix.build-system,'cmake')
|
||||
env:
|
||||
CC: ${{ matrix.cc }}
|
||||
CXX: ${{ matrix.cxx }}
|
||||
working-directory: cmake-build
|
||||
run: cmake .. -DCMAKE_BUILD_TYPE=Release -DINSTALL_MANPAGES=OFF -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ${{ matrix.configure-opts }} -DCMAKE_FIND_FRAMEWORK=NEVER
|
||||
|
||||
- name: CMake build
|
||||
if: startsWith(matrix.build-system,'cmake')
|
||||
env:
|
||||
CC: ${{ matrix.cc }}
|
||||
CXX: ${{ matrix.cxx }}
|
||||
working-directory: cmake-build
|
||||
run: cmake --build . --config Release
|
||||
|
||||
- name: CMake test
|
||||
if: startsWith(matrix.build-system,'cmake')
|
||||
env:
|
||||
CC: ${{ matrix.cc }}
|
||||
CXX: ${{ matrix.cxx }}
|
||||
working-directory: cmake-build
|
||||
run: ctest -V -C Release
|
||||
|
||||
- name: Upload logs on failure
|
||||
uses: actions/upload-artifact@v2
|
||||
if: failure()
|
||||
with:
|
||||
name: flac-${{ github.sha }}-${{ github.run_id }}-logs
|
||||
path: |
|
||||
./**/*.log
|
||||
./**/out*.meta
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
name: CIFuzz
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- 1.3.x
|
||||
jobs:
|
||||
Fuzzing:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sanitizer: [address, undefined, memory]
|
||||
steps:
|
||||
- name: Build Fuzzers (${{ matrix.sanitizer }})
|
||||
id: build
|
||||
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
|
||||
with:
|
||||
oss-fuzz-project-name: 'flac'
|
||||
language: c++
|
||||
sanitizer: ${{ matrix.sanitizer }}
|
||||
- name: Run Fuzzers (${{ matrix.sanitizer }})
|
||||
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
|
||||
with:
|
||||
oss-fuzz-project-name: 'flac'
|
||||
language: c++
|
||||
fuzz-seconds: 7200
|
||||
sanitizer: ${{ matrix.sanitizer }}
|
||||
- name: Upload Crash
|
||||
uses: actions/upload-artifact@v1
|
||||
if: failure() && steps.build.outcome == 'success'
|
||||
with:
|
||||
name: ${{ matrix.sanitizer }}-artifacts
|
||||
path: ./out/artifacts
|
||||
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
name: Autotools distcheck and ABI check
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
distcheck:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
repository: ietf-wg-cellar/flac-test-files
|
||||
path: ./test-files
|
||||
|
||||
- name: Install Linux dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libtool-bin libogg-dev doxygen libxml2-utils w3c-sgml-lib pandoc abi-compliance-checker
|
||||
|
||||
- name: Build with Autotools
|
||||
run: |
|
||||
./autogen.sh
|
||||
./configure
|
||||
|
||||
- name: Build and check source package
|
||||
run: make distcheck
|
||||
|
||||
- name: Check binary compatibility
|
||||
run: |
|
||||
make
|
||||
unxz --keep test/abi/abi-libFLAC-1.4.0.dump.xz
|
||||
unxz --keep test/abi/abi-libFLAC++-1.4.0.dump.xz
|
||||
abi-compliance-checker -l flac -old test/abi/abi-libFLAC-1.4.0.dump -new test/abi/abi-descriptor-libFLAC-1.4.3.xml
|
||||
abi-compliance-checker -l flac++ -old test/abi/abi-libFLAC++-1.4.0.dump -new test/abi/abi-descriptor-libFLAC++-1.4.3.xml
|
||||
|
||||
- name: Check with flac test files
|
||||
run: ./src/flac/flac -t test-files/subset/*.flac test-files/uncommon/0[5-9]*.flac test-files/uncommon/10*.flac
|
||||
|
||||
- name: Upload ABI compliance reports
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: flac-${{ github.sha }}-${{ github.run_id }}-compat
|
||||
path: |
|
||||
./compat_reports
|
||||
|
||||
- name: Upload logs on failure
|
||||
uses: actions/upload-artifact@v3
|
||||
if: failure()
|
||||
with:
|
||||
name: flac-${{ github.sha }}-${{ github.run_id }}-logs
|
||||
path: |
|
||||
./flac-**/**/*.log
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
name: GitHub Actions for specific options
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- name: 32-bit-words
|
||||
cppflags: ''
|
||||
configure-opts: --disable-64-bit-words
|
||||
|
||||
- name: integer-only-library
|
||||
cppflags: '-DFLAC__INTEGER_ONLY_LIBRARY'
|
||||
configure-opts: ''
|
||||
|
||||
- name: no-asm
|
||||
cppflags: ''
|
||||
configure-opts: --disable-asm-optimizations
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libtool-bin libogg-dev
|
||||
|
||||
- name: Build and run tests
|
||||
env:
|
||||
CPPFLAGS: ${{ matrix.cppflags }}
|
||||
run: |
|
||||
./autogen.sh
|
||||
./configure --disable-thorough-tests ${{ matrix.configure-opts }}
|
||||
make
|
||||
make check
|
||||
|
||||
- name: Upload logs on failure
|
||||
uses: actions/upload-artifact@v2
|
||||
if: failure()
|
||||
with:
|
||||
name: flac-${{ github.sha }}-${{ github.run_id }}-logs
|
||||
path: |
|
||||
./**/*.log
|
||||
./**/out*.meta
|
||||
Reference in New Issue
Block a user