Skip to content

Commit

Permalink
Actions: add Watchman-enabled builds to CI matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisd8088 committed Sep 22, 2020
1 parent 4d0548c commit 604bbcd
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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: |
Expand Down

0 comments on commit 604bbcd

Please sign in to comment.