EchoJsonRpcServiceTest: direct test of EchoJsonRpcService in Java #248
Workflow file for this run
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: Build | |
| on: [pull_request, merge_group, workflow_dispatch] | |
| jobs: | |
| validate_gradle_wrapper: | |
| name: "Validate Gradle Wrapper" | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: gradle/actions/wrapper-validation@v5 | |
| build_gradle: | |
| needs: validate_gradle_wrapper | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-24.04, macOS-15, windows-2025] | |
| java: ['21', '25'] | |
| distribution: ['temurin'] | |
| fail-fast: false | |
| name: ${{ matrix.os }} JDK ${{ matrix.java }} | |
| steps: | |
| - name: Git checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up Java | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: ${{ matrix.distribution }} | |
| java-version: ${{ matrix.java }} | |
| cache: 'gradle' | |
| - name: Build with Gradle | |
| run: ./gradlew buildCI installDist --scan --info --stacktrace | |
| - name: Generate SHA256SUMS (Linux) | |
| run: sha256sum artifacts/*/* > SHA256SUMS | |
| working-directory: ./build | |
| if: runner.os == 'Linux' | |
| - name: Generate SHA256SUMS (macOS) | |
| run: shasum -a 256 artifacts/*/* > SHA256SUMS | |
| working-directory: ./build | |
| if: runner.os == 'macOS' | |
| - name: Upload SHA256SUMS | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: SHA256SUMS-${{ matrix.os }}-${{ matrix.java }} | |
| path: build/SHA256SUMS | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: artifacts-${{ matrix.os }}-${{ matrix.java }} | |
| path: build/artifacts | |
| graalvm: | |
| needs: validate_gradle_wrapper | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-24.04, macOS-15] | |
| java-version: [ '25' ] | |
| distribution: [ 'graalvm-community' ] | |
| fail-fast: false | |
| name: ${{ matrix.os }} JDK ${{ matrix.java-version }}.${{ matrix.distribution }} | |
| steps: | |
| - name: Git checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up GraalVM | |
| uses: graalvm/setup-graalvm@v1 | |
| with: | |
| java-version: ${{ matrix.java-version }} | |
| distribution: ${{ matrix.distribution }} | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| cache: 'gradle' | |
| - name: Build with Gradle | |
| run: ./gradlew consensusj-jrpc-echod:nativeTest nativeCompile --scan --info --stacktrace | |
| - name: Upload jrpc tool as artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: jsonrpc-tool-${{ matrix.os }}-jdk${{ matrix.java-version }} | |
| path: consensusj-jrpc/build/jrpc | |
| regtest: | |
| needs: validate_gradle_wrapper | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-24.04, ubuntu-24.04-arm] | |
| fail-fast: false | |
| name: RegTest ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install Nix | |
| uses: cachix/install-nix-action@v31 | |
| with: | |
| github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
| # pre-build the shell separately to avoid skewing the run time of the next | |
| # step and have clear point of failure should the shell fail to build | |
| - name: Pre-build devShell | |
| run: nix build --no-link .#devShells.$(nix eval --impure --raw --expr 'builtins.currentSystem').default | |
| - name: Run RegTests | |
| shell: 'nix develop -c bash -e {0}' | |
| run: ./test-run-regtest.sh | |
| - name: Upload RegTest results as artifact | |
| uses: actions/upload-artifact@v6 | |
| if: failure() | |
| with: | |
| name: regtest-consensusj-jdk${{ matrix.java }}-${{ matrix.os }}-reports | |
| path: | | |
| cj-btc-jsonrpc-integ-test/build/reports/tests/regTest | |
| cj-btc-cli/build/reports/tests/regTest | |
| build_nix: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-24.04, ubuntu-24.04-arm, macOS-15] | |
| fail-fast: false | |
| name: ${{ matrix.os }} Nix | |
| steps: | |
| - name: Git checkout | |
| uses: actions/checkout@v6 | |
| - name: Install Nix | |
| uses: cachix/install-nix-action@v31 | |
| with: | |
| github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build in Nix development shell | |
| run: nix develop -c gradle buildCI installDist consensusj-jrpc-echod:nativeTest nativeCompile | |
| - name: Build Nix Package | |
| run: nix build .#consensusj-tools | |
| all_green: | |
| runs-on: ubuntu-24.04 | |
| needs: [validate_gradle_wrapper, build_gradle, graalvm, regtest, build_nix] | |
| steps: | |
| - run: echo "All upstream jobs passed" |