build: Support manually generating C# bindings via Github action and add a README #496
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: bindings/java | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-java@v4 | |
| with: | |
| java-version: 8 | |
| distribution: "corretto" | |
| - uses: dtolnay/rust-toolchain@stable | |
| - name: Building binding | |
| run: | | |
| cargo clippy --all-targets --no-deps -- -Dwarnings | |
| cargo build --release --manifest-path bindings/java/Cargo.toml --locked | |
| - name: Build jar | |
| run: mvn package | |
| working-directory: ./bindings/java | |
| - name: Test jar | |
| run: | | |
| javac -cp target/regorus-java-0.2.2.jar Test.java | |
| java -Djava.library.path=target/release -cp target/regorus-java-0.2.2.jar:. Test | |
| working-directory: ./bindings/java |