-
Notifications
You must be signed in to change notification settings - Fork 139
171 lines (164 loc) · 4.75 KB
/
build.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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
name: Build alsa-utils
on: [push, pull_request]
jobs:
fedora_latest_build:
runs-on: ubuntu-latest
container:
image: fedora:latest
steps:
- name: Prepare environment
run: |
dnf -y upgrade
dnf -y install @development-tools libtool bzip2 gettext-devel ncurses-devel
- name: Checkout alsa-lib
uses: actions/checkout@v4
with:
repository: alsa-project/alsa-lib
ref: master
path: alsa-lib
- name: Configure alsa-lib
run: |
cd alsa-lib
head -5 configure.ac
libtoolize --force --copy --automake
aclocal
autoheader
automake --foreign --copy --add-missing
autoconf
export CFLAGS="-O2 -Wall -W -Wunused-const-variable=0 -pipe -g"
./configure
echo "Version: $(cat version)"
- name: Build alsa-lib
run: |
cd alsa-lib
make
- name: Install alsa-lib
run: |
cd alsa-lib
make install
- name: Checkout
uses: actions/checkout@v4
with:
path: alsa-utils
- name: Checkout all tags
run: |
cd alsa-utils
git fetch --prune --tags --force
git fetch --prune --unshallow --force
- name: Modify version
run: |
cd alsa-utils
mv configure.ac configure.ac.old
version=$(git describe | sed -e 's/v//')
if test -z "$version"; then version=$(git describe --tags | sed -e 's/v//'); fi
if test -z "$version"; then version1=$(cat configure.ac.old | grep "AC_INIT(.*)" | cut -d ' ' -f 2 | sed -e 's/)//'); version2=$(git rev-parse --short HEAD); version="${version1}-g${version2}"; fi
echo "Version: ${version}"
sed -r "s/AC_INIT\(alsa-utils,.*\)/AC_INIT(alsa-utils, ${version})/" < configure.ac.old > configure.ac.tmp
sed -e 's;po/Makefile.in;;' < configure.ac.tmp > configure.ac
grep AC_INIT configure.ac
- name: Configure
run: |
cd alsa-utils
head -5 configure.ac
aclocal
gettextize -c -f --no-changelog
libtoolize --force --copy --automake
aclocal -I m4
autoheader
automake --foreign --copy --add-missing
autoconf
export CFLAGS="-O2 -Wall -W -Wunused-const-variable=0 -pipe -g"
./configure
echo "Version: $(cat version)"
- name: Build
run: |
cd alsa-utils
make
- name: Install test
run: |
cd alsa-utils
make install
- name: Create package
run: |
cd alsa-utils
make dist-bzip2
- name: Unpack package
run: |
mkdir artifacts
cd alsa-utils
tar xjf alsa-utils-$(cat version).tar.bz2
cp alsa-utils-$(cat version).tar.bz2 ../artifacts
- name: Configure package
run: |
cd alsa-utils
cd alsa-utils-$(cat version)
export CFLAGS="-O2 -Wall -W -Wunused-const-variable=0 -pipe -g"
./configure
- name: Build package
run: |
cd alsa-utils
cd alsa-utils-$(cat version)
make
- name: Install package
run: |
cd alsa-utils
cd alsa-utils-$(cat version)
make install
- name: Archive package
uses: actions/upload-artifact@v4
with:
name: alsa-utils-test-package
path: artifacts/
ubuntu_last_build:
runs-on: ubuntu-latest
container:
image: ubuntu:latest
steps:
- name: Prepare
run: |
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get -y install apt-utils
apt-get -y full-upgrade
apt-get install -y git build-essential pkg-config m4 autoconf automake libtool gettext ncurses-dev
- name: Checkout alsa-lib
uses: actions/checkout@v4
with:
repository: alsa-project/alsa-lib
ref: master
- name: Configure alsa-lib
run: |
libtoolize --force --copy --automake
aclocal
autoheader
automake --foreign --copy --add-missing
autoconf
export CFLAGS="-O2 -Wall -W -Wunused-const-variable=0 -pipe -g"
./configure
- name: Build alsa-lib
run: |
make
- name: Install alsa-lib
run: |
make install
- name: Checkout
uses: actions/checkout@v4
- name: Configure
run: |
mv configure.ac configure.ac.old
sed -e 's;po/Makefile.in;;' < configure.ac.old > configure.ac
aclocal
gettextize -c -f --no-changelog
libtoolize --force --copy --automake
aclocal -I m4
autoheader
automake --foreign --copy --add-missing
autoconf
export CFLAGS="-O2 -Wall -W -Wunused-const-variable=0 -pipe -g"
./configure
- name: Build
run: |
make
- name: Install
run: |
make install