From 6b866401db19a8a0fa59cbcb9c90999783bbae4d Mon Sep 17 00:00:00 2001 From: Chris Darroch Date: Thu, 17 Sep 2020 22:16:19 -0700 Subject: [PATCH] Actions: add Watchman-enabled builds to CI matrix --- .github/workflows/continuous-integration.yml | 35 ++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index a6708cd53e..09a7f33b47 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -15,6 +15,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-16.04, ubuntu-18.04, ubuntu-20.04, windows-2019, macos-10.15] + watchman: [false, true] env: BUILD_FRAGMENT: bin/Release/netcoreapp3.1 @@ -92,6 +93,40 @@ jobs: Wait-Process $files[0].Basename Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\SOFTWARE\GitForWindows' + - name: Install Watchman (Linux) + if: runner.os == 'Linux' && matrix.watchman + run: | + cd .. + git clone https://github.com/facebook/watchman.git -b v4.9.0 --depth 1 + cd watchman + ./autogen.sh + GCC_VERSION=$(gcc -dumpversion | cut -d. -f1) + if [ "$GCC_VERSION" -ge 7 ]; then CPPFLAGS="-Wno-error=format-truncation"; fi + if [ "$GCC_VERSION" -ge 8 ]; then CPPFLAGS="$CPPFLAGS -Wno-error=class-memaccess"; fi + export CPPFLAGS + ./configure --without-python + make + sudo make install + + - name: Install Watchman (Mac) + if: runner.os == 'macOS' && matrix.watchman + run: brew install watchman + + - name: Install Watchman (Windows) + if: runner.os == 'Windows' && matrix.watchman + run: | + Write-Host 'Downloading Watchman ...' + $Uri = (Select-Xml -Path Directory.Build.props -XPath /Project/PropertyGroup/WatchmanPackageUrl).Node.'#text' + Set-Location -Path .. + Invoke-WebRequest -Uri $Uri -OutFile watchman.zip + Expand-Archive watchman.zip + Write-Host 'Installing Watchman ...' + New-Item -Path 'C:\Program Files' -Name Watchman -ItemType Directory | Out-Null + Copy-Item -Path 'watchman\watchman-*-windows\bin\*' -Destination 'C:\Program Files\Watchman' + $ENV:PATH="$ENV:PATH;C:\Program Files\Watchman" + & watchman --version + echo "::add-path::C:\Program Files\Watchman" + - name: Functional test shell: bash run: |