From 3a46ae51273ce086aaec8ccf14420bbf5a36dffb Mon Sep 17 00:00:00 2001 From: Ebrahim Byagowi Date: Wed, 15 Jul 2020 12:46:34 +0430 Subject: [PATCH 1/2] Use GitHub Actions for msvc bots --- .github/workflows/msvc-ci.yml | 38 +++++++++++++++++++++++++++++++++++ appveyor.yml | 37 ---------------------------------- 2 files changed, 38 insertions(+), 37 deletions(-) create mode 100644 .github/workflows/msvc-ci.yml delete mode 100644 appveyor.yml diff --git a/.github/workflows/msvc-ci.yml b/.github/workflows/msvc-ci.yml new file mode 100644 index 000000000..5b3ad3d66 --- /dev/null +++ b/.github/workflows/msvc-ci.yml @@ -0,0 +1,38 @@ +name: msvc + +on: + push: + pull_request: + +jobs: + msvc: + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [windows-2016, windows-latest] + include: + - name: msvc-2017-x86 + os: windows-2016 + VCVARSALLPATH: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat + ARCH: x86 + - name: msvc-2019-amd64 + os: windows-latest + VCVARSALLPATH: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat + ARCH: amd64 + name: ${{ matrix.name }} + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v1 + with: + python-version: '3.x' + - name: Build + shell: cmd + run: | + pip install --upgrade meson ninja fonttools + "${{ matrix.VCVARSALLPATH }}" ${{ matrix.ARCH }} && meson setup build --wrap-mode=default --buildtype=release -Dglib=enabled -Dfreetype=enabled -Dgdi=enabled -Ddirectwrite=enabled && meson test --print-errorlogs --suite=harfbuzz -Cbuild + - name: Test + shell: cmd + run: | + meson test --print-errorlogs --suite=harfbuzz -Cbuild diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 0ebfadcfd..000000000 --- a/appveyor.yml +++ /dev/null @@ -1,37 +0,0 @@ -platform: x64 - -environment: - matrix: - - vcvarsallpath: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat - arch: amd64 - - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - vcvarsallpath: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat - arch: x86 - - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 - vcvarsallpath: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat - arch: amd64 - -build_script: - - set "PYTHON_ROOT=C:\python37-x64" - - set "PATH=%PYTHON_ROOT%;%PYTHON_ROOT%\Scripts;%PATH%" - - pip install --upgrade meson fonttools - - '"%vcvarsallpath%" %arch% && meson setup build --wrap-mode=default --buildtype=release -Dglib=enabled -Dfreetype=enabled -Dgdi=enabled -Ddirectwrite=enabled && meson test --print-errorlogs --suite=harfbuzz -Cbuild' - -cache: - - c:\tools\vcpkg\installed\ - -notifications: - - provider: Email - to: - - harfbuzz-bots-chatter@googlegroups.com - on_build_success: false - on_build_failure: true - on_build_status_changed: true - -# Do not build feature branch with open Pull Requests -skip_branch_with_pr: true - -# disable automatic tests -test: off From 93aea76a25640d923168272f001db43e776c8bdb Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Sat, 18 Jul 2020 19:32:19 +0200 Subject: [PATCH 2/2] Fix the GHA msvc build Use the 'ilammy/msvc-dev-cmd' action for setting up the msvc env, so we can use powershell everywhere. Remove a directory from PATH which was interfering with the meson build by providing an unrelated pkg-config.exe. --- .github/workflows/msvc-ci.yml | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/.github/workflows/msvc-ci.yml b/.github/workflows/msvc-ci.yml index 5b3ad3d66..4fae289a0 100644 --- a/.github/workflows/msvc-ci.yml +++ b/.github/workflows/msvc-ci.yml @@ -14,11 +14,9 @@ jobs: include: - name: msvc-2017-x86 os: windows-2016 - VCVARSALLPATH: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat ARCH: x86 - name: msvc-2019-amd64 os: windows-latest - VCVARSALLPATH: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat ARCH: amd64 name: ${{ matrix.name }} @@ -27,12 +25,26 @@ jobs: - uses: actions/setup-python@v1 with: python-version: '3.x' - - name: Build - shell: cmd + - uses: ilammy/msvc-dev-cmd@v1 + with: + arch : ${{ matrix.ARCH }} + - name: Install Dependencies run: | pip install --upgrade meson ninja fonttools - "${{ matrix.VCVARSALLPATH }}" ${{ matrix.ARCH }} && meson setup build --wrap-mode=default --buildtype=release -Dglib=enabled -Dfreetype=enabled -Dgdi=enabled -Ddirectwrite=enabled && meson test --print-errorlogs --suite=harfbuzz -Cbuild - - name: Test - shell: cmd + - name: Build run: | - meson test --print-errorlogs --suite=harfbuzz -Cbuild + # This dir contains a pkg-config which meson will happily use and later fail, so remove it + $env:path = ($env:path.Split(';') | Where-Object { $_ -ne 'C:\Strawberry\perl\bin' }) -join ';' + + meson setup build ` + --wrap-mode=default ` + --buildtype=release ` + -Dglib=enabled ` + -Dfreetype=enabled ` + -Dgdi=enabled ` + -Ddirectwrite=enabled + + meson compile -C build + - name: Test + run: | + meson test --print-errorlogs --suite=harfbuzz -C build