Skip to content

Commit 8f8c62f

Browse files
authoredNov 29, 2024
apacheGH-7: Add macOS, Windows CI (apache#432)
Fixes apache#7. Fixes apache#8.
1 parent 55fced5 commit 8f8c62f

File tree

7 files changed

+86
-10
lines changed

7 files changed

+86
-10
lines changed
 

‎.github/workflows/test.yml

+69-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
6262
with:
6363
path: .docker
64-
key: maven-${{ matrix.jdk }}-${{ matrix.maven }}-${{ hashFiles('**/docker-compose.yml') }}
64+
key: maven-${{ matrix.jdk }}-${{ matrix.maven }}-${{ hashFiles('**/docker-compose.yml', '**/pom.xml') }}
6565
restore-keys: maven-${{ matrix.jdk }}-${{ matrix.maven }}-
6666
- name: Execute Docker Build
6767
env:
@@ -72,3 +72,71 @@ jobs:
7272
-e CI=true \
7373
-e "DEVELOCITY_ACCESS_KEY=$DEVELOCITY_ACCESS_KEY" \
7474
${{ matrix.image }}
75+
76+
macos:
77+
name: ${{ matrix.arch }} macOS ${{ matrix.macos }} Java JDK ${{ matrix.jdk }}
78+
runs-on: macos-${{ matrix.macos }}
79+
if: ${{ !contains(github.event.pull_request.title, 'WIP') }}
80+
timeout-minutes: 30
81+
strategy:
82+
fail-fast: false
83+
matrix:
84+
include:
85+
- arch: AMD64
86+
jdk: 11
87+
macos: 13
88+
- arch: AArch64
89+
jdk: 11
90+
macos: latest
91+
steps:
92+
- name: Set up Java
93+
uses: actions/setup-java@v4
94+
with:
95+
distribution: 'temurin'
96+
java-version: ${{ matrix.jdk }}
97+
- name: Checkout Arrow
98+
uses: actions/checkout@v4
99+
with:
100+
fetch-depth: 0
101+
submodules: recursive
102+
- name: Build
103+
shell: bash
104+
env:
105+
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
106+
run: ci/scripts/java_build.sh $(pwd) $(pwd)/build
107+
- name: Test
108+
shell: bash
109+
env:
110+
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
111+
run: ci/scripts/java_test.sh $(pwd) $(pwd)/build
112+
113+
windows:
114+
name: AMD64 Windows Server 2022 Java JDK ${{ matrix.jdk }}
115+
runs-on: windows-latest
116+
if: ${{ !contains(github.event.pull_request.title, 'WIP') }}
117+
timeout-minutes: 30
118+
strategy:
119+
fail-fast: false
120+
matrix:
121+
jdk: [11]
122+
steps:
123+
- name: Set up Java
124+
uses: actions/setup-java@v4
125+
with:
126+
java-version: ${{ matrix.jdk }}
127+
distribution: 'temurin'
128+
- name: Checkout Arrow
129+
uses: actions/checkout@v4
130+
with:
131+
fetch-depth: 0
132+
submodules: recursive
133+
- name: Build
134+
shell: bash
135+
env:
136+
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
137+
run: ci/scripts/java_build.sh $(pwd) $(pwd)/build
138+
- name: Test
139+
shell: bash
140+
env:
141+
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
142+
run: ci/scripts/java_test.sh $(pwd) $(pwd)/build

‎.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,3 @@ cmake_install.cmake
2626
dependency-reduced-pom.xml
2727
install_manifest.txt
2828
target/
29-
/.mvn/.develocity/

‎arrow-format/FlightSql.proto

+1-1
Original file line numberDiff line numberDiff line change
@@ -1857,7 +1857,7 @@ message DoPutPreparedStatementResult {
18571857
// statement should be considered invalid, and all subsequent requests for this prepared
18581858
// statement must use this new handle.
18591859
// The updated handle allows implementing query parameters with stateless services.
1860-
//
1860+
//
18611861
// When an updated handle is not provided by the server, clients should contiue
18621862
// using the previous handle provided by `ActionCreatePreparedStatementResonse`.
18631863
optional bytes prepared_statement_handle = 1;

‎arrow-format/Schema.fbs

+2-2
Original file line numberDiff line numberDiff line change
@@ -216,14 +216,14 @@ table Bool {
216216

217217
/// Contains two child arrays, run_ends and values.
218218
/// The run_ends child array must be a 16/32/64-bit integer array
219-
/// which encodes the indices at which the run with the value in
219+
/// which encodes the indices at which the run with the value in
220220
/// each corresponding index in the values child array ends.
221221
/// Like list/struct types, the value array can be of any type.
222222
table RunEndEncoded {
223223
}
224224

225225
/// Exact decimal value represented as an integer value in two's
226-
/// complement. Currently 32-bit (4-byte), 64-bit (8-byte),
226+
/// complement. Currently 32-bit (4-byte), 64-bit (8-byte),
227227
/// 128-bit (16-byte) and 256-bit (32-byte) integers are used.
228228
/// The representation uses the endianness indicated in the Schema.
229229
table Decimal {

‎arrow-format/substrait/extension_types.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
# * Functions have the same meaning when applied to the encoded type
4949
#
5050
# Note: if two types have a different range (e.g. string and large_string) then
51-
# they do not satisfy the above criteria and are not encodings.
51+
# they do not satisfy the above criteria and are not encodings.
5252
#
5353
# These types will never have a Substrait equivalent. In the Substrait point
5454
# of view these are execution details.
@@ -167,4 +167,3 @@ types:
167167
parameters:
168168
- name: unit
169169
type: string
170-

‎ci/scripts/java_build.sh

+12-3
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,18 @@ mkdir -p "${build_dir}/arrow-format"
4444
cp -r "${source_dir}/arrow-format" "${build_dir}"
4545
cp -r "${source_dir}/dev" "${build_dir}"
4646

47-
for source_root in $(find "${source_dir}" -not \( -path "${source_dir}"/build -prune \) -type f -name pom.xml -exec realpath -s --relative-to="${source_dir}" '{}' \; |
48-
awk -F/ '{print $1}' |
49-
sort -u); do
47+
# Instead of hardcoding the list of directories to copy, find pom.xml and then
48+
# crawl back up to the top. GNU realpath has --relative-to but this does not
49+
# work on macOS
50+
51+
poms=$(find "${source_dir}" -not \( -path "${source_dir}"/build -prune \) -type f -name pom.xml)
52+
if [[ "$OSTYPE" == "darwin"* ]]; then
53+
poms=$(echo "$poms" | xargs -n1 python -c "import sys; import os.path; print(os.path.relpath(sys.argv[1], '${source_dir}'))")
54+
else
55+
poms=$(echo "$poms" | xargs -n1 realpath -s --relative-to="${source_dir}")
56+
fi
57+
58+
for source_root in $(echo "${poms}" | awk -F/ '{print $1}' | sort -u); do
5059
cp -r "${source_dir}/${source_root}" "${build_dir}"
5160
done
5261

‎dev/release/rat_exclude_files.txt

+1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18+
.gitmodules
1819
dataset/src/test/resources/data/student.csv

0 commit comments

Comments
 (0)