Skip to content

ci: Run tests on Linux #142

ci: Run tests on Linux

ci: Run tests on Linux #142

Workflow file for this run

on:
push:
pull_request:
workflow_dispatch:
jobs:
Linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- run: sudo apt install -y cmake
- run: mkdir build
- run: cmake -DENABLE_EXAMPLES=ON -DENABLE_TESTS=ON -B build
- run: make --directory build
- run: sudo make --directory build install
- run: |
sudo apt-get install nfs-kernel-server valgrind
sudo service nfs-kernel-server stop
echo 10 | sudo tee /proc/fs/nfsd/nfsv4leasetime
echo 10 | sudo tee /proc/fs/nfsd/nfsv4gracetime
sudo service nfs-kernel-server start
make VERSION=3 --directory build test
make VERSION=4 --directory build test
Linux-Musl-QEMU:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
platform:
- i386
- s390x # Test big-endian
- arm32v6
- arm32v7
steps:
- uses: actions/checkout@main
- name: Get the qemu container
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: ${{ matrix.platform }}
run: docker run --rm --interactive --mount type=bind,source=$(pwd),target=/host ${{ matrix.platform }}/alpine sh -c "apk add cmake make gcc libc-dev git; cp -r /host from-host; cd from-host; mkdir build; cmake -B build; make --directory build install"
macOS:
runs-on: macos-latest
steps:
- uses: actions/checkout@main
- run: brew install cmake
- run: mkdir build
- run: cmake -B build
- run: make --directory build install
build-windows:
name: Windows build
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- name: Cmake configure
run: |
cmake -G "Visual Studio 17 2022" .
- name: Build (MSVC)
run: |
cmake --build .
BSDs:
runs-on: macos-latest
strategy:
matrix:
os:
- name: FreeBSD
version: '13.0'
pkginstall: pkg install -y cmake
- name: OpenBSD
version: 7.1
pkginstall: pkg_add cmake
name: ${{ matrix.os.name }} ${{ matrix.os.version }}
steps:
- uses: actions/checkout@main
- name: Test on ${{ matrix.os.name }}
uses: cross-platform-actions/[email protected]
with:
operating_system: ${{ matrix.os.name }}
version: ${{ matrix.os.version }}
shell: bash
run: |
sudo ${{ matrix.os.pkginstall }}
mkdir build
cmake -B build
cd build
make
sudo make install
Cygwin:
runs-on: windows-latest
steps:
- name: Set up Cygwin
uses: cygwin/cygwin-install-action@master
with:
packages: make gcc-g++ bash cmake
- uses: actions/checkout@main
- shell: C:\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}'
run: |
cd $GITHUB_WORKSPACE
mkdir build
cmake -B build
make --directory build install