Fix kotlin unsigned type conversion (#747) #2338
This file contains 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: Diplomat CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check rustfmt | |
run: cargo fmt --all -- --check | |
- name: Check clippy | |
run: cargo clippy --all-targets --all-features -- -D warnings | |
build-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build | |
run: cargo build --verbose | |
- name: Run tests | |
run: cargo test --verbose | |
msrv: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install MSRV Rust | |
run: rustup install 1.71 --profile minimal | |
- name: Check | |
run: cargo +1.71 check -p diplomat -p diplomat-runtime -p diplomat_core --verbose | |
gen: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install cargo-make | |
uses: taiki-e/install-action@v2 | |
with: | |
tool: cargo-make@0.36.13 # https://github.com/rust-diplomat/diplomat/issues/440 | |
- name: Run regeneration | |
run: cargo make gen | |
- name: Test code is fresh | |
run: git add . && git diff --cached --exit-code | |
test-c: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install cargo-make | |
uses: taiki-e/install-action@cargo-make | |
- name: Test C | |
run: cargo make test-c | |
check-c: | |
strategy: | |
matrix: | |
os: [ ubuntu-latest, macos-latest, windows-latest ] | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install cargo-make | |
uses: taiki-e/install-action@cargo-make | |
- name: clang, c11 | |
run: cargo make check-c | |
env: | |
CC: clang | |
C_STD: c11 | |
- name: gcc, c11 | |
run: cargo make check-c | |
env: | |
CC: gcc | |
C_STD: c11 | |
- name: gcc, c2x | |
run: cargo make check-c | |
env: | |
CC: gcc | |
C_STD: c2x | |
test-cpp: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install cargo-make | |
uses: taiki-e/install-action@cargo-make | |
- name: clang | |
run: CXX=clang++-14 cargo make test-cpp | |
- name: gcc | |
run: CXX=g++ cargo make test-cpp | |
check-cpp: | |
strategy: | |
matrix: | |
os: [ ubuntu-latest, macos-latest, windows-latest ] | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install cargo-make | |
uses: taiki-e/install-action@cargo-make | |
- name: clang, c++17 | |
run: cargo make check-cpp | |
env: | |
CXX: clang | |
CXX_STD: c++17 | |
- name: clang, c++20 | |
run: cargo make check-cpp | |
env: | |
CXX: clang | |
CXX_STD: c++20 | |
- name: gcc, c++23 | |
if: ${{ matrix.os != 'macos-latest' }} | |
run: cargo make check-cpp | |
env: | |
CXX: gcc | |
CXX_STD: c++23 | |
test-js: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [ | |
18.20.3, # supported until 2025-04-30 | |
20.14.0, # supported until 2026-04-30 | |
22.3.0, # current, supported until 2027-04-30 | |
] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install cargo-make | |
uses: taiki-e/install-action@cargo-make | |
- name: Load Rust toolchain for WASM. | |
run: rustup target add wasm32-unknown-unknown | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Test JS | |
run: cargo make test-js | |
test-demo: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [ | |
18.20.3, # supported until 2025-04-30 | |
20.14.0, # supported until 2026-04-30 | |
22.3.0, # current, supported until 2027-04-30 | |
] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install cargo-make | |
uses: taiki-e/install-action@cargo-make | |
- name: Load Rust toolchain for WASM. | |
run: rustup target add wasm32-unknown-unknown | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Test Demo Gen | |
run: cargo make test-demo | |
test-dart: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install cargo-make | |
uses: taiki-e/install-action@cargo-make | |
- name: Install Dart | |
uses: dart-lang/setup-dart@v1 | |
with: | |
sdk: 3.4.0-204.0.dev | |
- name: Test Dart | |
run: cargo make test-dart | |
test-kotlin: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install cargo-make | |
uses: taiki-e/install-action@cargo-make | |
- name: Set up JDK 17 for x64 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
architecture: x64 | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0 | |
- name: Test Kotlin | |
run: cargo make test-kotlin |