[ci] Clean a bit and add some consistency

This commit is contained in:
Khaled Hosny 2023-01-17 20:48:11 +02:00 committed by خالد حسني (Khaled Hosny)
parent edd5a37e79
commit 35f0184bfd
4 changed files with 141 additions and 111 deletions

View File

@ -15,46 +15,54 @@ jobs:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
steps: steps:
- uses: actions/checkout@v3 - name: Checkout
- uses: hendrikmuhs/ccache-action@v1.2 uses: actions/checkout@v3
- name: install dependencies - name: Setup Ccache
run: sudo apt-get update && sudo apt-get install pkg-config gcc gtk-doc-tools libfreetype6-dev libglib2.0-dev libcairo2-dev libicu-dev libgraphite2-dev python3 python3-setuptools ninja-build gobject-introspection libgirepository1.0-dev uses: hendrikmuhs/ccache-action@v1.2
- run: sudo pip3 install fonttools meson==0.56.0 gcovr==5.0 - name: Install Dependencies
- name: run run: |
sudo apt-get update
sudo apt-get install \
gcc \
gobject-introspection \
gtk-doc-tools \
libcairo2-dev \
libfreetype6-dev \
libgirepository1.0-dev \
libglib2.0-dev \
libgraphite2-dev \
libicu-dev \
ninja-build \
pkg-config \
python3 \
python3-setuptools
- name: Install Python Dependencies
run: sudo pip3 install fonttools meson==0.56.0 gcovr==5.0
- name: Setup Meson
run: | run: |
ccache --version ccache --version
meson setup build -Db_coverage=true --auto-features=enabled -Dgraphite=enabled -Dchafa=disabled -Dragel_subproject=true -Doptimization=2 meson setup build \
- name: ci -Dauto_features=enabled \
-Dchafa=disabled \
-Dgraphite=enabled \
-Doptimization=2 \
-Db_coverage=true \
-Dragel_subproject=true
- name: Build
run: meson compile -Cbuild
- name: Test
run: meson test --print-errorlogs -Cbuild run: meson test --print-errorlogs -Cbuild
- name: Generate Documentations
- name: generate documentations
run: ninja -Cbuild harfbuzz-doc run: ninja -Cbuild harfbuzz-doc
- name: deploy documentations - name: Deploy Documentations
if: github.ref_type == 'tag' if: github.ref_type == 'tag'
run: .ci/deploy-docs.sh run: .ci/deploy-docs.sh
env: env:
GH_TOKEN: ${{ secrets.GH_TOKEN }} GH_TOKEN: ${{ secrets.GH_TOKEN }}
REVISION: ${{ github.sha }} REVISION: ${{ github.sha }}
- name: Generate Coverage
# waiting for https://github.com/rhysd/github-action-benchmark/issues/36 to happen
# - name: benchmark
# run: build/perf/perf --benchmark_format=json > perf/result.json
# - name: store benchmark result
# uses: rhysd/github-action-benchmark@b2ee598
# if: github.event_name != 'pull_request'
# with:
# name: C++ Benchmark
# tool: 'googlecpp'
# output-file-path: perf/result.json
# gh-pages-branch: gh-pages
# github-token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
# auto-push: true
# alert-threshold: '150%'
# comment-on-alert: true
# fail-on-alert: true
- name: cov
run: ninja -Cbuild coverage-xml run: ninja -Cbuild coverage-xml
- uses: codecov/codecov-action@v3 - name: Upload Coverage
uses: codecov/codecov-action@v3
with: with:
file: build/meson-logs/coverage.xml file: build/meson-logs/coverage.xml

View File

@ -14,15 +14,38 @@ jobs:
runs-on: macos-latest runs-on: macos-latest
steps: steps:
- uses: actions/checkout@v3 - name: Checkout
- uses: hendrikmuhs/ccache-action@v1.2 uses: actions/checkout@v3
- name: install dependencies - name: Setup Ccache
run: HOMEBREW_NO_AUTO_UPDATE=1 brew install meson pkg-config freetype glib glib-utils cairo icu4c graphite2 gobject-introspection gtk-doc ninja uses: hendrikmuhs/ccache-action@v1.2
- run: pip3 install fonttools - name: Install Dependencies
- name: run run: |
export HOMEBREW_NO_AUTO_UPDATE=1
brew install \
cairo \
freetype \
glib \
glib-utils \
gobject-introspection \
graphite2 \
gtk-doc \
icu4c \
meson \
ninja \
pkg-config
- name: Install Python Dependencies
run: pip3 install fonttools
- name: Setup Meson
run: | run: |
export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig:/usr/local/opt/libffi/lib/pkgconfig" export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig:/usr/local/opt/libffi/lib/pkgconfig"
ccache --version ccache --version
meson setup build -Dcoretext=enabled -Dgraphite=enabled -Dauto_features=enabled -Dchafa=disabled -Doptimization=2 meson setup build \
- name: ci -Dauto_features=enabled \
-Dchafa=disabled \
-Dcoretext=enabled \
-Dgraphite=enabled \
-Doptimization=2
- name: Build
run: meson compile -Cbuild
- name: Test
run: meson test --print-errorlogs -Cbuild run: meson test --print-errorlogs -Cbuild

View File

