Skip to content

Commit

Permalink
Merge pull request #1 from rust-diplomat/move-panama-backend
Browse files Browse the repository at this point in the history
move-panama-backend
  • Loading branch information
Manishearth authored Sep 20, 2024
2 parents 3e3ee3d + ae5427d commit 16582c2
Show file tree
Hide file tree
Showing 157 changed files with 39,232 additions and 11 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/check-diplomat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

name: Check Diplomat Compatibility

on:
schedule:
- cron: "0 0 * * 5"

env:
CARGO_TERM_COLOR: always

jobs:
check-latest-diplomat:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Add latest dipomat
run: cargo add -p diplomat-java --git https://github.com/rust-diplomat/diplomat.git --branch main diplomat-tool diplomat-runtime diplomat_core

- name: Check build
run: cargo build
85 changes: 85 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Diplomat Java 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-java -p jextrsact -p feature-tests

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install cargo-make
uses: taiki-e/install-action@cargo-make
- name: Set up JDK 22 for x64
uses: actions/setup-java@v4
with:
java-version: '22'
distribution: 'temurin'
architecture: x64
cache: maven
- name: Test Java
run: cargo make test-feature

test-gen:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install cargo-make
uses: taiki-e/install-action@cargo-make
- name: Install curl
run: sudo apt-get update && sudo apt-get install -y curl
- name: Set up JDK 22 for x64
uses: actions/setup-java@v4
with:
java-version: '22'
distribution: 'temurin'
architecture: x64
cache: maven
- name: get jextract
run: curl -o /opt/jextract.tgz https://download.java.net/java/early_access/jextract/22/5/openjdk-22-jextract+5-33_linux-x64_bin.tar.gz
- name: config jextract
run: tar -xzf /opt/jextract.tgz -C /opt/
- name: Add jextract to path
run: echo "/opt/jextract-22/bin" >> $GITHUB_PATH
- name: Run generated java
run: cargo make gen-feature

17 changes: 7 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
# Generated by Cargo
# will have compiled files and executables
debug/
target/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk

# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb
# VIM swap files
*.swp

# RustRover
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
# Compiled header files
*.gch

# VS Code configuration
.vscode/
Loading

0 comments on commit 16582c2

Please sign in to comment.