name: Checks (Darwin)

on: [push, pull_request]

jobs:
  build-all:
    runs-on: macos-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v3
        with:
          fetch-depth: 0

      - name: Set up Python
        uses: actions/setup-python@v3
        with:
            python-version: '3.11'

      - name: Set up the build environment
        run: ./ck tools setup && ./ck tools doctor

      - name: Build Userspace (Host)
        run: ./ck builder build

      - name: Test Userspace (Host)
        run: ./ck builder test