1name: Mac OS X
2
3on:
4  push:
5    branches:
6      - main
7  pull_request:
8    branches:
9      - main
10
11# When a PR is updated, cancel the jobs from the previous version. Merges
12# do not define head_ref, so use run_id to never cancel those jobs.
13concurrency:
14  group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
15  cancel-in-progress: true
16
17env:
18  # 20M measured cache size (August 2023).
19  CCACHE_SIZE: "25M"
20
21jobs:
22  macos:
23    runs-on: macos-latest
24    steps:
25      - name: Clone picolibc
26        uses: actions/checkout@v4
27
28      - name: Setup python
29        uses: actions/setup-python@v5
30        with:
31          python-version: '3.x'
32
33      - name: Install meson and ninja
34        run: pip install meson ninja
35
36      - name: ccache
37        uses: hendrikmuhs/ccache-action@v1.2.11
38        with:
39          key: compilation-${{ runner.os }}-${{ github.job }}
40          max-size: ${{ env.CCACHE_SIZE }}
41
42      - name: MacOS tests
43        run: ./.github/do-arm
44