Skip to content

Commit 337768e

Browse files
committed
github: actions - create initial build.yaml
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
1 parent 037ae73 commit 337768e

File tree

1 file changed

+142
-0
lines changed

1 file changed

+142
-0
lines changed

.github/workflows/build.yml

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
name: Build alsa-tools
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
fedora_latest_build:
7+
runs-on: ubuntu-latest
8+
container:
9+
image: fedora:latest
10+
env:
11+
QTDIR: /usr/lib64/qt-3.3
12+
steps:
13+
- name: Prepare environment
14+
run: |
15+
dnf -y upgrade
16+
dnf -y install @development-tools gcc-c++ libtool bzip2 gtk2-devel gtk3-devel fltk-devel qt3-devel
17+
18+
- name: Checkout alsa-lib
19+
uses: actions/checkout@v4
20+
with:
21+
repository: alsa-project/alsa-lib
22+
ref: master
23+
path: alsa-lib
24+
- name: Configure alsa-lib
25+
run: |
26+
cd alsa-lib
27+
head -5 configure.ac
28+
libtoolize --force --copy --automake
29+
aclocal
30+
autoheader
31+
automake --foreign --copy --add-missing
32+
autoconf
33+
export CFLAGS="-O2 -Wall -W -Wunused-const-variable=0 -pipe -g"
34+
./configure
35+
echo "Version: $(cat version)"
36+
- name: Build alsa-lib
37+
run: |
38+
cd alsa-lib
39+
make
40+
- name: Install alsa-lib
41+
run: |
42+
cd alsa-lib
43+
make install
44+
45+
- name: Checkout
46+
uses: actions/checkout@v4
47+
with:
48+
path: alsa-tools
49+
- name: Checkout all tags
50+
run: |
51+
cd alsa-tools
52+
git fetch --prune --tags --force
53+
git fetch --prune --unshallow --force
54+
- name: Modify version
55+
run: |
56+
cd alsa-tools
57+
mv Makefile Makefile.old
58+
version=$(git describe | sed -e 's/v//')
59+
if test -z "$version"; then version=$(git describe --tags | sed -e 's/v//'); fi
60+
if test -z "$version"; then version1=$(grep "VERSION = .*" Makefile.old | cut -d ' ' -f 3); version2=$(git rev-parse --short HEAD); version="${version1}-g${version2}"; fi
61+
echo "Version: ${version}"
62+
sed -r "s/VERSION = .*/VERSION = ${version}/" < Makefile.old > Makefile
63+
grep "VERSION =" Makefile
64+
- name: Compile and install as10k1 (dependency)
65+
run: |
66+
cd alsa-tools/as10k1
67+
./gitcompile --prefix=/usr
68+
make install
69+
- name: Compile and install ld10k1 (dependency)
70+
run: |
71+
cd alsa-tools/ld10k1
72+
./gitcompile --prefix=/usr
73+
make install
74+
- name: Configure and build
75+
run: |
76+
cd alsa-tools
77+
./gitcompile
78+
- name: Create package
79+
run: |
80+
cd alsa-tools
81+
make alsa-dist
82+
mkdir ../artifacts
83+
mv alsa-tools*.tar.bz2 ../artifacts
84+
- name: Archive package
85+
uses: actions/upload-artifact@v4
86+
with:
87+
name: alsa-tools-test-package
88+
path: artifacts/
89+
90+
ubuntu_last_build:
91+
runs-on: ubuntu-latest
92+
container:
93+
image: ubuntu:latest
94+
steps:
95+
- name: Prepare
96+
run: |
97+
export DEBIAN_FRONTEND=noninteractive
98+
apt-get update
99+
apt-get -y install apt-utils
100+
apt-get -y full-upgrade
101+
apt-get install -y git build-essential pkg-config m4 autoconf automake libtool ibgtk2.0-dev libgtk-3-dev libfltk1.3-dev
102+
103+
- name: Checkout alsa-lib
104+
uses: actions/checkout@v4
105+
with:
106+
repository: alsa-project/alsa-lib
107+
ref: master
108+
- name: Configure alsa-lib
109+
run: |
110+
libtoolize --force --copy --automake
111+
aclocal
112+
autoheader
113+
automake --foreign --copy --add-missing
114+
autoconf
115+
export CFLAGS="-O2 -Wall -W -Wunused-const-variable=0 -pipe -g"
116+
./configure
117+
- name: Build alsa-lib
118+
run: |
119+
make
120+
- name: Install alsa-lib
121+
run: |
122+
make install
123+
124+
- name: Checkout
125+
uses: actions/checkout@v4
126+
- name: Remove qlo10k1
127+
run: |
128+
mv Makefile Makefile.old
129+
sed -e 's/qlo10k1//' < Makefile.old > Makefile
130+
- name: Compile and install as10k1 (dependency)
131+
run: |
132+
cd as10k1
133+
./gitcompile --prefix=/usr
134+
make install
135+
- name: Compile and install ld10k1 (dependency)
136+
run: |
137+
cd ld10k1
138+
./gitcompile --prefix=/usr
139+
make install
140+
- name: Configure and build
141+
run: |
142+
./gitcompile

0 commit comments

Comments
 (0)