Skip to content

Commit

Permalink
GH-7: Add macOS, Windows CI (#432)
Browse files Browse the repository at this point in the history
Fixes #7.
Fixes #8.
  • Loading branch information
lidavidm authored Nov 29, 2024
1 parent 55fced5 commit 8f8c62f
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 10 deletions.
70 changes: 69 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
with:
path: .docker
key: maven-${{ matrix.jdk }}-${{ matrix.maven }}-${{ hashFiles('**/docker-compose.yml') }}
key: maven-${{ matrix.jdk }}-${{ matrix.maven }}-${{ hashFiles('**/docker-compose.yml', '**/pom.xml') }}
restore-keys: maven-${{ matrix.jdk }}-${{ matrix.maven }}-
- name: Execute Docker Build
env:
Expand All @@ -72,3 +72,71 @@ jobs:
-e CI=true \
-e "DEVELOCITY_ACCESS_KEY=$DEVELOCITY_ACCESS_KEY" \
${{ matrix.image }}
macos:
name: ${{ matrix.arch }} macOS ${{ matrix.macos }} Java JDK ${{ matrix.jdk }}
runs-on: macos-${{ matrix.macos }}
if: ${{ !contains(github.event.pull_request.title, 'WIP') }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
include:
- arch: AMD64
jdk: 11
macos: 13
- arch: AArch64
jdk: 11
macos: latest
steps:
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.jdk }}
- name: Checkout Arrow
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Build
shell: bash
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
run: ci/scripts/java_build.sh $(pwd) $(pwd)/build
- name: Test
shell: bash
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
run: ci/scripts/java_test.sh $(pwd) $(pwd)/build

windows:
name: AMD64 Windows Server 2022 Java JDK ${{ matrix.jdk }}
runs-on: windows-latest
if: ${{ !contains(github.event.pull_request.title, 'WIP') }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
jdk: [11]
steps:
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.jdk }}
distribution: 'temurin'
- name: Checkout Arrow
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- name: Build
shell: bash
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
run: ci/scripts/java_build.sh $(pwd) $(pwd)/build
- name: Test
shell: bash
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
run: ci/scripts/java_test.sh $(pwd) $(pwd)/build
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,3 @@ cmake_install.cmake
dependency-reduced-pom.xml
install_manifest.txt
target/
/.mvn/.develocity/
2 changes: 1 addition & 1 deletion arrow-format/FlightSql.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1857,7 +1857,7 @@ message DoPutPreparedStatementResult {
// statement should be considered invalid, and all subsequent requests for this prepared
// statement must use this new handle.
// The updated handle allows implementing query parameters with stateless services.
//
//
// When an updated handle is not provided by the server, clients should contiue
// using the previous handle provided by `ActionCreatePreparedStatementResonse`.
optional bytes prepared_statement_handle = 1;
Expand Down
4 changes: 2 additions & 2 deletions arrow-format/Schema.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -216,14 +216,14 @@ table Bool {

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

/// Exact decimal value represented as an integer value in two's
/// complement. Currently 32-bit (4-byte), 64-bit (8-byte),
/// complement. Currently 32-bit (4-byte), 64-bit (8-byte),
/// 128-bit (16-byte) and 256-bit (32-byte) integers are used.
/// The representation uses the endianness indicated in the Schema.
table Decimal {
Expand Down
3 changes: 1 addition & 2 deletions arrow-format/substrait/extension_types.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
# * Functions have the same meaning when applied to the encoded type
#
# Note: if two types have a different range (e.g. string and large_string) then
# they do not satisfy the above criteria and are not encodings.
# they do not satisfy the above criteria and are not encodings.
#
# These types will never have a Substrait equivalent. In the Substrait point
# of view these are execution details.
Expand Down Expand Up @@ -167,4 +167,3 @@ types:
parameters:
- name: unit
type: string

15 changes: 12 additions & 3 deletions ci/scripts/java_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,18 @@ mkdir -p "${build_dir}/arrow-format"
cp -r "${source_dir}/arrow-format" "${build_dir}"
cp -r "${source_dir}/dev" "${build_dir}"

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}" '{}' \; |
awk -F/ '{print $1}' |
sort -u); do
# Instead of hardcoding the list of directories to copy, find pom.xml and then
# crawl back up to the top. GNU realpath has --relative-to but this does not
# work on macOS

poms=$(find "${source_dir}" -not \( -path "${source_dir}"/build -prune \) -type f -name pom.xml)
if [[ "$OSTYPE" == "darwin"* ]]; then
poms=$(echo "$poms" | xargs -n1 python -c "import sys; import os.path; print(os.path.relpath(sys.argv[1], '${source_dir}'))")
else
poms=$(echo "$poms" | xargs -n1 realpath -s --relative-to="${source_dir}")
fi

for source_root in $(echo "${poms}" | awk -F/ '{print $1}' | sort -u); do
cp -r "${source_dir}/${source_root}" "${build_dir}"
done

Expand Down
1 change: 1 addition & 0 deletions dev/release/rat_exclude_files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@
# specific language governing permissions and limitations
# under the License.

.gitmodules
dataset/src/test/resources/data/student.csv

0 comments on commit 8f8c62f

Please sign in to comment.