|
| 1 | +# Build packages from source. |
| 2 | +name: build_package |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + push: |
| 6 | +permissions: read-all |
| 7 | +jobs: |
| 8 | + build_dpkg: |
| 9 | + runs-on: ubuntu-latest |
| 10 | + strategy: |
| 11 | + matrix: |
| 12 | + version: ['26.04'] |
| 13 | + container: |
| 14 | + image: ubuntu:${{ matrix.version }} |
| 15 | + steps: |
| 16 | + - uses: actions/checkout@v6 |
| 17 | + - name: Set up container |
| 18 | + env: |
| 19 | + DEBIAN_FRONTEND: noninteractive |
| 20 | + run: | |
| 21 | + apt update -q |
| 22 | + apt install -y libterm-readline-gnu-perl locales software-properties-common |
| 23 | + locale-gen en_US.UTF-8 |
| 24 | + ln -f -s /usr/share/zoneinfo/UTC /etc/localtime |
| 25 | + - name: Install build dependencies |
| 26 | + run: | |
| 27 | + apt update -q |
| 28 | + apt install -y autoconf automake autopoint autotools-dev build-essential debhelper dh-autoreconf dh-python fakeroot git libtool pkg-config |
| 29 | + - name: Download test data |
| 30 | + run: | |
| 31 | + if test -x "synctestdata.sh"; then ./synctestdata.sh; fi |
| 32 | + - name: Build from source |
| 33 | + run: | |
| 34 | + ./synclibs.sh --use-head |
| 35 | + ./autogen.sh |
| 36 | + ./configure ${{ matrix.configure_options }} |
| 37 | + make dist |
| 38 | + - name: Build dpkg |
| 39 | + run: | |
| 40 | + PACKAGE=`ls -1 *.tar.gz | head -n1` |
| 41 | + PACKAGE_ORIG=`echo "${PACKAGE%.tar.gz}.orig.tar.gz" | tr '-' '_'` |
| 42 | + mv "${PACKAGE}" "../${PACKAGE_ORIG}" |
| 43 | + cp -rf dpkg debian |
| 44 | + dpkg-buildpackage -rfakeroot |
| 45 | + build_rpm: |
| 46 | + runs-on: ubuntu-latest |
| 47 | + strategy: |
| 48 | + matrix: |
| 49 | + version: ['44'] |
| 50 | + container: |
| 51 | + image: registry.fedoraproject.org/fedora:${{ matrix.version }} |
| 52 | + steps: |
| 53 | + - uses: actions/checkout@v6 |
| 54 | + - name: Set up container |
| 55 | + run: | |
| 56 | + dnf install -y dnf-plugins-core langpacks-en |
| 57 | + - name: Install build dependencies |
| 58 | + run: | |
| 59 | + dnf install -y @development-tools autoconf automake gettext-devel git libtool make pkg-config rpm-build |
| 60 | + - name: Download test data |
| 61 | + run: | |
| 62 | + if test -x "synctestdata.sh"; then ./synctestdata.sh; fi |
| 63 | + - name: Build from source |
| 64 | + run: | |
| 65 | + ./synclibs.sh --use-head |
| 66 | + ./autogen.sh |
| 67 | + ./configure ${{ matrix.configure_options }} |
| 68 | + make dist |
| 69 | + - name: Build rpm |
| 70 | + run: | |
| 71 | + PACKAGE=`ls -1 *.tar.gz | head -n1` |
| 72 | + rpmbuild -ta "${PACKAGE}" |
| 73 | + build_pkg: |
| 74 | + runs-on: ${{ matrix.os }} |
| 75 | + strategy: |
| 76 | + matrix: |
| 77 | + include: |
| 78 | + - os: macos-26 |
| 79 | + configure_options: '' |
| 80 | + steps: |
| 81 | + - uses: actions/checkout@v6 |
| 82 | + - name: Install build dependencies |
| 83 | + run: | |
| 84 | + brew update -q |
| 85 | + brew install -q autoconf automake gettext gnu-sed libtool pkg-config || true |
| 86 | + ln -s /usr/local/bin/glibtoolize /usr/local/bin/libtoolize |
| 87 | + - name: Download test data |
| 88 | + run: | |
| 89 | + if test -x "synctestdata.sh"; then ./synctestdata.sh; fi |
| 90 | + - name: Build from source |
| 91 | + run: | |
| 92 | + ./synclibs.sh --use-head |
| 93 | + ./autogen.sh |
| 94 | + ./configure --disable-dependency-tracking --prefix=/usr/local --with-pyprefix ${{ matrix.configure_options }} |
| 95 | + make -j4 > /dev/null |
| 96 | + - name: Build pkg |
| 97 | + run: | |
| 98 | + tests/pkgbuild.sh |
0 commit comments