1name: Build alsa-utils 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 gettext-devel ncurses-devel 15 16 - name: Checkout alsa-lib 17 uses: actions/checkout@v3 18 with: 19 repository: alsa-project/alsa-lib 20 ref: master 21 path: alsa-lib 22 - name: Configure alsa-lib 23 run: | 24 cd alsa-lib 25 head -5 configure.ac 26 libtoolize --force --copy --automake 27 aclocal 28 autoheader 29 automake --foreign --copy --add-missing 30 autoconf 31 export CFLAGS="-O2 -Wall -W -Wunused-const-variable=0 -pipe -g" 32 ./configure 33 echo "Version: $(cat version)" 34 - name: Build alsa-lib 35 run: | 36 cd alsa-lib 37 make 38 - name: Install alsa-lib 39 run: | 40 cd alsa-lib 41 make install 42 43 - name: Checkout 44 uses: actions/checkout@v3 45 with: 46 path: alsa-utils 47 - name: Checkout all tags 48 run: | 49 cd alsa-utils 50 git fetch --prune --tags --force 51 git fetch --prune --unshallow --force 52 - name: Modify version 53 run: | 54 cd alsa-utils 55 mv configure.ac configure.ac.old 56 version=$(git describe | sed -e 's/v//') 57 if test -z "$version"; then version=$(git describe --tags | sed -e 's/v//'); fi 58 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 59 echo "Version: ${version}" 60 sed -r "s/AC_INIT\(alsa-utils,.*\)/AC_INIT(alsa-utils, ${version})/" < configure.ac.old > configure.ac.tmp 61 sed -e 's;po/Makefile.in;;' < configure.ac.tmp > configure.ac 62 grep AC_INIT configure.ac 63 - name: Configure 64 run: | 65 cd alsa-utils 66 head -5 configure.ac 67 aclocal 68 gettextize -c -f --no-changelog 69 libtoolize --force --copy --automake 70 aclocal -I m4 71 autoheader 72 automake --foreign --copy --add-missing 73 autoconf 74 export CFLAGS="-O2 -Wall -W -Wunused-const-variable=0 -pipe -g" 75 ./configure 76 echo "Version: $(cat version)" 77 - name: Build 78 run: | 79 cd alsa-utils 80 make 81 - name: Install test 82 run: | 83 cd alsa-utils 84 make install 85 - name: Create package 86 run: | 87 cd alsa-utils 88 make dist-bzip2 89 - name: Unpack package 90 run: | 91 mkdir artifacts 92 cd alsa-utils 93 tar xjf alsa-utils-$(cat version).tar.bz2 94 cp alsa-utils-$(cat version).tar.bz2 ../artifacts 95 - name: Configure package 96 run: | 97 cd alsa-utils 98 cd alsa-utils-$(cat version) 99 export CFLAGS="-O2 -Wall -W -Wunused-const-variable=0 -pipe -g" 100 ./configure 101 - name: Build package 102 run: | 103 cd alsa-utils 104 cd alsa-utils-$(cat version) 105 make 106 - name: Install package 107 run: | 108 cd alsa-utils 109 cd alsa-utils-$(cat version) 110 make install 111 - name: Archive package 112 uses: actions/upload-artifact@v1 113 with: 114 name: alsa-utils-test-package 115 path: artifacts/ 116 117 ubuntu_last_build: 118 runs-on: ubuntu-latest 119 container: 120 image: ubuntu:latest 121 steps: 122 - name: Prepare 123 run: | 124 export DEBIAN_FRONTEND=noninteractive 125 apt-get update 126 apt-get -y install apt-utils 127 apt-get -y full-upgrade 128 apt-get install -y git build-essential pkg-config m4 autoconf automake libtool gettext ncurses-dev 129 130 - name: Checkout alsa-lib 131 uses: actions/checkout@v3 132 with: 133 repository: alsa-project/alsa-lib 134 ref: master 135 - name: Configure alsa-lib 136 run: | 137 libtoolize --force --copy --automake 138 aclocal 139 autoheader 140 automake --foreign --copy --add-missing 141 autoconf 142 export CFLAGS="-O2 -Wall -W -Wunused-const-variable=0 -pipe -g" 143 ./configure 144 - name: Build alsa-lib 145 run: | 146 make 147 - name: Install alsa-lib 148 run: | 149 make install 150 151 - name: Checkout 152 uses: actions/checkout@v3 153 - name: Configure 154 run: | 155 mv configure.ac configure.ac.old 156 sed -e 's;po/Makefile.in;;' < configure.ac.old > configure.ac 157 aclocal 158 gettextize -c -f --no-changelog 159 libtoolize --force --copy --automake 160 aclocal -I m4 161 autoheader 162 automake --foreign --copy --add-missing 163 autoconf 164 export CFLAGS="-O2 -Wall -W -Wunused-const-variable=0 -pipe -g" 165 ./configure 166 - name: Build 167 run: | 168 make 169 - name: Install 170 run: | 171 make install 172