-
Notifications
You must be signed in to change notification settings - Fork 285
134 lines (114 loc) · 3.66 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
name: Generic cross-platform tests
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@v4
- uses: actions/checkout@v4
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 libtool vorbis-tools oggz
- name: Install Linux dependencies
if: startsWith(matrix.os,'ubuntu')
run: |
sudo apt-get update
sudo apt-get install -y libtool-bin libogg-dev vorbis-tools oggz-tools
- 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@v4
if: failure()
with:
name: flac-${{ github.sha }}-${{ github.run_id }}-logs
path: |
./**/*.log
./**/out*.meta