diff options
Diffstat (limited to '.github/workflows/ci.yml')
-rw-r--r-- | .github/workflows/ci.yml | 188 |
1 files changed, 110 insertions, 78 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 78aa196..4075eb1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,10 +3,12 @@ name: CI on: [push, pull_request] jobs: - linux: - name: Linux + linux-x86: + name: Linux (x86) + runs-on: ubuntu-24.04 - runs-on: ubuntu-22.04 + # Don't run on both pushes and pull requests + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name steps: - uses: actions/checkout@v4 @@ -16,7 +18,7 @@ jobs: sudo dpkg --add-architecture i386 sudo apt-get update -y sudo apt-get install -y \ - expect \ + mandoc \ gcc-multilib \ libgcc-s1:i386 \ acl \ @@ -34,133 +36,157 @@ jobs: sudo ln -s libacl.so.1 /lib/i386-linux-gnu/libacl.so sudo ln -s libcap.so.2 /lib/i386-linux-gnu/libcap.so sudo ln -s libonig.so.5 /lib/i386-linux-gnu/libonig.so - # Work around https://github.com/actions/runner-images/issues/9491 - sudo sysctl vm.mmap_rnd_bits=28 - name: Run tests run: | - make -j$(nproc) distcheck + .github/diag.sh make -j$(nproc) distcheck + + - uses: actions/upload-artifact@v4 + with: + name: linux-x86-config.log + path: distcheck-*/gen/config.log + + linux-arm: + name: Linux (Arm64) + runs-on: ubuntu-24.04-arm + + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name + + steps: + - uses: actions/checkout@v4 + + - name: Install dependencies + run: | + sudo apt-get update -y + sudo apt-get install -y \ + mandoc \ + acl \ + libacl1-dev \ + attr \ + libcap2-bin \ + libcap-dev \ + libonig-dev \ + liburing-dev + + - name: Run tests + run: | + .github/diag.sh make -j$(nproc) distcheck + + - uses: actions/upload-artifact@v4 + with: + name: linux-arm-config.log + path: distcheck-*/gen/config.log macos: name: macOS + runs-on: macos-15 - runs-on: macos-14 + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name steps: - uses: actions/checkout@v4 - name: Install dependencies run: | - brew install \ - bash \ - expect \ - make + brew install bash - name: Run tests run: | jobs=$(sysctl -n hw.ncpu) - gmake -j$jobs distcheck + .github/diag.sh make -j$jobs distcheck freebsd: name: FreeBSD + runs-on: ubuntu-24.04 - runs-on: ubuntu-22.04 + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name steps: - uses: actions/checkout@v4 - name: Run tests - uses: vmactions/freebsd-vm@v1 + uses: cross-platform-actions/action@v0.28.0 with: - release: "14.0" - usesh: true - copyback: false + operating_system: freebsd + version: "14.2" - prepare: | - pkg install -y \ + run: | + sudo pkg install -y \ bash \ - expect \ oniguruma \ - pkgconf \ - sudo \ - tcl-wrapper - pw useradd -n action -m -G wheel -s /usr/local/bin/bash - echo "%wheel ALL=(ALL) NOPASSWD: ALL" >>/usr/local/etc/sudoers - mount -t fdescfs none /dev/fd + pkgconf + sudo mount -t fdescfs none /dev/fd + .github/diag.sh make -j$(nproc) distcheck - run: | - chown -R action:action . - sudo -u action make -j$(nproc) distcheck + - uses: actions/upload-artifact@v4 + with: + name: freebsd-config.log + path: distcheck-*/gen/config.log openbsd: name: OpenBSD + runs-on: ubuntu-24.04 - runs-on: ubuntu-22.04 + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name steps: - uses: actions/checkout@v4 - name: Run tests - uses: vmactions/openbsd-vm@v1 + uses: cross-platform-actions/action@v0.28.0 with: - release: "7.5" - usesh: true - copyback: false + operating_system: openbsd + version: "7.7" - prepare: | - pkg_add \ + run: | + sudo pkg_add \ bash \ - expect \ gmake \ oniguruma - adduser -group USER -batch action wheel </dev/null - cp /etc/examples/doas.conf /etc/doas.conf - echo "permit nopass keepenv :wheel" >>/etc/doas.conf - - run: | - chown -R action:action . jobs=$(sysctl -n hw.ncpu) - doas -u action gmake config - doas -u action gmake -j$jobs check TEST_FLAGS="--sudo=doas --verbose=skipped" + ./configure MAKE=gmake + .github/diag.sh gmake -j$jobs check TEST_FLAGS="--sudo --verbose=skipped" + + - uses: actions/upload-artifact@v4 + with: + name: openbsd-config.log + path: gen/config.log netbsd: name: NetBSD + runs-on: ubuntu-24.04 - runs-on: ubuntu-22.04 + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name steps: - uses: actions/checkout@v4 - name: Run tests - uses: vmactions/netbsd-vm@v1 + uses: cross-platform-actions/action@v0.28.0 with: - release: "10.0" - usesh: true - copyback: false + operating_system: netbsd + version: "10.1" - prepare: | + run: | PATH="/sbin:/usr/sbin:$PATH" - pkg_add \ + sudo pkgin -y install \ bash \ - clang \ oniguruma \ - pkgconf \ - sudo \ - tcl-expect - useradd -m -G wheel -g =uid action - echo "%wheel ALL=(ALL) NOPASSWD: ALL" >>/usr/pkg/etc/sudoers - - run: | - PATH="/sbin:/usr/sbin:$PATH" - chown -R action:action . + pkgconf jobs=$(sysctl -n hw.ncpu) - sudo -u action make config CC=clang - sudo -u action make -j$jobs check TEST_FLAGS="--sudo --verbose=skipped" + ./configure + .github/diag.sh make -j$jobs check TEST_FLAGS="--sudo --verbose=skipped" + + - uses: actions/upload-artifact@v4 + with: + name: netbsd-config.log + path: gen/config.log dragonflybsd: name: DragonFly BSD + runs-on: ubuntu-24.04 - runs-on: ubuntu-22.04 + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name steps: - uses: actions/checkout@v4 @@ -170,29 +196,32 @@ jobs: with: release: "6.4.0" usesh: true - copyback: false prepare: | pkg install -y \ bash \ - expect \ oniguruma \ pkgconf \ - sudo \ - tcl-wrapper + sudo pw useradd -n action -m -G wheel -s /usr/local/bin/bash echo "%wheel ALL=(ALL) NOPASSWD: ALL" >>/usr/local/etc/sudoers run: | chown -R action:action . jobs=$(sysctl -n hw.ncpu) - sudo -u action make config - sudo -u action make -j$jobs check TEST_FLAGS="--sudo --verbose=skipped" + sudo -u action ./configure + sudo -u action .github/diag.sh make -j$jobs check TEST_FLAGS="--sudo --verbose=skipped" + + - uses: actions/upload-artifact@v4 + with: + name: dragonfly-config.log + path: gen/config.log omnios: name: OmniOS + runs-on: ubuntu-24.04 - runs-on: ubuntu-22.04 + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name steps: - uses: actions/checkout@v4 @@ -200,15 +229,13 @@ jobs: - name: Run tests uses: vmactions/omnios-vm@v1 with: - release: "r151048" + release: "r151052" usesh: true - copyback: false prepare: | pkg install \ bash \ build-essential \ - expect \ gnu-make \ onig \ sudo @@ -219,5 +246,10 @@ jobs: PATH="/usr/xpg4/bin:$PATH" chown -R action:staff . jobs=$(getconf NPROCESSORS_ONLN) - sudo -u action gmake config - sudo -u action gmake -j$jobs check TEST_FLAGS="--sudo --verbose=skipped" + sudo -u action ./configure MAKE=gmake + sudo -u action .github/diag.sh gmake -j$jobs check TEST_FLAGS="--sudo --verbose=skipped" + + - uses: actions/upload-artifact@v4 + with: + name: omnios-config.log + path: gen/config.log |