• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1name: linux-ci
2
3on:
4  push:
5    branches: [ main ]
6    tags: ["*.*.*"]
7  pull_request:
8    branches: [ main ]
9
10permissions:
11  contents: read
12
13jobs:
14  build:
15    runs-on: ubuntu-20.04
16
17    steps:
18    - name: Checkout
19      uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
20    - name: Setup Ccache
21      uses: hendrikmuhs/ccache-action@ed74d11c0b343532753ecead8a951bb09bb34bc9 # v1.2.14
22      with:
23        key: ${{ github.job }}-${{ runner.os }}-${{ runner.arch }}
24    - name: Install Dependencies
25      run: |
26        sudo apt-get update
27        sudo apt-get install \
28          gcc \
29          gobject-introspection \
30          gtk-doc-tools \
31          libcairo2-dev \
32          libfreetype6-dev \
33          libgirepository1.0-dev \
34          libglib2.0-dev \
35          libgraphite2-dev \
36          libicu-dev \
37          ninja-build \
38          pkg-config \
39          python3 \
40          python3-setuptools
41    - name: Setup Python
42      uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
43      with:
44        python-version: '3.x'
45    - name: Install Python Dependencies
46      run: sudo pip3 install -r .ci/requirements.txt --require-hashes
47    - name: Setup Meson
48      run: |
49        ccache --version
50        meson setup build \
51          -Dauto_features=enabled \
52          -Dchafa=disabled \
53          -Dgraphite=enabled \
54          -Doptimization=2 \
55          -Db_coverage=true \
56          -Ddoc_tests=true \
57          -Dragel_subproject=true
58    - name: Build
59      run: meson compile -Cbuild
60    - name: Test
61      run: meson test --print-errorlogs -Cbuild
62    - name: Generate Documentations
63      run: ninja -Cbuild harfbuzz-doc
64    - name: Deploy Documentations
65      if: github.ref_type == 'tag'
66      run: .ci/deploy-docs.sh
67      env:
68        GH_TOKEN: ${{ secrets.GH_TOKEN }}
69        REVISION: ${{ github.sha }}
70    - name: Generate Coverage
71      run: ninja -Cbuild coverage-xml
72    - name: Upload Coverage
73      uses: codecov/codecov-action@7f8b4b4bde536c465e797be725718b88c5d95e0e # v5.1.1
74      with:
75        token: ${{ secrets.CODECOV_TOKEN }}
76        file: build/meson-logs/coverage.xml
77