forked from espeak-ng/espeak-ng
-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (73 loc) · 2.44 KB
/
autoconf.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
name: Autoconf
on:
workflow_dispatch:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ${{ matrix.os }}-${{ matrix.osver }}
name: "${{ matrix.os }} ${{ matrix.arch }}: ${{ matrix.compiler }}"
strategy:
fail-fast: false
matrix:
os: [ubuntu, macos]
arch: [amd64, i386]
compiler: [gcc, clang]
include:
- os: ubuntu
osver: 22.04
- os: macos
osver: 14
- arch: i386
archcflags: "-m32 -msse2 -mfpmath=sse"
exclude:
- os: macos
arch: i386
steps:
# Linux - dependencies
- name: apt-build-deps
if: matrix.os == 'ubuntu'
run: |
sudo dpkg --add-architecture ${{ matrix.arch }}
sudo apt-get update
sudo apt-get install ronn kramdown python3
- name: apt-arch-deps
if: matrix.os == 'ubuntu'
run: "sudo apt-get install libtool-bin valgrind g++-12-multilib linux-libc-dev:${{ matrix.arch }} libpcaudio-dev:${{ matrix.arch }} libsonic-dev:${{ matrix.arch }} libgcc-s1:${{ matrix.arch }}"
- name: apt-compile-clang
if: matrix.os == 'ubuntu' && matrix.compiler == 'clang'
run: sudo apt-get install clang
# MacOS - dependencies
- name: brew-deps
if: matrix.os == 'macos'
run: brew install libtool automake ronn OJFord/homebrew-formulae/kramdown
- name: brew-compile-deps
if: matrix.os == 'macos' && matrix.compiler == 'gcc'
run: brew install gcc@12
# Checkout code
- uses: actions/checkout@v4
# Configure
- name: configure
run: |
./autogen.sh
chmod -x INSTALL m4/*.m4
[ 'x${{ matrix.compiler }}' = 'xgcc' ] && export CC="gcc-12"
[ 'x${{ matrix.compiler }}' = 'xgcc' ] && export CXX="g++-12"
[ 'x${{ matrix.compiler }}' = 'xclang' ] && export CC="clang"
[ 'x${{ matrix.compiler }}' = 'xclang' ] && export CXX="clang++"
export CFLAGS="-g -Og -fno-omit-frame-pointer ${{ matrix.archcflags }}"
export CXXFLAGS="-g -Og -fno-omit-frame-pointer ${{ matrix.archcflags }}"
./configure
- name: config-failed-upload
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: config-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.compiler }}.log
path: config.log
# Build and test
- name: build
run: make all-am
- name: test
run: make check