@ -27,35 +27,35 @@ jobs:
name: ${{ matrix.name }} name: ${{ matrix.name }}
steps: steps:
- uses: actions/checkout@v3 - name: Checkout
- uses: hendrikmuhs/ccache-action@v1.2 uses: actions/checkout@v3
with: - name: Setup Ccache
variant: sccache uses: hendrikmuhs/ccache-action@v1.2
key: ${{ github.job }}-${{ matrix.os }}-${{ matrix.ARCH }} with:
- uses: actions/setup-python@v4 variant: sccache
with: key: ${{ github.job }}-${{ matrix.os }}-${{ matrix.ARCH }}
python-version: '3.x' - name: Setup Python
- uses: ilammy/msvc-dev-cmd@v1 uses: actions/setup-python@v4
with: with:
arch : ${{ matrix.ARCH }} python-version: '3.x'
- name: Upgrade pip - name: Setup MSVC
run: | uses: ilammy/msvc-dev-cmd@v1
python -m pip install -U pip with:
- name: Install Dependencies arch : ${{ matrix.ARCH }}
run: | - name: Install Python Dependencies
pip install --upgrade meson ninja fonttools run: |
- name: Build pip install --upgrade meson ninja fonttools
run: | - name: Setup Meson
sccache --version run: |
meson setup build ` sccache --version
--wrap-mode=forcefallback ` meson setup build `
--buildtype=release ` --wrap-mode=forcefallback `
-Dglib=enabled ` --buildtype=release `
-Dfreetype=enabled ` -Dglib=enabled `
-Dgdi=enabled ` -Dfreetype=enabled `
-Ddirectwrite=enabled -Dgdi=enabled `
-Ddirectwrite=enabled
meson compile -C build - name: Build
- name: Test run: meson compile -Cbuild
run: | - name: Test
meson test --print-errorlogs --suite=harfbuzz -C build run: meson test --print-errorlogs --suite=harfbuzz -Cbuild

View File

@ -32,43 +32,42 @@ jobs:
run: run:
shell: msys2 {0} shell: msys2 {0}
steps: steps:
- uses: actions/checkout@v3 - name: Checkout
- uses: msys2/setup-msys2@v2 uses: actions/checkout@v3
with: - name: Setup MSYS2
msystem: ${{ matrix.MSYSTEM }} uses: msys2/setup-msys2@v2
update: true with:
install: >- msystem: ${{ matrix.MSYSTEM }}
mingw-w64-${{ matrix.MSYS2_ARCH }}-cairo update: true
mingw-w64-${{ matrix.MSYS2_ARCH }}-freetype install: >-
mingw-w64-${{ matrix.MSYS2_ARCH }}-gcc mingw-w64-${{ matrix.MSYS2_ARCH }}-cairo
mingw-w64-${{ matrix.MSYS2_ARCH }}-gcc-libs mingw-w64-${{ matrix.MSYS2_ARCH }}-freetype
mingw-w64-${{ matrix.MSYS2_ARCH }}-gettext mingw-w64-${{ matrix.MSYS2_ARCH }}-gcc
mingw-w64-${{ matrix.MSYS2_ARCH }}-glib2 mingw-w64-${{ matrix.MSYS2_ARCH }}-gcc-libs
mingw-w64-${{ matrix.MSYS2_ARCH }}-gobject-introspection mingw-w64-${{ matrix.MSYS2_ARCH }}-gettext
mingw-w64-${{ matrix.MSYS2_ARCH }}-graphite2 mingw-w64-${{ matrix.MSYS2_ARCH }}-glib2
mingw-w64-${{ matrix.MSYS2_ARCH }}-icu mingw-w64-${{ matrix.MSYS2_ARCH }}-gobject-introspection
mingw-w64-${{ matrix.MSYS2_ARCH }}-meson mingw-w64-${{ matrix.MSYS2_ARCH }}-graphite2
mingw-w64-${{ matrix.MSYS2_ARCH }}-ninja mingw-w64-${{ matrix.MSYS2_ARCH }}-icu
mingw-w64-${{ matrix.MSYS2_ARCH }}-pkg-config mingw-w64-${{ matrix.MSYS2_ARCH }}-meson
mingw-w64-${{ matrix.MSYS2_ARCH }}-python mingw-w64-${{ matrix.MSYS2_ARCH }}-ninja
mingw-w64-${{ matrix.MSYS2_ARCH }}-python-pip mingw-w64-${{ matrix.MSYS2_ARCH }}-pkg-config
- name: Install Python Dependencies mingw-w64-${{ matrix.MSYS2_ARCH }}-python
run: | mingw-w64-${{ matrix.MSYS2_ARCH }}-python-pip
pip install --upgrade fonttools - name: Install Python Dependencies
- name: Build run: |
run: | pip install --upgrade fonttools
meson build \ - name: Setup Meson
--wrap-mode=nodownload \ run: |
--auto-features=enabled \ meson setup build \
-Ddocs=disabled \ --wrap-mode=nodownload \
-Ddirectwrite=enabled \ --auto-features=enabled \
-Dgdi=enabled \ -Ddocs=disabled \
-Dgraphite=enabled \ -Ddirectwrite=enabled \
-Dchafa=disabled -Dgdi=enabled \
ninja -C build -Dgraphite=enabled \
- name: Test -Dchafa=disabled
run: | - name: Build
meson test \ run: meson compile -Cbuild
--print-errorlogs \ - name: Test
--suite=harfbuzz \ run: meson test --print-errorlogs --suite=harfbuzz -Cbuild
-C build