name: Build and Test on: push: branches: - main pull_request: jobs: build-and-test: strategy: matrix: os: [ubuntu-latest] runs-on: ${{ matrix.os }} steps: - name: Checkout code uses: actions/checkout@v3 - name: Set up dependencies run: | # Common setup for Linux if [[ "$RUNNER_OS" == "Linux" ]]; then if [[ "$matrix.os" == "ubuntu-latest" ]]; then sudo apt-get update sudo apt-get install -y cmake build-essential meson ninja-build python3 python3-pip libgtest-dev pip install meson # Compile gtest manually for Ubuntu cd /usr/src/gtest && sudo cmake . && sudo make && sudo cp *.a /usr/lib elif [[ "$matrix.os" == "fedora-latest" ]]; then sudo dnf install -y cmake gcc-c++ make meson ninja-build gtest gtest-devel pip install meson elif [[ "$matrix.os" == "archlinux" ]]; then sudo pacman -Syu --noconfirm cmake gcc make meson ninja python gtest pip install meson fi # Common setup for macOS elif [[ "$RUNNER_OS" == "macOS" ]]; then brew update brew install cmake meson ninja python gtest fi - name: Run build and tests run: ./mk