2020-04-06 09:35:26 +03:00
|
|
|
name: GitHub Actions
|
|
|
|
|
2021-02-27 13:42:26 +03:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
pull_request:
|
2020-04-06 09:35:26 +03:00
|
|
|
|
|
|
|
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: ''
|
|
|
|
|
2021-07-04 18:32:22 +03:00
|
|
|
- name: windows-latest-cmake
|
|
|
|
os: windows-latest
|
|
|
|
build-system: cmake
|
2022-04-27 20:53:13 +03:00
|
|
|
configure-opts: ''
|
2021-07-04 18:32:22 +03:00
|
|
|
|
2022-09-04 16:23:12 +03:00
|
|
|
- name: windows-latest-cmake-shared
|
|
|
|
os: windows-latest
|
|
|
|
build-system: cmake
|
|
|
|
configure-opts: '-DBUILD_SHARED_LIBS=ON'
|
|
|
|
|
2020-04-06 09:35:26 +03:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
|
|
|
|
steps:
|
2024-03-28 10:04:21 +03:00
|
|
|
- uses: actions/checkout@v4
|
2020-04-06 09:35:26 +03:00
|
|
|
|
2024-03-28 10:04:21 +03:00
|
|
|
- uses: actions/checkout@v4
|
2022-04-27 20:53:13 +03:00
|
|
|
if: startsWith(matrix.build-system,'cmake')
|
|
|
|
with:
|
|
|
|
repository: xiph/ogg
|
|
|
|
path: ./ogg
|
|
|
|
|
2020-04-06 09:35:26 +03:00
|
|
|
- name: Install MacOS dependencies
|
2022-04-27 20:53:13 +03:00
|
|
|
if: startsWith(matrix.os,'macos') && !startsWith(matrix.build-system,'cmake')
|
2020-04-06 09:35:26 +03:00
|
|
|
run: |
|
|
|
|
brew update
|
2024-05-01 09:55:23 +03:00
|
|
|
brew install automake pkg-config libogg libtool
|
2020-04-06 09:35:26 +03:00
|
|
|
|
2021-06-23 07:00:36 +03:00
|
|
|
- name: Install Linux dependencies
|
2020-04-06 09:35:26 +03:00
|
|
|
if: startsWith(matrix.os,'ubuntu')
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
2022-09-18 21:09:48 +03:00
|
|
|
sudo apt-get install -y libtool-bin libogg-dev
|
2020-04-06 09:35:26 +03:00
|
|
|
|
2022-02-21 17:19:31 +03:00
|
|
|
- name: Install Windows dependencies
|
|
|
|
if: startsWith(matrix.os,'windows')
|
|
|
|
run: |
|
|
|
|
choco install busybox
|
|
|
|
|
2020-04-06 09:35:26 +03:00
|
|
|
- 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
|
|
|
|
|
2021-07-05 08:07:06 +03:00
|
|
|
- name: Prepare CMake build directory
|
2020-04-06 09:35:26 +03:00
|
|
|
if: startsWith(matrix.build-system,'cmake')
|
|
|
|
env:
|
|
|
|
CC: ${{ matrix.cc }}
|
|
|
|
CXX: ${{ matrix.cxx }}
|
2021-07-05 08:07:06 +03:00
|
|
|
run: mkdir cmake-build
|
|
|
|
|
|
|
|
- name: CMake generator
|
|
|
|
if: startsWith(matrix.build-system,'cmake')
|
|
|
|
env:
|
|
|
|
CC: ${{ matrix.cc }}
|
|
|
|
CXX: ${{ matrix.cxx }}
|
|
|
|
working-directory: cmake-build
|
2022-09-13 11:50:57 +03:00
|
|
|
run: cmake .. -DCMAKE_BUILD_TYPE=Release -DINSTALL_MANPAGES=OFF -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ${{ matrix.configure-opts }} -DCMAKE_FIND_FRAMEWORK=NEVER
|
2021-07-05 08:07:06 +03:00
|
|
|
|
|
|
|
- name: CMake build
|
|
|
|
if: startsWith(matrix.build-system,'cmake')
|
|
|
|
env:
|
|
|
|
CC: ${{ matrix.cc }}
|
|
|
|
CXX: ${{ matrix.cxx }}
|
|
|
|
working-directory: cmake-build
|
2022-02-21 17:36:33 +03:00
|
|
|
run: cmake --build . --config Release
|
2021-07-05 08:07:06 +03:00
|
|
|
|
|
|
|
- name: CMake test
|
|
|
|
if: startsWith(matrix.build-system,'cmake')
|
|
|
|
env:
|
|
|
|
CC: ${{ matrix.cc }}
|
|
|
|
CXX: ${{ matrix.cxx }}
|
|
|
|
working-directory: cmake-build
|
2022-02-21 17:36:33 +03:00
|
|
|
run: ctest -V -C Release
|
2021-07-04 02:05:44 +03:00
|
|
|
|
|
|
|
- name: Upload logs on failure
|
2024-03-28 10:04:21 +03:00
|
|
|
uses: actions/upload-artifact@v4
|
2021-07-04 02:05:44 +03:00
|
|
|
if: failure()
|
|
|
|
with:
|
|
|
|
name: flac-${{ github.sha }}-${{ github.run_id }}-logs
|
2023-02-17 15:31:55 +03:00
|
|
|
path: |
|
|
|
|
./**/*.log
|
|
|
|
./**/out*.meta
|