Skip to content

Commit fb42fa8

Browse files
authored
release followup: glibc, android 16kb, release process (#181)
* release followup: glibc, android 16kb, release process * adjust dockcross tag * fix [ * fix using CURRENT_DOCKCROSS_TAG * revert dockcross script * fix format check condition
1 parent 7eab13d commit fb42fa8

File tree

9 files changed

+58
-37
lines changed

9 files changed

+58
-37
lines changed

.github/workflows/release.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020

2121
strategy:
2222
matrix:
23-
os: [ubuntu-latest]
23+
os: [ubuntu-22.04]
2424
java-distribution: [adopt]
2525
java-version: [11]
2626
dockcross-only:
@@ -122,7 +122,7 @@ jobs:
122122
if-no-files-found: error
123123

124124
release:
125-
runs-on: ubuntu-latest
125+
runs-on: ubuntu-22.04
126126
permissions:
127127
contents: write # allow pushing commits/tags
128128

@@ -211,14 +211,15 @@ jobs:
211211
env:
212212
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
213213

214-
- name: Bump to next snapshot version
215-
if: ${{ github.event_name != 'workflow_dispatch' }}
216-
run: |
217-
# Bump minor version (for example) and append -SNAPSHOT for continued development
218-
NEXT_VERSION=$(echo $RELEASE_VERSION | awk -F. -v OFS="." '{$NF += 1; print $0}') # increment last segment
219-
NEXT_VERSION="$NEXT_VERSION-SNAPSHOT"
220-
sed -i -E "s/$RELEASE_VERSION/$NEXT_VERSION/" gradle.properties || true
221-
git config user.name "github-actions"
222-
git config user.email "[email protected]"
223-
git commit -am "chore: start next development cycle $NEXT_VERSION [skip ci]"
224-
git push origin HEAD:master
214+
# This doesn't work because we don't permit pushes directly to main.
215+
# - name: Bump to next snapshot version
216+
# if: ${{ github.event_name != 'workflow_dispatch' }}
217+
# run: |
218+
# # Bump minor version (for example) and append -SNAPSHOT for continued development
219+
# NEXT_VERSION=$(echo $RELEASE_VERSION | awk -F. -v OFS="." '{$NF += 1; print $0}') # increment last segment
220+
# NEXT_VERSION="$NEXT_VERSION-SNAPSHOT"
221+
# sed -i -E "s/$RELEASE_VERSION/$NEXT_VERSION/" gradle.properties || true
222+
# git config user.name "github-actions"
223+
# git config user.email "[email protected]"
224+
# git commit -am "chore: start next development cycle $NEXT_VERSION [skip ci]"
225+
# git push origin HEAD:master

.github/workflows/tests.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
strategy:
1818
matrix:
19-
os: [ubuntu-latest]
19+
os: [ubuntu-22.04]
2020
java-distribution: [adopt]
2121
java-version: [11, 17, 21, 22]
2222
dockcross-only: ["android-arm", "android-arm64", "linux-arm64", "linux-armv5", "linux-armv7", "linux-s390x", "linux-ppc64le", "linux-x64", "linux-x86", "windows-static-x64", "windows-static-x86"]
@@ -45,9 +45,8 @@ jobs:
4545
restore-keys: |
4646
${{ runner.os }}-gradle-
4747
48-
# - name: Format check
49-
# if: ${{ matrix.java-version != 8 }}
50-
# run: ./gradlew spotlessCheck
48+
- name: Format check
49+
run: ./gradlew spotlessCheck
5150

5251
- name: Tests
5352
run: ./gradlew clean test -Ph3SystemPrune=true "-Ph3DockcrossOnly=${{ matrix.dockcross-only }}"
@@ -73,7 +72,7 @@ jobs:
7372

7473
strategy:
7574
matrix:
76-
os: [ubuntu-latest]
75+
os: [ubuntu-22.04]
7776
java-distribution: [adopt]
7877
java-version: [21]
7978
dockcross-tag: ["latest"]
@@ -161,7 +160,7 @@ jobs:
161160

162161
strategy:
163162
matrix:
164-
os: [ubuntu-latest]
163+
os: [ubuntu-22.04]
165164
java-distribution: [adopt]
166165
java-version: [21]
167166

@@ -204,7 +203,7 @@ jobs:
204203

205204
strategy:
206205
matrix:
207-
os: [ubuntu-latest]
206+
os: [ubuntu-22.04]
208207
java-distribution: [adopt]
209208
java-version: [11]
210209

@@ -260,7 +259,7 @@ jobs:
260259

261260
strategy:
262261
matrix:
263-
os: [ ubuntu-latest ]
262+
os: [ ubuntu-22.04 ]
264263
java-distribution: [ graalvm ]
265264
java-version: [ 21 ]
266265

.github/workflows/website.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
jobs:
1010
deploy-website:
1111
name: Deploy website
12-
runs-on: ubuntu-latest
12+
runs-on: ubuntu-22.04
1313

1414
steps:
1515
- uses: actions/checkout@v4

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ The public API of this library consists of the public functions declared in
55
file [H3Core.java](./src/main/java/com/uber/h3core/H3Core.java), and support
66
for the Linux x64 and Darwin x64 platforms.
77

8-
## [4.3.0] - 2025-06-26
8+
## Unreleased Changes
9+
### Changed
10+
- Reverted Ubuntu build to 22.04 for older glibc compatibility.
11+
- Upgraded dockcross version for Android 16kb support.
12+
13+
## [4.3.0] - 2025-08-21
914
### Added
1015
- `polygonToCellsExperimental` functions from H3 v4.2.0. (#163)
1116
- `gridRing` function from H3 v4.3.0. (#169)

build.gradle

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ plugins {
1515
id 'signing'
1616
id 'jacoco'
1717
// id 'com.github.spotbugs' version '5.2.1'
18-
// TODO: Requires Java 11
19-
// id 'com.diffplug.spotless' version '6.25.0'
18+
id 'com.diffplug.spotless' version '7.2.1'
2019
id 'com.github.nbaztec.coveralls-jacoco' version '1.2.20'
2120
id 'com.vanniktech.maven.publish' version '0.34.0'
2221
}
@@ -91,11 +90,11 @@ test {
9190
// finalizedBy jacocoTestReport
9291
}
9392

94-
// spotless {
95-
// java {
96-
// googleJavaFormat()
97-
// }
98-
// }
93+
spotless {
94+
java {
95+
googleJavaFormat()
96+
}
97+
}
9998

10099
jacoco {
101100
toolVersion = '0.8.12'

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
org.gradle.configuration-cache=false
66

77
# No spaces on the following line, needed by release.yml:
8-
version=4.3.0
8+
version=4.3.1-SNAPSHOT
99

src/main/c/h3-java/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# limitations under the License.
1515
#
1616

17-
cmake_minimum_required(VERSION 3.1)
17+
cmake_minimum_required(VERSION 3.20)
1818

1919
set(CMAKE_C_STANDARD_REQUIRED 1)
2020
set(CMAKE_C_STANDARD 11)
@@ -67,6 +67,11 @@ mark_as_advanced(H3_CORE_LIBRARY_PATH)
6767

6868
target_link_libraries(h3-java "${H3_BUILD_ROOT}/${H3_CORE_LIBRARY_PATH}${CMAKE_STATIC_LIBRARY_SUFFIX}")
6969

70+
option(H3_JAVA_ANDROID "Whether to enable Android specific build flags")
71+
if(H3_JAVA_ANDROID)
72+
target_link_options(h3-java PRIVATE "-Wl,-z,max-page-size=16384")
73+
endif()
74+
7075
find_library(M_LIB m)
7176
if(M_LIB)
7277
target_link_libraries(h3-java ${M_LIB})

src/main/c/h3-java/build-h3-docker.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@
1515
# limitations under the License.
1616
#
1717

18-
# Arguments: [build-root] [upgrade-cmake]
19-
# build-root - Location to build the library.
20-
# upgrade-cmake - Whether to download and install a new version of CMake
21-
# cmake-root - Where to download and install the new version of CMake
18+
# Arguments: [build-root] [upgrade-cmake] [cmake-root] [cmake-additional]
19+
# build-root - Location to build the library.
20+
# upgrade-cmake - Whether to download and install a new version of CMake
21+
# cmake-root - Where to download and install the new version of CMake
22+
# cmake-additional - Additional arguments to pass to CMake
2223
#
2324
# Builds H3 and H3-Java in the given directory. This is intended to be
2425
# called from build-h3.sh as part of the cross compilation process.
@@ -28,6 +29,7 @@ set -ex
2829
BUILD_ROOT=$1
2930
UPGRADE_CMAKE=$2
3031
CMAKE_ROOT=$3
32+
CMAKE_ADDITIONAL=$4
3133

3234
# TODO: This may no longer be necessary
3335
if $UPGRADE_CMAKE; then
@@ -58,6 +60,7 @@ cmake -DBUILD_SHARED_LIBS=OFF \
5860
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
5961
-DCMAKE_BUILD_TYPE=Release \
6062
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY=lib \
63+
$CMAKE_ADDITIONAL \
6164
../../h3
6265
make h3
6366
H3_BUILD_ROOT="$(pwd)"
@@ -67,5 +70,6 @@ popd
6770
cmake -DBUILD_SHARED_LIBS=ON \
6871
"-DH3_BUILD_ROOT=$H3_BUILD_ROOT" \
6972
-DCMAKE_BUILD_TYPE=Release \
73+
$CMAKE_ADDITIONAL \
7074
/work/src/main/c/h3-java
7175
make h3-java

src/main/c/h3-java/build-h3.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,16 @@ for image in $DOCKCROSS_IMAGES; do
200200
docker run --rm dockcross/$image:$DOCKCROSS_TAG > $BUILD_ROOT/dockcross
201201
chmod +x $BUILD_ROOT/dockcross
202202

203+
SPECIAL_ANDROID_FLAGS=""
204+
if [ "$image" = "android-arm" ]; then
205+
SPECIAL_ANDROID_FLAGS="-DH3_JAVA_ANDROID=ON"
206+
fi
207+
if [ "$image" = "android-arm64" ]; then
208+
SPECIAL_ANDROID_FLAGS="-DH3_JAVA_ANDROID=ON"
209+
fi
210+
203211
# Perform the actual build inside Docker
204-
$BUILD_ROOT/dockcross --args "-v $JAVA_HOME:/java" src/main/c/h3-java/build-h3-docker.sh "$BUILD_ROOT" "$UPGRADE_CMAKE" "$CMAKE_ROOT"
212+
$BUILD_ROOT/dockcross --args "-v $JAVA_HOME:/java" src/main/c/h3-java/build-h3-docker.sh "$BUILD_ROOT" "$UPGRADE_CMAKE" "$CMAKE_ROOT" "$SPECIAL_ANDROID_FLAGS"
205213

206214
# Copy the built artifact into the source tree so it can be included in the
207215
# built JAR.

0 commit comments

Comments
 (0)