• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1name: macos-ci
2
3on:
4  push:
5    branches: [ main ]
6  pull_request:
7    branches: [ main ]
8
9permissions:
10  contents: read
11
12jobs:
13  build:
14    runs-on: macos-latest
15
16    steps:
17    - name: Checkout
18      uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
19    - name: Setup Ccache
20      uses: hendrikmuhs/ccache-action@6d1841ec156c39a52b1b23a810da917ab98da1f4 # v1.2.10
21      with:
22        key: ${{ github.job }}-${{ runner.os }}-${{ runner.arch }}
23    - name: Install Dependencies
24      run: |
25        export HOMEBREW_NO_AUTO_UPDATE=1
26        export HOMEBREW_NO_INSTALL_CLEANUP=1
27        brew install \
28          cairo \
29          freetype \
30          glib \
31          gobject-introspection \
32          graphite2 \
33          icu4c \
34          meson \
35          ninja \
36          pkg-config
37    - name: Install Python Dependencies
38      run: pip3 install -r .ci/requirements.txt --require-hashes
39    - name: Setup Meson
40      run: |
41        export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig:/usr/local/opt/libffi/lib/pkgconfig"
42        ccache --version
43        meson setup build \
44          -Dauto_features=enabled \
45          -Ddocs=disabled \
46          -Dchafa=disabled \
47          -Dcoretext=enabled \
48          -Dgraphite=enabled \
49          -Doptimization=2 \
50          -Db_coverage=true \
51    - name: Build
52      run: meson compile -Cbuild
53    - name: Test
54      run: meson test --print-errorlogs -Cbuild
55    - name: Generate Coverage
56      run: ninja -Cbuild coverage-xml
57    - name: Upload Coverage
58      uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
59      with:
60        file: build/meson-logs/coverage.xml
61