name: Build permissions: contents: read on: push: branches: [ "master", "stable" ] pull_request: branches: [ "master", "stable" ] jobs: build-mac: runs-on: macos-latest steps: - uses: actions/checkout@v5 - run: brew install automake - run: autoreconf -i - run: ./configure --enable-warning-as-error - run: cd raid/test && make all test - run: make all -j$(sysctl -n hw.ncpu) - run: make dist check build-linux: runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v5 - run: | sudo apt-get update sudo apt-get install -y \ linux-modules-extra-$(uname -r) \ zfsutils-linux sudo modprobe zfs zfs version - run: autoreconf -i - run: ./configure --enable-warning-as-error - run: make all -j$(nproc) - run: make snapcheck_btrfs - run: make snapcheck_zfs - run: make distcheck -j$(nproc) build-arm32: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - run: | sudo apt-get update sudo apt-get install -y \ gcc-arm-linux-gnueabihf \ libc6-dev-armhf-cross \ qemu-user - run: autoreconf -i - run: | CC=arm-linux-gnueabihf-gcc \ CFLAGS="-O2 -march=armv7-a -mfpu=neon -mfloat-abi=hard" \ TARGET_RUNNER="qemu-arm -cpu cortex-a15 -L /usr/arm-linux-gnueabihf" \ ./configure \ --build="$(./config.guess)" \ --host=arm-linux-gnueabihf \ --enable-warning-as-error - run: make all -j$(nproc) - run: | file snapraid arm-linux-gnueabihf-readelf -h snapraid - run: | qemu-arm \ -cpu cortex-a15 \ -L /usr/arm-linux-gnueabihf \ ./snapraid -V - run: make check SHORTCHECK=1 build-win: runs-on: windows-latest defaults: run: shell: msys2 {0} steps: - uses: actions/checkout@v5 - uses: msys2/setup-msys2@v2 with: msystem: MINGW64 update: true install: mingw-w64-x86_64-gcc autoconf automake make - run: autoreconf -i - run: ./configure --enable-warning-as-error - run: make all -j$(nproc) - run: make snapcheck_ntfs - run: make dist check build-freebsd: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - uses: vmactions/freebsd-vm@v1 with: usesh: true prepare: | pkg install -y autoconf automake run: | autoreconf -i ./configure --enable-warning-as-error make all -j$(sysctl -n hw.ncpu) make dist check build-musl: runs-on: ubuntu-latest container: alpine:latest steps: - uses: actions/checkout@v5 - run: | apk add --no-cache \ autoconf \ automake \ build-base \ git \ linux-headers - run: autoreconf -i - run: ./configure --enable-warning-as-error - run: make all -j$(nproc) - run: make dist check