Add Java and Kotlin protobuf bindings #15
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: JVM bindings | |
| # The Java and Kotlin bindings are built with Maven directly rather than Nix | |
| # because scip-kotlin-bindings depends on scip-java-bindings as a Maven | |
| # artifact, which nixpkgs' offline `maven.buildMavenPackage` sandbox cannot | |
| # resolve from the sibling derivation. | |
| on: | |
| pull_request: | |
| paths: | |
| - bindings/java/** | |
| - bindings/kotlin/** | |
| - cmd/scip/version.txt | |
| - scip.proto | |
| - .github/workflows/jvm-bindings.yaml | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: jvm-bindings-${{ github.head_ref || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: 11 | |
| cache: maven | |
| - name: Validate pom.xml versions match cmd/scip/version.txt | |
| shell: python | |
| run: | | |
| import xml.etree.ElementTree as ET | |
| expected = open('cmd/scip/version.txt').read().strip() | |
| for pom in 'bindings/java/pom.xml', 'bindings/kotlin/pom.xml': | |
| actual = ET.parse(pom).getroot().findtext('{http://maven.apache.org/POM/4.0.0}version') | |
| assert actual == expected, f'{pom}: version is {actual!r}, expected {expected!r}' | |
| - name: Build scip-java-bindings and install to local Maven repo | |
| run: mvn -B -ntp -Prelease -Dgpg.skip=true -f bindings/java/pom.xml install | |
| - name: Build scip-kotlin-bindings (resolves scip-java-bindings from local repo) | |
| run: mvn -B -ntp -Prelease -Dgpg.skip=true -f bindings/kotlin/pom.xml verify |