From 4db6d58d87dccc3a34a1901c0fb12c360274cc8c Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Tue, 3 Sep 2024 08:44:30 +0100 Subject: [PATCH] WIP: Add Linux to CI. --- .github/workflows/linux.yml | 67 +++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 .github/workflows/linux.yml diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml new file mode 100644 index 00000000..27ee5821 --- /dev/null +++ b/.github/workflows/linux.yml @@ -0,0 +1,67 @@ +name: Linux + +on: + push: + branches: [ "1.7.x", "1.6.x" ] + tags: [ "*" ] + pull_request: + branches: [ "1.7.x", "1.6.x" ] + +env: + MARGS: "-j2" + +jobs: + + build: + strategy: + matrix: + include: + - name: APR 1.7.x + apr-version: 1.7.x + config-output: APU_HAVE_SDBM + - name: APR 1.6.x + apr-version: 1.6.x + config-output: APU_HAVE_SDBM + - name: APR 1.7.x maintainer-mode + apr-version: 1.7.x + apr-config: --enable-maintainer-mode + config-output: APU_HAVE_SDBM + notest-cflags: -Werror + fail-fast: false + + runs-on: ubuntu-latest + env: + NOTEST_CFLAGS: ${{ matrix.notest-cflags }} + name: ${{ matrix.name }} + steps: + - name: Install prerequisites + run: sudo apt-get install libtool libtool-bin ${{ matrix.packages }} + - name: Workaround ASAN issue in Ubuntu 22.04 runners + run: sudo sysctl vm.mmap_rnd_bits=28 + - uses: actions/checkout@v4 + # https://github.com/actions/runner-images/issues/9491#issuecomment-1989718917 + - uses: actions/checkout@v4 + with: + repository: apache/apr + ref: ${{ matrix.apr-version }} + path: apr + - name: Configure and build APR ${{ matrix.apr-version }} + working-directory: ./apr + run: | + ./buildconf + ./configure ${{ matrix.apr-config }} --prefix=/tmp/apr-root + make $MARGS + make install + - name: buildconf + run: ./buildconf --with-apr=./apr + - name: configure + run: ./configure --prefix=/tmp/apr-util --with-apr=/tmp/apr-root ${{ matrix.config }} + - if: ${{ matrix.config-output != '' }} + name: check for expected configure output ${{ matrix.config-output }} + run: for var in ${{ matrix.config-output }}; do grep "^#define *${var} *1" include/apu.h; done + - name: make + run: make $MARGS + - name: install + run: make install + - name: check + run: make check