-
-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathazure-pipelines.yml
34 lines (34 loc) · 1.59 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
jobs:
- job: macOS
pool:
vmImage: macOS-latest
steps:
- bash: |
set -e
brew update-reset
sudo rm -rf /usr/local/include/node
HOMEBREW_TAP_DIR="/usr/local/Homebrew/Library/Taps/kabel/homebrew-php-ext"
mkdir -p "$HOMEBREW_TAP_DIR"
rm -rf "$HOMEBREW_TAP_DIR"
ln -s "$PWD" "$HOMEBREW_TAP_DIR"
if [ -z "$SYSTEM_PULLREQUEST_TARGETBRANCH" ]; then export SYSTEM_PULLREQUEST_TARGETBRANCH="main"; fi
if [ "$BUILD_REASON" = "PullRequest" ]; then export GITHUB_EVENT_NAME="pull_request"; fi
export GITHUB_BASE_REF="$SYSTEM_PULLREQUEST_TARGETBRANCH"
export GITHUB_SHA="$BUILD_SOURCEVERSION"
export GITHUB_ACTIONS="fake"
export GITHUB_REPOSITORY="$BUILD_REPOSITORY_NAME"
export GITHUB_REF="$BUILD_SOURCEBRANCH"
export HOMEBREW_GITHUB_ACTIONS=fake
echo "==> Dumping Pipelines Vars..."
echo "BUILD_REPOSITORY_NAME=$BUILD_REPOSITORY_NAME"
echo "BUILD_SOURCEBRANCH=$BUILD_SOURCEBRANCH"
echo "BUILD_SOURCEBRANCHNAME=$BUILD_SOURCEBRANCHNAME"
echo "BUILD_SOURCEVERSION=$BUILD_SOURCEVERSION"
echo "BUILD_REASON=$BUILD_REASON"
echo "SYSTEM_PULLREQUEST_SOURCEBRANCH=$SYSTEM_PULLREQUEST_SOURCEBRANCH"
echo "SYSTEM_PULLREQUEST_TARGETBRANCH=$SYSTEM_PULLREQUEST_TARGETBRANCH"
echo
TEST_PARAMS=""
if [ "$BUILD_REASON" != "PullRequest" -a "$BUILD_SOURCEBRANCHNAME" = "$SYSTEM_PULLREQUEST_TARGETBRANCH" ]; then TEST_PARAMS="--only-tap-syntax"; fi
brew test-bot --tap=kabel/php-ext $TEST_PARAMS
displayName: Run brew test-bot