2828 {{ macros.github_checkout_arrow()|indent }}
2929 {{ macros.github_install_archery()|indent }}
3030 - name : Build C++ libraries
31+ env :
32+ {{ macros.github_set_sccache_envvars()|indent(8) }}
3133 run : |
3234 archery docker run \
3335 -e ARROW_JAVA_BUILD=OFF \
@@ -48,47 +50,65 @@ jobs:
4850 {% endif %}
4951
5052 build-cpp-macos :
51- name : Build C++ libraries macOS
52- runs-on : macos-latest
53+ {% set arch = '${{ matrix.platform.arch }}' %}
54+ name : Build C++ libraries macOS {{ arch }}
55+ runs-on : {{ '${{ matrix.platform.runs_on }}' }}
56+ strategy :
57+ fail-fast : false
58+ matrix :
59+ platform :
60+ - { runs_on: ["macos-latest"], arch: "x86_64"}
61+ - { runs_on: ["self-hosted", "macOS", "arm64", "devops-managed"], arch: "aarch_64" }
5362 env :
5463 MACOSX_DEPLOYMENT_TARGET : " 10.13"
5564 steps :
5665 {{ macros.github_checkout_arrow()|indent }}
57- {{ macros.github_install_archery()|indent }}
66+ - name : Set up Python
67+ if : |
68+ !contains(matrix.platform.runs_on, 'self-hosted')
69+ uses : actions/setup-python@v4
70+ with :
71+ cache : ' pip'
72+ python-version : 3.8
73+ - name : Install Archery
74+ shell : bash
75+ run : pip install -e arrow/dev/archery[all]
5876 - name : Install dependencies
5977 run : |
60- brew install --overwrite git
6178 brew bundle --file=arrow/cpp/Brewfile
6279 # We want to link aws-sdk-cpp statically but Homebrew's
6380 # aws-sdk-cpp provides only shared library. If we have
6481 # Homebrew's aws-sdk-cpp, our build mix Homebrew's
6582 # aws-sdk-cpp and bundled aws-sdk-cpp. We uninstall Homebrew's
6683 # aws-sdk-cpp to ensure using only bundled aws-sdk-cpp.
6784 brew uninstall aws-sdk-cpp
68- - name : Setup ccache
69- run : |
70- arrow/ci/scripts/ccache_setup.sh
85+ brew bundle --file=arrow/java/Brewfile
7186 - name : Build C++ libraries
87+ env :
88+ {{ macros.github_set_sccache_envvars()|indent(8) }}
7289 run : |
7390 set -e
91+ # make brew Java available to CMake
92+ if [ "{{ arch }}" = "aarch_64" ]; then
93+ export JAVA_HOME=$(brew --prefix openjdk@11)/libexec/openjdk.jdk/Contents/Home
94+ fi
7495 arrow/ci/scripts/java_jni_macos_build.sh \
7596 $GITHUB_WORKSPACE/arrow \
7697 $GITHUB_WORKSPACE/arrow/cpp-build \
7798 $GITHUB_WORKSPACE/arrow/java-dist
7899 - name : Compress into single artifact to keep directory structure
79- run : tar -cvzf arrow-shared-libs-macos.tar.gz arrow/java-dist/
100+ run : tar -cvzf arrow-shared-libs-macos-{{ arch }} .tar.gz arrow/java-dist/
80101 - name : Upload artifacts
81102 uses : actions/upload-artifact@v2
82103 with :
83- name : macos-shared-lib
84- path : arrow-shared-libs-macos.tar.gz
104+ name : macos-shared-lib-{{ arch }}
105+ path : arrow-shared-libs-macos-{{ arch }} .tar.gz
85106
86107 build-cpp-windows :
87108 name : Build C++ libraries Windows
88109 runs-on : windows-2019
89110 steps :
90111 {{ macros.github_checkout_arrow()|indent }}
91- {{ macros.github_install_archery()|indent }}
92112 - name : Set up Java
93113 uses : actions/setup-java@v3
94114 with :
@@ -97,8 +117,13 @@ jobs:
97117 - name : Download Timezone Database
98118 shell : bash
99119 run : arrow/ci/scripts/download_tz_database.sh
120+ - name : Install sccache
121+ shell : bash
122+ run : arrow/ci/scripts/install_sccache.sh pc-windows-msvc $(pwd)/sccache
100123 - name : Build C++ libraries
101124 shell : cmd
125+ env :
126+ {{ macros.github_set_sccache_envvars()|indent(8) }}
102127 run : |
103128 call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
104129 REM For ORC
@@ -122,39 +147,42 @@ jobs:
122147 - build-cpp-windows
123148 steps :
124149 {{ macros.github_checkout_arrow(fetch_depth=0)|indent }}
125- - name : Download Linux C++ Libraries
126- uses : actions/download-artifact@v2
150+ - name : Download Libraries
151+ uses : actions/download-artifact@v3
127152 with :
128- name : ubuntu-shared-lib
129- - name : Download macOS C++ libraries
130- uses : actions/download-artifact@v2
131- with :
132- name : macos-shared-lib
133- - name : Download Windows C++ libraries
134- uses : actions/download-artifact@v2
135- with :
136- name : windows-shared-lib
137- - name : Descompress artifacts
153+ path : artifacts
154+ - name : Decompress artifacts
138155 run : |
156+ mv artifacts/*/*.tar.gz .
139157 tar -xvzf arrow-shared-libs-linux.tar.gz
140- tar -xvzf arrow-shared-libs-macos.tar.gz
158+ tar -xvzf arrow-shared-libs-macos-x86_64.tar.gz
159+ tar -xvzf arrow-shared-libs-macos-aarch_64.tar.gz
141160 tar -xvzf arrow-shared-libs-windows.tar.gz
142161 - name : Test that shared libraries exist
143162 run : |
144163 set -x
145- test -f arrow/java-dist/libarrow_cdata_jni.dylib
146- test -f arrow/java-dist/libarrow_cdata_jni.so
147- test -f arrow/java-dist/arrow_cdata_jni.dll
148- test -f arrow/java-dist/libarrow_dataset_jni.dylib
149- test -f arrow/java-dist/libarrow_dataset_jni.so
150- test -f arrow/java-dist/arrow_dataset_jni.dll
151- test -f arrow/java-dist/libarrow_orc_jni.dylib
152- test -f arrow/java-dist/libarrow_orc_jni.so
153- test -f arrow/java-dist/arrow_orc_jni.dll
154- test -f arrow/java-dist/libgandiva_jni.dylib
155- test -f arrow/java-dist/libgandiva_jni.so
156- test -f arrow/java-dist/libplasma_java.dylib
157- test -f arrow/java-dist/libplasma_java.so
164+
165+ test -f arrow/java-dist/x86_64/libarrow_cdata_jni.so
166+ test -f arrow/java-dist/x86_64/libarrow_dataset_jni.so
167+ test -f arrow/java-dist/x86_64/libarrow_orc_jni.so
168+ test -f arrow/java-dist/x86_64/libgandiva_jni.so
169+ test -f arrow/java-dist/x86_64/libplasma_java.so
170+
171+ test -f arrow/java-dist/x86_64/libarrow_cdata_jni.dylib
172+ test -f arrow/java-dist/x86_64/libarrow_dataset_jni.dylib
173+ test -f arrow/java-dist/x86_64/libarrow_orc_jni.dylib
174+ test -f arrow/java-dist/x86_64/libgandiva_jni.dylib
175+ test -f arrow/java-dist/x86_64/libplasma_java.dylib
176+
177+ test -f arrow/java-dist/aarch_64/libarrow_cdata_jni.dylib
178+ test -f arrow/java-dist/aarch_64/libarrow_dataset_jni.dylib
179+ test -f arrow/java-dist/aarch_64/libarrow_orc_jni.dylib
180+ test -f arrow/java-dist/aarch_64/libgandiva_jni.dylib
181+ test -f arrow/java-dist/aarch_64/libplasma_java.dylib
182+
183+ test -f arrow/java-dist/x86_64/arrow_cdata_jni.dll
184+ test -f arrow/java-dist/x86_64/arrow_dataset_jni.dll
185+ test -f arrow/java-dist/x86_64/arrow_orc_jni.dll
158186 - name : Build bundled jar
159187 run : |
160188 set -e
0 commit comments