From: Matt Corallo Date: Thu, 6 Jun 2024 13:40:31 +0000 (+0000) Subject: [Java] Change OSX CI to just check release JARs, don't build X-Git-Tag: v0.0.123.1^2~4 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=73b78bd115dbadea5044e928462af54230a5d6e7;p=ldk-java [Java] Change OSX CI to just check release JARs, don't build --- diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 962bcbeb..97bf61af 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -680,44 +680,19 @@ jobs: exit 1 fi - osx: + osx_java: strategy: matrix: include: - - platform: macos-11 - - platform: macos-12 - platform: macos-13 + - platform: macos-14 fail-fast: false runs-on: ${{ matrix.platform }} steps: - - name: Install Rust components - run: | - rustup target install aarch64-apple-darwin - rustup component add rust-src - name: Checkout source code uses: actions/checkout@v2 with: fetch-depth: 0 - - name: Install cbindgen - run: cargo install cbindgen - - name: Checkout Rust-Lightning and LDK-C-Bindings git - run: | - git config --global user.email "ldk-ci@example.com" - git config --global user.name "LDK CI" - # Note this is a different endpoint, as we need one non-upstream commit! - git clone https://github.com/lightningdevkit/rust-lightning - cd rust-lightning - git checkout origin/0.0.123-bindings - cd .. - git clone https://github.com/lightningdevkit/ldk-c-bindings - cd ldk-c-bindings - git checkout 0.0.123 - cd lightning-c-bindings - cargo update -p memchr --precise "2.5.0" --verbose - - name: Rebuild C bindings and check the sample app builds + links - run: | - cd ldk-c-bindings - CC=clang ./genbindings.sh ../rust-lightning true - name: Fetch OpenJDK 18 run: | if [ "$(uname -m)" = "arm64" ]; then @@ -735,7 +710,7 @@ jobs: fi tar xvvf openjdk-18.0.1.1_macos-x64_bin.tar.gz fi - - name: Checkout latest Linux binaries + - name: Checkout latest binaries run: | export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)" echo "Fetching deterministic binaries for LDK-GC ${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}" @@ -746,24 +721,6 @@ jobs: cd ldk-java-bins/"${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}" tar xvvf ../../bins-snapshot.tgz mv ldk-java-bins-*/* ./ - cd ../.. - mkdir -p src/main/resources/ - cp "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/liblightningjni_Linux-"* src/main/resources/ - - name: Build Java Release Bindings - run: | - export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)" - export JAVA_HOME=`pwd`/jdk-18.0.1.1.jdk/Contents/Home - export PATH=$JAVA_HOME/bin:$PATH - ./genbindings.sh ./ldk-c-bindings/ "-I$JAVA_HOME/include/ -I$JAVA_HOME/include/darwin -isysroot$(xcrun --show-sdk-path)" false false - - if [ "${{ matrix.platform }}" = "macos-11" ]; then - export CC="clang --target=aarch64-apple-darwin" - export LDK_TARGET=aarch64-apple-darwin - export LDK_TARGET_CPU=apple-a14 - ./genbindings.sh ./ldk-c-bindings/ "-I$JAVA_HOME/include/ -I$JAVA_HOME/include/darwin -isysroot$(xcrun --show-sdk-path)" false false - cat src/main/resources/liblightningjni_MacOSX-aarch64.nativelib > /dev/null - - fi - name: Fetch Maven 3.8.4 run: | # We don't bother using the upstream mirrors as they remove prior @@ -776,17 +733,6 @@ jobs: fi tar xvvf apache-maven-3.8.4-bin.tar.gz export PATH=apache-maven-3.8.4/bin:$PATH - - name: Run Java Tests against built jar - run: | - export JAVA_HOME=`pwd`/jdk-18.0.1.1.jdk/Contents/Home - export PATH=$JAVA_HOME/bin:$PATH - mvn -DskipTests=true package - export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)" - JAR_VERSION=${LDK_GARBAGECOLLECTED_GIT_OVERRIDE:1:100} - mvn install:install-file -Dfile=target/ldk-java-${JAR_VERSION}.jar -DgroupId=org.lightningdevkit -DartifactId=ldk-java -Dversion=1.0-SNAPSHOT -Dpackaging=jar - cd javatester - mvn -q -B package - java -ea -jar target/ldk-java-tests-1.0-SNAPSHOT-jar-with-dependencies.jar - name: Run Java Tests against release bins run: | export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"