feature[TW29196]: Convert ATS sendNotifications server call #936
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: rust-pr | |
| on: | |
| pull_request: | |
| jobs: | |
| cargo-pr: | |
| permissions: | |
| contents: read | |
| checks: write | |
| pull-requests: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - macos-latest | |
| - windows-latest | |
| runs-on: ${{matrix.os}} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Get changed files | |
| id: changed-files | |
| uses: tj-actions/changed-files@v44 | |
| with: | |
| files: | | |
| **/Cargo.lock | |
| **/Cargo.toml | |
| cli/**/* | |
| !.github/workflows/rust_pr.yml | |
| - uses: Swatinem/rust-cache@v2 | |
| if: steps.changed-files.outputs.any_changed == 'true' | |
| - name: cargo setup | |
| if: steps.changed-files.outputs.any_changed == 'true' | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: x86_64-unknown-linux-musl | |
| components: clippy, rust-std, rustfmt | |
| - name: musl setup | |
| if: steps.changed-files.outputs.any_changed == 'true' && matrix.os == 'ubuntu-latest' | |
| run: | | |
| sudo apt-get update && sudo apt-get install -y musl-tools | |
| - name: build default | |
| if: steps.changed-files.outputs.any_changed == 'true' | |
| run: cargo build --release | |
| - name: test | |
| if: steps.changed-files.outputs.any_changed == 'true' | |
| run: cargo test | |
| - name: clippy | |
| if: steps.changed-files.outputs.any_changed == 'true' | |
| uses: auguwu/[email protected] | |
| with: | |
| token: ${{ github.token }} | |
| - name: Check Rust formatting | |
| run: cargo fmt -- --check | |
| - name: create artifact ref | |
| id: artifact_ref | |
| uses: ./.github/actions/artifact-current-ref | |
| - name: upload bat | |
| if: steps.changed-files.outputs.any_changed == 'true' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: bat-${{matrix.os}}${{steps.artifact_ref.outputs.artifact_current_ref}} | |
| path: target/release/*bat* | |
| - name: upload pat | |
| if: steps.changed-files.outputs.any_changed == 'true' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: pat-${{matrix.os}}${{steps.artifact_ref.outputs.artifact_current_ref}} | |
| path: target/release/*pat* | |
| - name: build ubuntu musl | |
| if: steps.changed-files.outputs.any_changed == 'true' && matrix.os == 'ubuntu-latest' | |
| run: | | |
| cargo build --release --target=x86_64-unknown-linux-musl | |
| musl-gcc -I${JAVA_HOME}/include -I${JAVA_HOME}/include/linux \ | |
| -shared -o target/x86_64-unknown-linux-musl/release/libjava_rust_ffi.so cli/linux_jni_wrapper/jni_applic_wrapper.c \ | |
| target/x86_64-unknown-linux-musl/release/libjava_rust_ffi_core.a \ | |
| -Wl,--whole-archive -static -Wl,--no-whole-archive \ | |
| -ldl -lpthread -lm | |
| - name: upload java_rust_ffi | |
| if: steps.changed-files.outputs.any_changed == 'true' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: java-rust-ffi-${{matrix.os}}${{steps.artifact_ref.outputs.artifact_current_ref}} | |
| path: | | |
| target/release/*java_rust_ffi* | |
| target/x86_64-unknown-linux-musl/release/*java_rust_ffi* | |
| bazel-pr: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Get changed files | |
| id: changed-files | |
| uses: tj-actions/changed-files@v44 | |
| with: | |
| files: | | |
| **/Cargo.lock | |
| **/Cargo.toml | |
| cli/**/* | |
| **/WORKSPACE | |
| **/MODULE.bazel.lock | |
| **/MODULE.bazel | |
| !.github/workflows/rust_pr.yml | |
| - uses: bazel-contrib/[email protected] | |
| with: | |
| bazelisk-cache: true | |
| disk-cache: ${{ github.workflow }} | |
| repository-cache: true | |
| - name: build | |
| if: steps.changed-files.outputs.any_changed == 'true' | |
| run: bazel build //cli/...:all | |
| - name: test | |
| if: steps.changed-files.outputs.any_changed == 'true' | |
| run: bazel test //cli/...:all |