X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=.github%2Fworkflows%2Fbuild.yml;h=6b274534c8a50c6e77b1a7ba7396c9cf22ae5787;hb=a7fb7184b979290e6a3a64d0ec92899d444685f4;hp=74b9bc5b907f4db9bd98fcee1f1243f75bf62709;hpb=5ad90e3a10edbf90dde4142db1ab422520226261;p=ldk-java diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 74b9bc5b..6b274534 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,7 +26,7 @@ jobs: with: fetch-depth: 0 - name: Install cbindgen - run: cargo install --force cbindgen + run: cargo install --version 0.20.0 cbindgen - name: Checkout Rust-Lightning and LDK-C-Bindings git run: | git config --global user.email "ldk-ci@example.com" @@ -38,7 +38,7 @@ jobs: cd .. git clone https://github.com/lightningdevkit/ldk-c-bindings cd ldk-c-bindings - git checkout 0.0.104 + git checkout 0.0.106 - name: Rebuild C bindings without STD run: | cd ldk-c-bindings @@ -61,7 +61,7 @@ jobs: export HOME=/root/ # Github actions is apparently broken export PATH=$(pwd)/$(echo node-*/bin):$PATH # npx playwright install-deps is broken so we do it manually, see https://github.com/microsoft/playwright/issues/11165 - apt-get install -y --no-install-recommends fonts-liberation libenchant-2-2 libicu67 libjpeg62-turbo libasound2 libatk-bridge2.0-0 libatk1.0-0 libatspi2.0-0 libcairo2 libcups2 libdbus-1-3 libdrm2 libegl1 libgbm1 libglib2.0-0 libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxdamage1 libxext6 libxfixes3 libxrandr2 libxshmfence1 xvfb fonts-noto-color-emoji fonts-unifont libfontconfig libfreetype6 xfonts-scalable fonts-ipafont-gothic fonts-wqy-zenhei fonts-tlwg-loma-otf ffmpeg libcairo-gobject2 libdbus-glib-1-2 libfontconfig1 libgdk-pixbuf2.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libxcb-shm0 libxcursor1 libxi6 libxrender1 libxt6 gstreamer1.0-libav gstreamer1.0-plugins-bad gstreamer1.0-plugins-base gstreamer1.0-plugins-good libepoxy0 libevdev2 libgl1 libgles2 libgstreamer-gl1.0-0 libgstreamer1.0-0 libharfbuzz-icu0 libharfbuzz0b libhyphen0 libnotify4 libopenjp2-7 libopus0 libpng16-16 libsecret-1-0 libsoup2.4-1 libwayland-client0 libwayland-egl1 libwayland-server0 libwebp6 libwebpdemux2 libwoff1 libxkbcommon0 libxml2 libxslt1.1 + apt-get install -y --no-install-recommends fonts-liberation libenchant-2-2 libicu67 libjpeg62-turbo libasound2 libatk-bridge2.0-0 libatk1.0-0 libatspi2.0-0 libcairo2 libcups2 libdbus-1-3 libdrm2 libegl1 libgbm1 libglib2.0-0 libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxdamage1 libxext6 libxfixes3 libxrandr2 libxshmfence1 xvfb fonts-noto-color-emoji fonts-unifont libfontconfig libfreetype6 xfonts-scalable fonts-ipafont-gothic fonts-wqy-zenhei fonts-tlwg-loma-otf ffmpeg libcairo-gobject2 libdbus-glib-1-2 libfontconfig1 libgdk-pixbuf2.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libxcb-shm0 libxcursor1 libxi6 libxrender1 libxt6 gstreamer1.0-libav gstreamer1.0-plugins-bad gstreamer1.0-plugins-base gstreamer1.0-plugins-good libepoxy0 libevdev2 libgl1 libgles2 libgstreamer-gl1.0-0 libgstreamer1.0-0 libharfbuzz-icu0 libharfbuzz0b libhyphen0 libnotify4 libopenjp2-7 libopus0 libpng16-16 libsecret-1-0 libsoup2.4-1 libwayland-client0 libwayland-egl1 libwayland-server0 libwebp7 libwebpdemux2 libwoff1 libxkbcommon0 libxml2 libxslt1.1 mkdir -p $HOME/.cache/ms-playwright # `playwright install` is too dumb to create this for us chmod -R 777 $HOME/ npm i -D playwright @@ -110,7 +110,7 @@ jobs: with: fetch-depth: 0 - name: Install cbindgen - run: cargo install --force cbindgen + run: cargo install --version 0.20.0 cbindgen - name: Checkout Rust-Lightning and LDK-C-Bindings git run: | git config --global user.email "ldk-ci@example.com" @@ -122,7 +122,7 @@ jobs: cd .. git clone https://github.com/lightningdevkit/ldk-c-bindings cd ldk-c-bindings - git checkout 0.0.104 + git checkout 0.0.106 - name: Rebuild C bindings, and check the sample app builds + links run: | cd ldk-c-bindings @@ -160,7 +160,7 @@ jobs: with: fetch-depth: 0 - name: Install cbindgen - run: cargo install --force cbindgen + run: cargo install --version 0.20.0 cbindgen - name: Checkout Rust-Lightning and LDK-C-Bindings git run: | git config --global user.email "ldk-ci@example.com" @@ -172,7 +172,7 @@ jobs: cd .. git clone https://github.com/lightningdevkit/ldk-c-bindings cd ldk-c-bindings - git checkout 0.0.104 + git checkout 0.0.106 - name: Rebuild C bindings, and check the sample app builds + links run: | cd ldk-c-bindings @@ -192,6 +192,7 @@ jobs: cd ../.. mkdir -p src/main/resources/ cp "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/liblightningjni_MacOSX-"* src/main/resources/ + rm src/main/resources/liblightningjni_MacOSX-*-leaktracking.nativelib - name: Build Java Release Bindings run: | export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)" @@ -263,7 +264,7 @@ jobs: - name: Install cbindgen run: | . $HOME/.cargo/env - cargo install --force cbindgen + cargo install --version 0.20.0 cbindgen - name: Checkout Rust-Lightning and LDK-C-Bindings git run: | git config --global user.email "ldk-ci@example.com" @@ -275,7 +276,7 @@ jobs: cd .. git clone https://github.com/lightningdevkit/ldk-c-bindings cd ldk-c-bindings - git checkout 0.0.104 + git checkout 0.0.106 - name: Checkout Android AAR binaries and artifacts run: | # Gitweb only allows snapshots of folders by providing the object hash, which we have to extract: @@ -330,20 +331,20 @@ jobs: run: rustup target install aarch64-apple-darwin - name: Fetch upstream LLVM/clang snapshot run: | - wget -O clang+llvm-13.0.0-x86_64-apple-darwin.tar.xz https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.0/clang+llvm-13.0.0-x86_64-apple-darwin.tar.xz - if [ "$(shasum -a 256 clang+llvm-13.0.0-x86_64-apple-darwin.tar.xz | awk '{ print $1 }')" != "d051234eca1db1f5e4bc08c64937c879c7098900f7a0370f3ceb7544816a8b09" ]; then + wget -O clang+llvm-14.0.1-x86_64-apple-darwin.tar.xz https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.1/clang+llvm-14.0.1-x86_64-apple-darwin.tar.xz + if [ "$(shasum -a 256 clang+llvm-14.0.1-x86_64-apple-darwin.tar.xz | awk '{ print $1 }')" != "43149390e95b1cdbf1d4ef2e9d214bbb6d35858ceb2df27245868e06bc4fc44c" ]; then echo "Bad hash" exit 1 fi - name: Unpack upstream LLVM+clang and use it by default run: | - tar xvvf clang+llvm-13.0.0-x86_64-apple-darwin.tar.xz + tar xvvf clang+llvm-14.0.1-x86_64-apple-darwin.tar.xz - name: Checkout source code uses: actions/checkout@v2 with: fetch-depth: 0 - name: Install cbindgen - run: cargo install --force cbindgen + run: cargo install --version 0.20.0 cbindgen - name: Checkout Rust-Lightning and LDK-C-Bindings git run: | git config --global user.email "ldk-ci@example.com" @@ -355,11 +356,11 @@ jobs: cd .. git clone https://github.com/lightningdevkit/ldk-c-bindings cd ldk-c-bindings - git checkout 0.0.104 + git checkout 0.0.106 - name: Rebuild C bindings with upstream clang, and check the sample app builds + links run: | + export PATH=`pwd`/clang+llvm-14.0.1-x86_64-apple-darwin/bin:$PATH cd ldk-c-bindings - export PATH=`pwd`/clang+llvm-13.0.0-x86_64-apple-darwin/bin:$PATH CC=clang ./genbindings.sh ../rust-lightning true cd .. - name: Fetch OpenJDK 16 @@ -389,7 +390,7 @@ jobs: export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)" export JAVA_HOME=`pwd`/jdk-16.0.1.jdk/Contents/Home export PATH=$JAVA_HOME/bin:$PATH - export PATH=`pwd`/clang+llvm-13.0.0-x86_64-apple-darwin/bin:$PATH + export PATH=`pwd`/clang+llvm-14.0.1-x86_64-apple-darwin/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" @@ -430,6 +431,18 @@ jobs: diff "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/"liblightningjni_MacOSX-x86_64.nativelib src/main/resources/liblightningjni_MacOSX-x86_64.nativelib || echo diff "ldk-java-bins/${LDK_GARBAGECOLLECTED_GIT_OVERRIDE}/"liblightningjni_MacOSX-aarch64.nativelib src/main/resources/liblightningjni_MacOSX-aarch64.nativelib || echo fi + - name: Upload CI x86_64 build for analysis + if: matrix.platform == 'macos-11' + uses: actions/upload-artifact@v3.0.0 + with: + name: liblightningjni_MacOSX-x86_64.nativelib.ci-build + path: src/main/resources/liblightningjni_MacOSX-x86_64.nativelib + - name: Upload CI aarch64 build for analysis + if: matrix.platform == 'macos-11' + uses: actions/upload-artifact@v3.0.0 + with: + name: liblightningjni_MacOSX-aarch64.nativelib.ci-build + path: src/main/resources/liblightningjni_MacOSX-aarch64.nativelib - name: Run Java Tests against release bins run: | if [ "${{ matrix.platform }}" != "macos-11" ]; then