1name: Build alsa-lib 2 3on: [push, pull_request] 4 5jobs: 6 fedora_latest_build: 7 runs-on: ubuntu-latest 8 container: 9 image: fedora:latest 10 steps: 11 - name: Prepare environment 12 run: | 13 dnf -y upgrade 14 dnf -y install @development-tools libtool bzip2 15 - name: Checkout 16 uses: actions/checkout@v4 17 with: 18 fetch-depth: 0 19 - name: Safe git directory 20 run: | 21 git config --global --add safe.directory "$GITHUB_WORKSPACE" 22 - name: Modify version 23 run: | 24 mv configure.ac configure.ac.old 25 version=$(git describe | sed -e 's/v//') 26 echo "Version: ${version}" 27 sed -r "s/AC_INIT\(alsa-lib,.*\)/AC_INIT(alsa-lib, ${version})/" < configure.ac.old > configure.ac 28 grep AC_INIT configure.ac 29 - name: Configure 30 run: | 31 libtoolize --force --copy --automake 32 aclocal 33 autoheader 34 automake --foreign --copy --add-missing 35 autoconf 36 export CFLAGS="-O2 -Wall -W -Wunused-const-variable=0 -pipe -g" 37 ./configure --disable-aload 38 echo "Version: $(cat version)" 39 - name: Build 40 run: | 41 make 42 - name: Install 43 run: | 44 make install 45 - name: Create package 46 run: | 47 make dist-bzip2 48 - name: Unpack package 49 run: | 50 tar xjf alsa-lib-$(cat version).tar.bz2 51 mkdir artifacts 52 cp alsa-lib-$(cat version).tar.bz2 artifacts 53 - name: Configure package 54 run: | 55 cd alsa-lib-$(cat version) 56 export CFLAGS="-O2 -Wall -W -Wunused-const-variable=0 -pipe -g" 57 ./configure --disable-aload 58 - name: Build package 59 run: | 60 cd alsa-lib-$(cat version) 61 make 62 - name: Install package 63 run: | 64 cd alsa-lib-$(cat version) 65 make install 66 - name: Archive package 67 uses: actions/upload-artifact@v1 68 with: 69 name: alsa-lib-test-package 70 path: artifacts/ 71 72 ubuntu_last_build: 73 runs-on: ubuntu-latest 74 container: 75 image: ubuntu:latest 76 steps: 77 - name: Checkout 78 uses: actions/checkout@v4 79 - name: Prepare environment 80 run: | 81 export DEBIAN_FRONTEND=noninteractive 82 apt-get update 83 apt-get -y install apt-utils 84 apt-get -y full-upgrade 85 apt-get install -y git build-essential m4 autoconf automake libtool 86 - name: Configure 87 run: | 88 libtoolize --force --copy --automake 89 aclocal 90 autoheader 91 automake --foreign --copy --add-missing 92 autoconf 93 export CFLAGS="-O2 -Wall -W -Wunused-const-variable=0 -pipe -g" 94 ./configure --disable-aload 95 - name: Build 96 run: | 97 make 98 - name: Install 99 run: | 100 make install 101