summaryrefslogtreecommitdiffstats
path: root/src/arrow/dev/tasks/conda-recipes/azure.osx.yml
blob: 99bb76ba5209d73828f42b88b4f5aea4476a9023 (plain)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
{% import 'macros.jinja' as macros with context %}

jobs:
- job: osx
  pool:
    vmImage: macOS-10.14
  timeoutInMinutes: 360
  variables:
    CONFIG: {{ config }}
    R_CONFIG: {{ r_config|default("") }}
    ARROW_VERSION: {{ arrow.no_rc_version }}
    UPLOAD_PACKAGES: False
  steps:
  - bash: |
      echo "##vso[task.prependpath]$CONDA/bin"
      sudo chown -R $USER $CONDA
    displayName: Add conda to PATH

  - script: |
      source activate base
      conda config --set channel_priority strict
      conda install -n base -c conda-forge --quiet --yes conda-forge-ci-setup=3 conda-build
    displayName: 'Add conda-forge-ci-setup=3'

  - script: |
      echo "Removing homebrew from Azure to avoid conflicts."
      /usr/bin/sudo mangle_homebrew
      /usr/bin/sudo -k
    displayName: Mangle homebrew

  {{ macros.azure_checkout_arrow() }}

  - script: |
      source activate base
      echo "Configuring conda."

      setup_conda_rc ./ ./ ./.ci_support/${CONFIG}.yaml
      export CI=azure
      source run_conda_forge_build_setup
      conda update --yes --quiet --override-channels -c conda-forge --all
    displayName: Configure conda and conda-build
    workingDirectory: arrow/dev/tasks/conda-recipes
    env:
      OSX_FORCE_SDK_DOWNLOAD: "1"

  - script: |
      source activate base
      mangle_compiler ./ ./ ./.ci_support/${CONFIG}.yaml
    workingDirectory: arrow/dev/tasks/conda-recipes
    displayName: Mangle compiler

  - script: |
      source activate base
      make_build_number ./ ./ ./.ci_support/${CONFIG}.yaml
    workingDirectory: arrow/dev/tasks/conda-recipes
    displayName: Generate build number clobber file

  - script: |
      source activate base
      set +x
      if [[ "${CONFIG}" == osx_arm* ]]; then
        EXTRA_CB_OPTIONS="${EXTRA_CB_OPTIONS:-} --no-test"
      fi
      conda build arrow-cpp \
        -m ./.ci_support/${CONFIG}.yaml \
        --clobber-file ./.ci_support/clobber_${CONFIG}.yaml \
        ${EXTRA_CB_OPTIONS:-} \
        --output-folder ./build_artifacts

      if [ ! -z "${R_CONFIG}" ]; then
        conda build r-arrow \
          -m ./.ci_support/r/${R_CONFIG}.yaml \
          --output-folder ./build_artifacts
      fi
    workingDirectory: arrow/dev/tasks/conda-recipes
    displayName: Build recipes

  - script: |
     sudo mv /usr/local/conda_mangled/* /usr/local/
    displayName: Unmangle homebrew

  {{ macros.azure_upload_releases("arrow/dev/tasks/conda-recipes/build_artifacts/osx-*/*.tar.bz2") }}
  {{ macros.azure_upload_anaconda("arrow/dev/tasks/conda-recipes/build_artifacts/osx-*/*.tar.bz2") }}