Skip to content

Commit 73b78bd

Browse files
committed
[Java] Change OSX CI to just check release JARs, don't build
1 parent 3238fd6 commit 73b78bd

File tree

1 file changed

+3
-57
lines changed

1 file changed

+3
-57
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -680,44 +680,19 @@ jobs:
680680
exit 1
681681
fi
682682
683-
osx:
683+
osx_java:
684684
strategy:
685685
matrix:
686686
include:
687-
- platform: macos-11
688-
- platform: macos-12
689687
- platform: macos-13
688+
- platform: macos-14
690689
fail-fast: false
691690
runs-on: ${{ matrix.platform }}
692691
steps:
693-
- name: Install Rust components
694-
run: |
695-
rustup target install aarch64-apple-darwin
696-
rustup component add rust-src
697692
- name: Checkout source code
698693
uses: actions/checkout@v2
699694
with:
700695
fetch-depth: 0
701-
- name: Install cbindgen
702-
run: cargo install cbindgen
703-
- name: Checkout Rust-Lightning and LDK-C-Bindings git
704-
run: |
705-
git config --global user.email "[email protected]"
706-
git config --global user.name "LDK CI"
707-
# Note this is a different endpoint, as we need one non-upstream commit!
708-
git clone https://github.com/lightningdevkit/rust-lightning
709-
cd rust-lightning
710-
git checkout origin/0.0.123-bindings
711-
cd ..
712-
git clone https://github.com/lightningdevkit/ldk-c-bindings
713-
cd ldk-c-bindings
714-
git checkout 0.0.123
715-
cd lightning-c-bindings
716-
cargo update -p memchr --precise "2.5.0" --verbose
717-
- name: Rebuild C bindings and check the sample app builds + links
718-
run: |
719-
cd ldk-c-bindings
720-
CC=clang ./genbindings.sh ../rust-lightning true
721696
- name: Fetch OpenJDK 18
722697
run: |
723698
if [ "$(uname -m)" = "arm64" ]; then
@@ -735,7 +710,7 @@ jobs:
735710
fi
736711
tar xvvf openjdk-18.0.1.1_macos-x64_bin.tar.gz
737712
fi
738-
- name: Checkout latest Linux binaries
713+
- name: Checkout latest binaries
739714
run: |
740715
export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
741716
echo "Fetching deterministic binaries for LDK-GC ${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}"
@@ -746,24 +721,6 @@ jobs:
746721
cd ldk-java-bins/"${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}"
747722
tar xvvf ../../bins-snapshot.tgz
748723
mv ldk-java-bins-*/* ./
749-
cd ../..
750-
mkdir -p src/main/resources/
751-
cp "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/liblightningjni_Linux-"* src/main/resources/
752-
- name: Build Java Release Bindings
753-
run: |
754-
export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
755-
export JAVA_HOME=`pwd`/jdk-18.0.1.1.jdk/Contents/Home
756-
export PATH=$JAVA_HOME/bin:$PATH
757-
./genbindings.sh ./ldk-c-bindings/ "-I$JAVA_HOME/include/ -I$JAVA_HOME/include/darwin -isysroot$(xcrun --show-sdk-path)" false false
758-
759-
if [ "${{ matrix.platform }}" = "macos-11" ]; then
760-
export CC="clang --target=aarch64-apple-darwin"
761-
export LDK_TARGET=aarch64-apple-darwin
762-
export LDK_TARGET_CPU=apple-a14
763-
./genbindings.sh ./ldk-c-bindings/ "-I$JAVA_HOME/include/ -I$JAVA_HOME/include/darwin -isysroot$(xcrun --show-sdk-path)" false false
764-
cat src/main/resources/liblightningjni_MacOSX-aarch64.nativelib > /dev/null
765-
766-
fi
767724
- name: Fetch Maven 3.8.4
768725
run: |
769726
# We don't bother using the upstream mirrors as they remove prior
@@ -776,17 +733,6 @@ jobs:
776733
fi
777734
tar xvvf apache-maven-3.8.4-bin.tar.gz
778735
export PATH=apache-maven-3.8.4/bin:$PATH
779-
- name: Run Java Tests against built jar
780-
run: |
781-
export JAVA_HOME=`pwd`/jdk-18.0.1.1.jdk/Contents/Home
782-
export PATH=$JAVA_HOME/bin:$PATH
783-
mvn -DskipTests=true package
784-
export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
785-
JAR_VERSION=${LDK_GARBAGECOLLECTED_GIT_OVERRIDE:1:100}
786-
mvn install:install-file -Dfile=target/ldk-java-${JAR_VERSION}.jar -DgroupId=org.lightningdevkit -DartifactId=ldk-java -Dversion=1.0-SNAPSHOT -Dpackaging=jar
787-
cd javatester
788-
mvn -q -B package
789-
java -ea -jar target/ldk-java-tests-1.0-SNAPSHOT-jar-with-dependencies.jar
790736
- name: Run Java Tests against release bins
791737
run: |
792738
export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"

0 commit comments

Comments
 (0)