Merge pull request #7 from yuvicc/2025-11-some_compilation_issues #17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Java CI | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| branches: | |
| - main | |
| - master | |
| push: | |
| branches: | |
| - main | |
| - master | |
| workflow_dispatch: | |
| jobs: | |
| validate_gradle_wrapper: | |
| name: "Validate Gradle Wrapper" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: gradle/actions/wrapper-validation@v4 | |
| build: | |
| name: Build and Test | |
| needs: validate_gradle_wrapper | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| fail-fast: false | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Set up JDK 25 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: 25 | |
| distribution: 'temurin' | |
| cache: 'gradle' | |
| - name: Install Ubuntu dependencies | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y cmake build-essential libboost-all-dev | |
| - name: Install macOS dependencies | |
| if: runner.os == 'macOS' | |
| run: | | |
| brew install cmake boost | |
| - name: Cache Bitcoin Kernel build | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| bitcoinkernel/bitcoin/build | |
| /usr/local/lib/libbitcoinkernel.* | |
| key: ${{ runner.os }}-bitcoinkernel-${{ hashFiles('bitcoinkernel/bitcoin/**') }} | |
| restore-keys: | | |
| ${{ runner.os }}-bitcoinkernel- | |
| - name: Build bitcoinkernel | |
| run: | | |
| cd bitcoinkernel/bitcoin | |
| cmake -B build -DBUILD_KERNEL_LIB=ON -DBUILD_UTIL_CHAINSTATE=ON -DBUILD_KERNEL_TEST=ON -DENABLE_IPC=OFF | |
| cmake --build build -j$(nproc 2>/dev/null || sysctl -n hw.ncpu) | |
| sudo cmake --install build | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: Build with Gradle | |
| run: ./gradlew build | |
| - name: Upload test results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-results-${{ matrix.os }}-java25 | |
| path: | | |
| build/reports/tests/ | |
| build/test-results/ | |
| - name: Upload build artifacts | |
| if: success() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: build-artifacts-${{ matrix.os }}-java25 | |
| path: build/libs/ |